{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "Subtotal, shipping, tax and the total.",
  "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/order-summary.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/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// OrderSummaryProps are the props of OrderSummary; the values are the JSON shapes of the TypeScript props.\ntype OrderSummaryProps struct {\n\tId any `json:\"id\"`\n\tTitle any `json:\"title\"`\n\tRows any `json:\"rows\"`\n\tEmpty any `json:\"empty\"`\n\tLabels any `json:\"labels\"`\n\tLayout any `json:\"layout\"`\n\tCta any `json:\"cta\"`\n\tNote any `json:\"note\"`\n\tTone any `json:\"tone\"`\n\tDensity any `json:\"density\"`\n\tLandmarkLabel any `json:\"landmarkLabel\"`\n}\n\n// The totals of an order: subtotal, shipping, tax and the total, with a checkout button and a note. Axes: layout (card, plain), cta (show, hide), note (show, hide), density, tone.\ntempl OrderSummary(p OrderSummaryProps) {\n\t{{ vId := p.Id }}\n\t{{ vTitle := p.Title }}\n\t{{ vRows := p.Rows }}\n\t{{ vEmpty := uiutils.Def(p.Empty, \"\") }}\n\t{{ vLabels := p.Labels }}\n\t{{ vLayout := uiutils.Def(p.Layout, \"card\") }}\n\t{{ vCta := uiutils.Def(p.Cta, \"show\") }}\n\t{{ vNote := uiutils.Def(p.Note, \"show\") }}\n\t{{ vTone := uiutils.Def(p.Tone, \"default\") }}\n\t{{ vDensity := uiutils.Def(p.Density, \"default\") }}\n\t{{ vLandmarkLabel := p.LandmarkLabel }}\n\t@SectionFrame(SectionFrameProps{Id: vId, Title: vTitle, Tone: vTone, Density: vDensity, Measure: \"md\", LandmarkLabel: vLandmarkLabel}) {\n\t\tif uiutils.Eq(uiutils.Len(vRows), float64(0)) {\n\t\t\t@EmptyState(EmptyStateProps{Icon: \"receipt\", Title: vEmpty})\n\t\t} else {\n\t\t\t@compose.Box(compose.BoxProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(uiutils.Cond(uiutils.T(uiutils.Eq(vLayout, \"card\")), \"rounded bg-card p-6 inset-ring inset-ring-border\", \"\"))), Attrs: uiutils.Attrs(\"data-slot\", \"summary\")}}) {\n\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"4\", Align: \"stretch\", BoxProps: box.BoxProps{}}) {\n\t\t\t\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Tag: \"ul\", Class: \"flex flex-col gap-4\"}}) {\n\t\t\t\t\t\tfor _, vRow := range uiutils.L(vRows) {\n\t\t\t\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cnv(\"flex items-center justify-between gap-4\", uiutils.Cond(uiutils.T(uiutils.Get(vRow, \"strong\")), \"border-t border-border pt-4 text-base font-bold\", \"text-sm text-muted-foreground\"))), Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\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{ uiutils.Text(uiutils.Get(vRow, \"label\")) }\n\t\t\t\t\t\t\t\t}\n\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{ uiutils.Text(uiutils.Money(uiutils.Get(vRow, \"amount\"), uiutils.Get(vRow, \"currency\"))) }\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\tif uiutils.Eq(vCta, \"show\") {\n\t\t\t\t\t\t@compose.Button(compose.ButtonProps{Variant: \"default\", Size: \"default\", ButtonProps: button.ButtonProps{Class: \"w-full\"}}) {\n\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"checkout\")) }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif uiutils.Eq(vNote, \"show\") {\n\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{ uiutils.Text(uiutils.Get(vLabels, \"note\")) }\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/order-summary.templ",
      "target": "blocks/order-summary.templ"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "checkout",
    "kind": "block",
    "tags": [
      "templ",
      "block"
    ]
  },
  "name": "order-summary",
  "registryDependencies": [
    "box",
    "button",
    "empty-state",
    "inline",
    "kit-box",
    "kit-button",
    "kit-text",
    "list",
    "list-item",
    "section-frame",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "templ",
  "title": "Order Summary",
  "type": "registry:block"
}
