{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The order summary card of the cart page and the checkout: the lines in short (optional), a promo code field with ready codes, the free-delivery progress, the totals, the button and a note. Static markup.",
  "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/cart-summary-card.json\n    The order summary card of the cart page and the checkout: the lines in short (optional), a promo code field with ready codes, the free-delivery progress, the totals, the button and a note. Static markup.\n    Props (p): lines, rows, promos, labels, items, promo, field, progress, value. *}\n{var $v_lines = ($p['lines'] ?? null)}\n{var $v_rows = ($p['rows'] ?? null)}\n{var $v_promos = ($p['promos'] ?? null)}\n{var $v_labels = ($p['labels'] ?? null)}\n{var $v_items = ($p['items'] ?? 'hide')}\n{var $v_promo = ($p['promo'] ?? 'show')}\n{var $v_field = ($p['field'] ?? 'promo')}\n{var $v_progress = ($p['progress'] ?? 'show')}\n{var $v_value = ($p['value'] ?? 70)}\n{capture $c_24}\n  {capture $c_3}\n    {capture $c_1}\n      {=og_text(og_get($v_labels, ['title']))}\n    {/capture}\n    {=og_include('compose/Title.latte', ['as' => 2, 'size' => 'lg', 'weight' => 'semibold', 'children' => (string) $c_1])|noescape}\n    {capture $c_2}\n      {=og_text(og_tpl(og_get($v_labels, ['items']), [og_str(og_len($v_lines))]))}\n    {/capture}\n    {=og_include('compose/Text.latte', ['size' => 'xs', 'class' => 'text-muted-foreground', 'children' => (string) $c_2])|noescape}\n  {/capture}\n  {=og_include('compose/Group.latte', ['gap' => '4', 'align' => 'baseline', 'justify' => 'between', 'children' => (string) $c_3])|noescape}\n  {if og_t(og_and([og_eq($v_items, 'show'), og_gt(og_len($v_lines), 0)]))}\n    {capture $c_9}\n      {foreach og_l($v_lines) as $v_line}\n        {capture $c_8}\n          {=og_include('blocks/media-frame.latte', ['p' => ['alt' => og_get($v_line, ['name']), 'src' => og_get($v_line, ['image']), 'ratio' => '1/1', 'className' => og_cnv(['size-12 shrink-0'])]])|noescape}\n          {capture $c_6}\n            {capture $c_4}\n              {=og_text(og_get($v_line, ['name']))}\n            {/capture}\n            {=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'children' => (string) $c_4])|noescape}\n            {capture $c_5}\n              {=og_text(og_tpl('{0} x {1}', [og_get($v_line, ['qty']), og_money(og_get($v_line, ['price']), og_get($v_line, ['currency']))]))}\n            {/capture}\n            {=og_include('compose/Text.latte', ['size' => 'xs', 'class' => 'text-muted-foreground', 'children' => (string) $c_5])|noescape}\n          {/capture}\n          {=og_include('compose/Stack.latte', ['gap' => '0', 'class' => 'flex-1', 'children' => (string) $c_6])|noescape}\n          {capture $c_7}\n            {=og_text(og_money(og_mul(og_get($v_line, ['price']), og_get($v_line, ['qty'])), og_get($v_line, ['currency'])))}\n          {/capture}\n          {=og_include('compose/Inline.latte', ['class' => 'font-medium', 'children' => (string) $c_7])|noescape}\n        {/capture}\n        {=og_include('compose/ListItem.latte', ['class' => 'flex items-center gap-4 text-sm', 'attrs' => og_attrs(['data-slot', 'cart-line']), 'children' => (string) $c_8])|noescape}\n      {/foreach}\n    {/capture}\n    {=og_include('compose/List.latte', ['tag' => 'ul', 'class' => 'flex flex-col gap-4', 'attrs' => og_attrs(['data-slot', 'summary-lines']), 'children' => (string) $c_9])|noescape}\n  {/if}\n  {if og_t(og_eq($v_promo, 'show'))}\n    {capture $c_15}\n      {capture $c_11}\n        {=og_include('compose/Input.latte', ['type' => 'text', 'name' => og_s($v_field), 'placeholder' => og_s(og_get($v_labels, ['promo'])), 'class' => 'min-w-0 flex-1', 'attrs' => og_attrs(['aria-label', og_get($v_labels, ['promo'])])])|noescape}\n        {capture $c_10}\n          {=og_text(og_get($v_labels, ['apply']))}\n        {/capture}\n        {=og_include('compose/Button.latte', ['variant' => 'outline', 'size' => 'default', 'type' => 'button', 'children' => (string) $c_10])|noescape}\n      {/capture}\n      {=og_include('compose/Group.latte', ['gap' => '2', 'align' => 'center', 'children' => (string) $c_11])|noescape}\n      {if og_t(og_gt(og_len($v_promos), 0))}\n        {capture $c_14}\n          {capture $c_12}\n            {=og_text(og_get($v_labels, ['codes']))}\n          {/capture}\n          {=og_include('compose/Text.latte', ['size' => 'xs', 'class' => 'text-muted-foreground', 'children' => (string) $c_12])|noescape}\n          {foreach og_l($v_promos) as $v_c}\n            {capture $c_13}\n              {=og_text(og_get($v_c, ['code']))}\n            {/capture}\n            {=og_include('compose/Badge.latte', ['variant' => 'outline', 'size' => 'sm', 'children' => (string) $c_13])|noescape}\n          {/foreach}\n        {/capture}\n        {=og_include('compose/Group.latte', ['gap' => '2', 'align' => 'center', 'class' => 'flex-wrap', 'children' => (string) $c_14])|noescape}\n      {/if}\n    {/capture}\n    {=og_include('compose/Stack.latte', ['gap' => '2', 'align' => 'stretch', 'attrs' => og_attrs(['data-slot', 'promo']), 'children' => (string) $c_15])|noescape}\n  {/if}\n  {if og_t(og_eq($v_progress, 'show'))}\n    {capture $c_17}\n      {capture $c_16}\n        {=og_text(og_get($v_labels, ['progress']))}\n      {/capture}\n      {=og_include('compose/Text.latte', ['size' => 'sm', 'children' => (string) $c_16])|noescape}\n      {=og_include('compose/Progress.latte', ['value' => og_s(og_str($v_value)), 'max' => '100', 'attrs' => og_attrs(['aria-label', og_get($v_labels, ['progress'])])])|noescape}\n    {/capture}\n    {=og_include('compose/Stack.latte', ['gap' => '2', 'align' => 'stretch', 'class' => 'rounded bg-muted p-4', 'attrs' => og_attrs(['data-slot', 'progress']), 'children' => (string) $c_17])|noescape}\n  {/if}\n  {if og_t(og_gt(og_len($v_rows), 0))}\n    {capture $c_21}\n      {foreach og_l($v_rows) as $v_row}\n        {capture $c_20}\n          {capture $c_18}\n            {=og_text(og_get($v_row, ['label']))}\n          {/capture}\n          {=og_include('compose/Inline.latte', ['children' => (string) $c_18])|noescape}\n          {capture $c_19}\n            {=og_text(og_money(og_get($v_row, ['amount']), og_get($v_row, ['currency'])))}\n          {/capture}\n          {=og_include('compose/Inline.latte', ['children' => (string) $c_19])|noescape}\n        {/capture}\n        {=og_include('compose/ListItem.latte', ['class' => og_s(og_cnv(['flex items-center justify-between gap-4', (og_t(og_get($v_row, ['strong'])) ? 'border-t border-border pt-4 text-base font-bold' : 'text-sm text-muted-foreground')])), 'attrs' => og_attrs(['data-slot', 'row']), 'children' => (string) $c_20])|noescape}\n      {/foreach}\n    {/capture}\n    {=og_include('compose/List.latte', ['tag' => 'ul', 'class' => 'flex flex-col gap-2', 'children' => (string) $c_21])|noescape}\n  {/if}\n  {capture $c_22}\n    {=og_text(og_get($v_labels, ['checkout']))}\n  {/capture}\n  {=og_include('compose/Button.latte', ['variant' => 'default', 'size' => 'lg', 'class' => 'w-full', 'children' => (string) $c_22])|noescape}\n  {capture $c_23}\n    {=og_text(og_get($v_labels, ['note']))}\n  {/capture}\n  {=og_include('compose/Text.latte', ['size' => 'xs', 'class' => 'text-muted-foreground', 'children' => (string) $c_23])|noescape}\n{/capture}\n{=og_include('compose/Stack.latte', ['gap' => '6', 'align' => 'stretch', 'class' => 'rounded bg-card inset-ring inset-ring-border p-6', 'attrs' => og_attrs(['data-slot', 'summary']), 'children' => (string) $c_24])|noescape}\n",
      "path": "blocks/cart-summary-card.latte",
      "target": "blocks/cart-summary-card.latte"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "latte",
      "component"
    ]
  },
  "name": "cart-summary-card",
  "registryDependencies": [
    "badge",
    "button",
    "group",
    "inline",
    "input",
    "list",
    "list-item",
    "media-frame",
    "progress",
    "stack",
    "text",
    "title",
    "utils"
  ],
  "runtime": "latte",
  "title": "Cart Summary Card",
  "type": "registry:component"
}
