{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The filled body of the CartDrawer: the lines with a quantity field, then the free-delivery bar, the subtotal and total and the button.",
  "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/drawer-lines.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/progress\"\n\t\"github.com/ui8kit/codegen/generated/templ/ui/text\"\n\tuiutils \"github.com/ui8kit/codegen/generated/templ/orgutils\"\n)\n\n// DrawerLinesProps are the props of DrawerLines; the values are the JSON shapes of the TypeScript props.\ntype DrawerLinesProps struct {\n\tLines any `json:\"lines\"`\n\tRows any `json:\"rows\"`\n\tLabels any `json:\"labels\"`\n\tDrawer any `json:\"drawer\"`\n\tMedia any `json:\"media\"`\n\tField any `json:\"field\"`\n}\n\n// The filled body of the CartDrawer: the lines with a quantity field, then the free-delivery bar, the subtotal and total and the button.\ntempl DrawerLines(p DrawerLinesProps) {\n\t{{ vLines := p.Lines }}\n\t{{ vRows := p.Rows }}\n\t{{ vLabels := p.Labels }}\n\t{{ vDrawer := p.Drawer }}\n\t{{ vMedia := uiutils.Def(p.Media, \"image\") }}\n\t{{ vField := uiutils.Def(p.Field, \"qty\") }}\n\t@compose.Stack(compose.StackProps{Gap: \"4\", Align: \"stretch\", BoxProps: box.BoxProps{Class: \"flex-1 p-4\", Attrs: uiutils.Attrs(\"data-slot\", \"lines\")}}) {\n\t\tfor _, vLine := range uiutils.L(vLines) {\n\t\t\t@compose.Group(compose.GroupProps{Gap: \"4\", Align: \"start\", BoxProps: box.BoxProps{Attrs: uiutils.Attrs(\"data-slot\", \"item\")}}) {\n\t\t\t\tif uiutils.Eq(vMedia, \"image\") {\n\t\t\t\t\t@MediaFrame(MediaFrameProps{Alt: uiutils.Get(vLine, \"name\"), Src: uiutils.Get(vLine, \"image\"), Ratio: \"1/1\", Class: uiutils.Cnv(\"size-16 shrink-0\")})\n\t\t\t\t}\n\t\t\t\t@compose.Stack(compose.StackProps{Gap: \"2\", Align: \"stretch\", BoxProps: box.BoxProps{Class: \"flex-1\"}}) {\n\t\t\t\t\t@compose.Group(compose.GroupProps{Gap: \"2\", Justify: \"between\", Align: \"start\", BoxProps: box.BoxProps{}}) {\n\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{ uiutils.Text(uiutils.Get(vLine, \"name\")) }\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{Class: \"text-sm font-medium\"}}) {\n\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Money(uiutils.Mul(uiutils.Get(vLine, \"price\"), uiutils.Get(vLine, \"qty\")), uiutils.Get(vLine, \"currency\"))) }\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\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{ uiutils.Text(uiutils.Get(vLine, \"variant\")) }\n\t\t\t\t\t}\n\t\t\t\t\t@NumberField(NumberFieldProps{Value: uiutils.Str(uiutils.Get(vLine, \"qty\")), Name: uiutils.Tpl(\"{0}-{1}\", vField, uiutils.Get(vLine, \"id\")), Min: \"1\", Label: uiutils.Get(vLabels, \"qty\"), Decrease: uiutils.Get(vLabels, \"decrease\"), Increase: uiutils.Get(vLabels, \"increase\")})\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t@compose.Stack(compose.StackProps{Gap: \"4\", Align: \"stretch\", BoxProps: box.BoxProps{Class: \"border-t border-border p-4\", Attrs: uiutils.Attrs(\"data-slot\", \"drawer-lines\")}}) {\n\t\t@compose.Stack(compose.StackProps{Gap: \"2\", Align: \"stretch\", BoxProps: box.BoxProps{Class: \"rounded bg-muted p-4\", Attrs: uiutils.Attrs(\"data-slot\", \"progress\")}}) {\n\t\t\t@compose.Text(compose.TextProps{Size: \"sm\", TextProps: text.TextProps{}}) {\n\t\t\t\t{ uiutils.Text(uiutils.Get(vDrawer, \"progress\")) }\n\t\t\t}\n\t\t\t@compose.Progress(compose.ProgressProps{ProgressProps: progress.ProgressProps{Value: uiutils.SP(\"96\"), Max: \"100\", Attrs: uiutils.Attrs(\"aria-label\", uiutils.Get(vDrawer, \"progress\"))}})\n\t\t}\n\t\t@compose.List(compose.ListProps{BoxProps: box.BoxProps{Tag: \"ul\", Class: \"flex flex-col gap-2\"}}) {\n\t\t\tfor vI, vRow := range uiutils.L(vRows) {\n\t\t\t\tif uiutils.T(uiutils.Cond(uiutils.T(uiutils.Get(vRow, \"strong\")), true, uiutils.Eq(float64(vI), float64(0)))) {\n\t\t\t\t\t@compose.ListItem(compose.ListItemProps{BoxProps: box.BoxProps{Class: uiutils.S(uiutils.Cond(uiutils.T(uiutils.Get(vRow, \"strong\")), \"flex justify-between text-base font-bold\", \"flex justify-between text-sm text-muted-foreground\")), Attrs: uiutils.Attrs(\"data-slot\", \"summary-row\")}}) {\n\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{}}) {\n\t\t\t\t\t\t\t{ uiutils.Text(uiutils.Get(vRow, \"label\")) }\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@compose.Inline(compose.InlineProps{TextProps: text.TextProps{}}) {\n\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}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t@compose.Button(compose.ButtonProps{Variant: \"default\", Size: \"lg\", ButtonProps: button.ButtonProps{Class: \"w-full\"}}) {\n\t\t\t{ uiutils.Text(uiutils.Get(vLabels, \"checkout\")) }\n\t\t}\n\t}\n}\n",
      "path": "blocks/drawer-lines.templ",
      "target": "blocks/drawer-lines.templ"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "templ",
      "component"
    ]
  },
  "name": "drawer-lines",
  "registryDependencies": [
    "button",
    "group",
    "inline",
    "kit-box",
    "kit-button",
    "kit-progress",
    "kit-text",
    "list",
    "list-item",
    "media-frame",
    "number-field",
    "progress",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "templ",
  "title": "Drawer Lines",
  "type": "registry:component"
}
