{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The hero of a store with promises under the actions, beside a picture with an offer card or over a faint picture.",
  "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/store-hero.json\n\npackage blocks\n\nimport (\n\t\"github.com/ui8kit/codegen/generated/templ/ui/box\"\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// StoreHeroProps are the props of StoreHero; the values are the JSON shapes of the TypeScript props.\ntype StoreHeroProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tLead any `json:\"lead\"`\n\tBadge any `json:\"badge\"`\n\tLevel any `json:\"level\"`\n\tActions any `json:\"actions\"`\n\tPerks any `json:\"perks\"`\n\tCard any `json:\"card\"`\n\tLayout any `json:\"layout\"`\n\tMediaSide any `json:\"mediaSide\"`\n\tTone any `json:\"tone\"`\n\tImage any `json:\"image\"`\n\tImageAlt any `json:\"imageAlt\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// The hero of a store: a badge, the heading, a lead, one or two actions and three store promises. The overlay layout puts a picture beside the text with an offer card floating on it; the backdrop layout puts the text over a faint picture. Axes: layout (overlay, backdrop), mediaSide, tone.\ntempl StoreHero(p StoreHeroProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vLead := uiutils.Def(p.Lead, \"\") }}\n\t{{ vBadge := uiutils.Def(p.Badge, \"\") }}\n\t{{ vLevel := uiutils.Def(p.Level, float64(1)) }}\n\t{{ vActions := p.Actions }}\n\t{{ vPerks := p.Perks }}\n\t{{ vCard := p.Card }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"overlay\") }}\n\t{{ vMediaSide := uiutils.Def(p.MediaSide, \"end\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vImage := p.Image }}\n\t{{ vImageAlt := p.ImageAlt }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\tif uiutils.Eq(vLayout, \"backdrop\") {\n\t\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Heading: map[string]any{\"badge\": vBadge, \"level\": vLevel}, Tone: vTone, Density: \"roomy\", Measure: \"3xl\", Class: uiutils.Cnv(uiutils.Cond(uiutils.T(uiutils.Eq(\"image\", \"image\")), \"relative isolate overflow-hidden\", \"\")), LandmarkLabel: vLandmarkLabel}) {\n\t\t\t@Backdrop(BackdropProps{Kind: \"image\", Alt: uiutils.Cond(uiutils.T(vImageAlt), vImageAlt, vTitle), Image: vImage})\n\t\t\t@ActionGroup(ActionGroupProps{Primary: uiutils.Get(vActions, \"cta\"), PrimaryHref: uiutils.Get(vActions, \"href\"), Secondary: uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vActions, \"mode\"), \"two\")), uiutils.Get(vActions, \"secondary\"), nil), SecondaryHref: uiutils.Get(vActions, \"secondaryHref\")})\n\t\t\tif uiutils.Gt(uiutils.Len(vPerks), float64(0)) {\n\t\t\t\t@compose.Grid(compose.GridProps{Cols: \"1-3\", BoxProps: box.BoxProps{Class: \"gap-4\", Attrs: uiutils.Attrs(\"data-slot\", \"perks\")}}) {\n\t\t\t\t\tfor vI, vP := range uiutils.L(vPerks) {\n\t\t\t\t\t\tif uiutils.Lt(float64(vI), float64(3)) {\n\t\t\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"start\", BoxProps: box.BoxProps{Attrs: uiutils.Attrs(\"data-slot\", \"perk\")}}) {\n\t\t\t\t\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"flex size-10 shrink-0 items-center justify-center rounded bg-muted\"}}) {\n\t\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vP, \"icon\")), Size: 20})\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"0\", BoxProps: box.BoxProps{}}) {\n\t\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\t{ uiutils.Text(uiutils.Get(vP, \"title\")) }\n\t\t\t\t\t\t\t\t\t}\n\t\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\t{ uiutils.Text(uiutils.Get(vP, \"text\")) }\n\t\t\t\t\t\t\t\t\t}\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} else {\n\t\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Heading: map[string]any{\"badge\": vBadge, \"level\": vLevel}, Layout: \"split\", Media: map[string]any{\"show\": true, \"side\": vMediaSide}, Tone: vTone, LandmarkLabel: vLandmarkLabel, Aside: storeHeroFill1(p, vTitle, vCard, vImage, vImageAlt)}) {\n\t\t\t@ActionGroup(ActionGroupProps{Primary: uiutils.Get(vActions, \"cta\"), PrimaryHref: uiutils.Get(vActions, \"href\"), Secondary: uiutils.Cond(uiutils.T(uiutils.Eq(uiutils.Get(vActions, \"mode\"), \"two\")), uiutils.Get(vActions, \"secondary\"), nil), SecondaryHref: uiutils.Get(vActions, \"secondaryHref\")})\n\t\t\tif uiutils.Gt(uiutils.Len(vPerks), float64(0)) {\n\t\t\t\t@compose.Grid(compose.GridProps{Cols: \"1-3\", BoxProps: box.BoxProps{Class: \"gap-4\", Attrs: uiutils.Attrs(\"data-slot\", \"perks\")}}) {\n\t\t\t\t\tfor vI, vP := range uiutils.L(vPerks) {\n\t\t\t\t\t\tif uiutils.Lt(float64(vI), float64(3)) {\n\t\t\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"start\", BoxProps: box.BoxProps{Attrs: uiutils.Attrs(\"data-slot\", \"perk\")}}) {\n\t\t\t\t\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"flex size-10 shrink-0 items-center justify-center rounded bg-muted\"}}) {\n\t\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: uiutils.S(uiutils.Get(vP, \"icon\")), Size: 20})\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"0\", BoxProps: box.BoxProps{}}) {\n\t\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\t{ uiutils.Text(uiutils.Get(vP, \"title\")) }\n\t\t\t\t\t\t\t\t\t}\n\t\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\t{ uiutils.Text(uiutils.Get(vP, \"text\")) }\n\t\t\t\t\t\t\t\t\t}\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\ntempl storeHeroFill1(p StoreHeroProps, vTitle any, vCard any, vImage any, vImageAlt any) {\n\t@OfferMedia(OfferMediaProps{Alt: uiutils.Cond(uiutils.T(vImageAlt), vImageAlt, vTitle), Image: vImage, Card: vCard})\n}\n",
      "path": "blocks/store-hero.templ",
      "target": "blocks/store-hero.templ"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "storefront",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "store-hero",
  "registryDependencies": [
    "action-group",
    "backdrop",
    "box",
    "grid",
    "group",
    "kit-box",
    "kit-text",
    "lucide-icon",
    "offer-media",
    "section-frame",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "templ",
  "title": "Store Hero",
  "type": "registry:block"
}
