{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The cart lines beside a summary with a promo code and a free-delivery bar.",
  "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/shopping-cart.json\n    The cart as a page: the lines as cards (picture, name, variant, price, quantity, line total, remove) with the way back, beside the order summary with a promo code and the free-delivery bar. Static markup. Axes: layout (split: the summary beside the lines, stacked: below them), promo (show, hide), progress (show, hide), tone.\n    Props (p): id, title, lines, rows, promos, labels, totals, actions, layout, promo, progress, tone, landmarkLabel. *}\n{var $v_id = ($p['id'] ?? null)}\n{var $v_title = ($p['title'] ?? null)}\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_totals = ($p['totals'] ?? null)}\n{var $v_actions = ($p['actions'] ?? null)}\n{var $v_layout = ($p['layout'] ?? 'split')}\n{var $v_promo = ($p['promo'] ?? 'show')}\n{var $v_progress = ($p['progress'] ?? 'show')}\n{var $v_tone = ($p['tone'] ?? 'default')}\n{var $v_landmarkLabel = ($p['landmarkLabel'] ?? null)}\n{capture $c_14}\n  {capture $c_13}\n    {capture $c_11}\n      {if og_t(og_eq(og_len($v_lines), 0))}\n        {=og_include('blocks/empty-state.latte', ['p' => ['icon' => 'shopping-cart', 'title' => og_get($v_actions, ['empty'])]])|noescape}\n      {/if}\n      {foreach og_l($v_lines) as $v_line}\n        {capture $c_7}\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-20 shrink-0'])]])|noescape}\n          {capture $c_4}\n            {capture $c_1}\n              {=og_text(og_get($v_line, ['name']))}\n            {/capture}\n            {=og_include('compose/Text.latte', ['size' => 'sm', 'weight' => 'semibold', 'children' => (string) $c_1])|noescape}\n            {capture $c_2}\n              {=og_text(og_get($v_line, ['variant']))}\n            {/capture}\n            {=og_include('compose/Text.latte', ['size' => 'xs', 'class' => 'text-muted-foreground', 'children' => (string) $c_2])|noescape}\n            {capture $c_3}\n              {=og_text(og_money(og_get($v_line, ['price']), og_get($v_line, ['currency'])))}\n            {/capture}\n            {=og_include('compose/Text.latte', ['size' => 'sm', 'children' => (string) $c_3])|noescape}\n          {/capture}\n          {=og_include('compose/Stack.latte', ['gap' => '0', 'class' => 'min-w-40 flex-1', 'children' => (string) $c_4])|noescape}\n          {=og_include('blocks/number-field.latte', ['p' => ['value' => og_str(og_get($v_line, ['qty'])), 'name' => og_tpl('{0}-qty-{1}', [$v_id, og_get($v_line, ['id'])]), 'min' => '1', 'label' => og_get($v_labels, ['qty']), 'decrease' => og_get($v_labels, ['decrease']), 'increase' => og_get($v_labels, ['increase'])]])|noescape}\n          {capture $c_5}\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/Text.latte', ['size' => 'base', 'weight' => 'bold', 'class' => 'w-24 text-right', 'children' => (string) $c_5])|noescape}\n          {capture $c_6}\n            {=og_include('icons/LucideIcon.latte', ['name' => 'trash', 'size' => 16])|noescape}\n          {/capture}\n          {=og_include('compose/Button.latte', ['variant' => 'ghost', 'size' => 'sm', 'layout' => 'icon', 'ariaLabel' => og_s(og_get($v_labels, ['remove'])), 'children' => (string) $c_6])|noescape}\n        {/capture}\n        {=og_include('compose/Group.latte', ['gap' => '4', 'align' => 'center', 'class' => 'rounded bg-card inset-ring inset-ring-border flex-wrap p-4', 'attrs' => og_attrs(['data-slot', 'item']), 'children' => (string) $c_7])|noescape}\n      {/foreach}\n      {capture $c_10}\n        {capture $c_8}\n          {=og_include('icons/LucideIcon.latte', ['name' => 'arrow-left', 'size' => 16])|noescape}\n          {=og_text(og_get($v_actions, ['back']))}\n        {/capture}\n        {=og_include('compose/Button.latte', ['variant' => 'outline', 'size' => 'default', 'children' => (string) $c_8])|noescape}\n        {capture $c_9}\n          {=og_text(og_get($v_actions, ['clear']))}\n        {/capture}\n        {=og_include('compose/Button.latte', ['variant' => 'ghost', 'size' => 'default', 'children' => (string) $c_9])|noescape}\n      {/capture}\n      {=og_include('compose/Group.latte', ['gap' => '4', 'justify' => 'between', 'class' => 'flex-wrap', 'children' => (string) $c_10])|noescape}\n    {/capture}\n    {=og_include('compose/Stack.latte', ['gap' => '4', 'align' => 'stretch', 'class' => og_s((og_t(og_eq($v_layout, 'split')) ? 'lg:col-span-2' : '')), 'attrs' => og_attrs(['data-slot', 'lines']), 'children' => (string) $c_11])|noescape}\n    {capture $c_12}\n      {=og_include('blocks/cart-summary-card.latte', ['p' => ['field' => og_tpl('{0}-promo', [$v_id]), 'lines' => $v_lines, 'rows' => $v_rows, 'promos' => $v_promos, 'labels' => $v_totals, 'promo' => $v_promo, 'progress' => $v_progress]])|noescape}\n    {/capture}\n    {=og_include('compose/Box.latte', ['class' => og_s((og_t(og_eq($v_layout, 'split')) ? 'lg:sticky lg:top-8' : '')), 'attrs' => og_attrs(['data-slot', 'aside']), 'children' => (string) $c_12])|noescape}\n  {/capture}\n  {=og_include('compose/Box.latte', ['class' => og_s((og_t(og_eq($v_layout, 'split')) ? 'grid grid-cols-1 items-start gap-8 lg:grid-cols-3' : 'grid grid-cols-1 gap-8')), 'children' => (string) $c_13])|noescape}\n{/capture}\n{=og_include('blocks/section-frame.latte', ['p' => ['id' => $v_id, 'title' => $v_title, 'tone' => $v_tone, 'landmarkLabel' => $v_landmarkLabel], 'children' => og_markup($c_14)])|noescape}\n",
      "path": "blocks/shopping-cart.latte",
      "target": "blocks/shopping-cart.latte"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "checkout",
    "kind": "block",
    "tags": [
      "latte",
      "block"
    ]
  },
  "name": "shopping-cart",
  "registryDependencies": [
    "box",
    "button",
    "cart-summary-card",
    "empty-state",
    "group",
    "lucide-icon",
    "media-frame",
    "number-field",
    "section-frame",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "latte",
  "title": "Shopping Cart",
  "type": "registry:block"
}
