{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "A dialog with a walkthrough video and an optional list of chapters. Opening and playing are port contracts.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/server-organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n// Source: packages/compose-gen/specs/organisms/video-modal.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/button\"\n\t\"github.com/ui8kit/codegen/generated/templ/compose\"\n\t\"github.com/ui8kit/codegen/generated/templ/icons\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// VideoModalProps are the props of VideoModal; the values are the JSON shapes of the TypeScript props.\ntype VideoModalProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tText any `json:\"text\"`\n\tClose any `json:\"close\"`\n\tPlay any `json:\"play\"`\n\tChaptersTitle any `json:\"chaptersTitle\"`\n\tChapters any `json:\"chapters\"`\n\tSize any `json:\"size\"`\n\tOutline any `json:\"outline\"`\n\tTone any `json:\"tone\"`\n\tImage any `json:\"image\"`\n\tImageAlt any `json:\"imageAlt\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// A dialog with a walkthrough video: a title and a close button, the player area with a play button and, optionally, a list of chapters. Opening the dialog and playing the video are port contracts. Axes: size (default, wide), outline (none, chapters: a list under the player), tone.\ntempl VideoModal(p VideoModalProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vText := p.Text }}\n\t{{ vClose := p.Close }}\n\t{{ vPlay := p.Play }}\n\t{{ vChaptersTitle := p.ChaptersTitle }}\n\t{{ vChapters := p.Chapters }}\n\t{{ vSize := uiutils.Def(p.Size, \"default\") }}\n\t{{ vOutline := uiutils.Def(p.Outline, \"none\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vImage := p.Image }}\n\t{{ vImageAlt := p.ImageAlt }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Tone: vTone, LandmarkLabel: vLandmarkLabel}) {\n\t\t@compose.Stack(compose.StackProps{Gap: \"4\", Align: \"stretch\", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"mx-auto w-full\", uiutils.Cond(uiutils.T(uiutils.Eq(vSize, \"wide\")), \"max-w-4xl\", \"max-w-2xl\"), \"rounded bg-card inset-ring inset-ring-border p-4 shadow-lg\")), Attrs: uiutils.Attrs(\"role\", \"dialog\", \"aria-label\", vTitle, \"data-slot\", \"video-modal\")}}) {\n\t\t\t@compose.Group(compose.GroupProps{Gap: \"2\", Align: \"center\", Justify: \"between\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t{ uiutils.Text(vText) }\n\t\t\t\t}\n\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"ghost\", Size: \"sm\", ButtonProps: button.ButtonProps{Type: \"button\", Class: \"shrink-0\", Attrs: uiutils.Attrs(\"aria-label\", vClose)}}) {\n\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"x\", Size: 16})\n\t\t\t\t}\n\t\t\t}\n\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"relative\", Attrs: uiutils.Attrs(\"data-slot\", \"player\")}}) {\n\t\t\t\t@MediaFrame(MediaFrameProps{Alt: uiutils.Cond(uiutils.T(vImageAlt), vImageAlt, vTitle), Src: vImage})\n\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"default\", Size: \"default\", ButtonProps: button.ButtonProps{Type: \"button\", Class: \"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 rounded\", Attrs: uiutils.Attrs(\"aria-label\", vPlay)}}) {\n\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"play\", Size: 24})\n\t\t\t\t}\n\t\t\t}\n\t\t\tif uiutils.T(uiutils.And(uiutils.Eq(vOutline, \"chapters\"), uiutils.Gt(uiutils.Len(vChapters), float64(0)))) {\n\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"2\", BoxProps: box.BoxProps{Attrs: uiutils.Attrs(\"data-slot\", \"chapters\")}}) {\n\t\t\t\t\t@compose.Title(compose.TitleProps{As: \"3\", Size: \"base\", Weight: \"bold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t{ uiutils.Text(vChaptersTitle) }\n\t\t\t\t\t}\n\t\t\t\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Class: \"m-0 flex list-none flex-col gap-2 p-0\"}}) {\n\t\t\t\t\t\tfor _, vC := range uiutils.L(vChapters) {\n\t\t\t\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: \"flex items-baseline gap-4\", Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", Weight: \"semibold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vC, \"title\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"xs\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vC, \"text\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/video-modal.templ",
      "target": "blocks/video-modal.templ"
    }
  ],
  "meta": {
    "category": "onboarding",
    "group": "guidance",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "video-modal",
  "registryDependencies": [
    "box",
    "button",
    "group",
    "kit-box",
    "kit-button",
    "kit-text",
    "list",
    "list-item",
    "lucide-icon",
    "media-frame",
    "section-frame",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "templ",
  "title": "Video Modal",
  "type": "registry:block"
}
