{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The stores with address, hours, phone and services.",
  "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-locations.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/link\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// StoreLocationsProps are the props of StoreLocations; the values are the JSON shapes of the TypeScript props.\ntype StoreLocationsProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tLead any `json:\"lead\"`\n\tStores any `json:\"stores\"`\n\tEmpty any `json:\"empty\"`\n\tKinds any `json:\"kinds\"`\n\tLabels any `json:\"labels\"`\n\tLayout any `json:\"layout\"`\n\tTone any `json:\"tone\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// The stores of a shop: name, a badge of its kind (pickup or store only), address, hours, phone, a note and the services. Axes: layout (cards, list: one row per store, map: compact cards beside a map picture), tone.\ntempl StoreLocations(p StoreLocationsProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vLead := uiutils.Def(p.Lead, \"\") }}\n\t{{ vStores := p.Stores }}\n\t{{ vEmpty := uiutils.Def(p.Empty, \"\") }}\n\t{{ vKinds := p.Kinds }}\n\t{{ vLabels := p.Labels }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"cards\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Lead: vLead, Tone: vTone, LandmarkLabel: vLandmarkLabel}) {\n\t\tif uiutils.Eq(uiutils.Len(vStores), float64(0)) {\n\t\t\t@EmptyState(EmptyStateProps{Icon: \"store\", Title: vEmpty})\n\t\t} else {\n\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"grid grid-cols-1 gap-8\", uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"map\")), \"items-start md:grid-cols-2\", \"\")))}}) {\n\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"cards\")), \"grid grid-cols-1 gap-4 md:grid-cols-2\", \"flex flex-col gap-4\")), Attrs: uiutils.Attrs(\"data-slot\", \"items\")}}) {\n\t\t\t\t\tfor _, vS := range uiutils.L(vStores) {\n\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"4\", BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"list\")), \"border-b border-border pb-4\", \"rounded bg-card inset-ring inset-ring-border p-6\")), Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\t\t\t\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"2\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t\t\t\t@compose.Badge(compose.BadgeProps{Variant: \"outline\", Size: \"default\", TextProps: text.TextProps{Class: \"w-fit\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.At(vKinds, uiutils.Get(vS, \"kind\"))) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.Title(compose.TitleProps{As: \"3\", Size: \"lg\", Weight: \"bold\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vS, \"name\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Tag: \"ul\", Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"list\")), \"flex flex-wrap gap-x-8 gap-y-2 text-sm\", \"flex flex-col gap-2 text-sm\"))}}) {\n\t\t\t\t\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: \"flex items-center gap-2\"}}) {\n\t\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"map-pin\", Size: 16})\n\t\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vS, \"address\")) }\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\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: \"flex items-center gap-2\"}}) {\n\t\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"clock\", Size: 16})\n\t\t\t\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vS, \"hours\")) }\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\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: \"flex items-center gap-2\"}}) {\n\t\t\t\t\t\t\t\t\t@icons.LucideIcon(icons.LucideIconProps{Name: \"phone\", Size: 16})\n\t\t\t\t\t\t\t\t\t@compose.Link(compose.LinkProps{Variant: \"default\", LinkProps: link.LinkProps{Href: uiutils.URL(uiutils.Tpl(\"tel:{0}\", uiutils.Get(vS, \"phone\")), false)}}) {\n\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Nbsp(uiutils.Get(vS, \"phone\"))) }\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\tif uiutils.Eq(vLayout, \"cards\") {\n\t\t\t\t\t\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", TextProps: text.TextProps{Class: \"text-muted-foreground\"}}) {\n\t\t\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vS, \"note\")) }\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"2\", BoxProps: box.BoxProps{Class: \"flex-wrap\"}}) {\n\t\t\t\t\t\t\t\t\tfor _, vV := range uiutils.L(uiutils.Get(vS, \"services\")) {\n\t\t\t\t\t\t\t\t\t\t@compose.Badge(compose.BadgeProps{Variant: \"secondary\", Size: \"default\", TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t\t\t\t\t{ uiutils.Text(vV) }\n\t\t\t\t\t\t\t\t\t\t}\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\tif uiutils.Eq(vLayout, \"map\") {\n\t\t\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: \"md:sticky md:top-8\"}}) {\n\t\t\t\t\t\t@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vLabels, \"map\"), Ratio: \"1/1\"})\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n",
      "path": "blocks/store-locations.templ",
      "target": "blocks/store-locations.templ"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "delivery",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "store-locations",
  "registryDependencies": [
    "badge",
    "box",
    "empty-state",
    "group",
    "inline",
    "kit-box",
    "kit-link",
    "kit-text",
    "link",
    "list",
    "list-item",
    "lucide-icon",
    "media-frame",
    "section-frame",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "templ",
  "title": "Store Locations",
  "type": "registry:block"
}
