{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The gallery and the buy box of one product.",
  "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/product-detail.json\n    A product page: a gallery (the main picture and optional thumbnails) beside the buy box (badge, rating, price, stock, quantity, add button, shipping and returns notes). Axes: layout (split, stacked), media side, thumbs (none, below), buy (full, compact), tone, density.\n    Props (p): id, product, labels, badges, level, layout, mediaSide, thumbs, buy, tone, density, landmarkLabel. -#}\n{%- set v_id = (p.id ?? null) -%}\n{%- set v_product = (p.product ?? null) -%}\n{%- set v_labels = (p.labels ?? null) -%}\n{%- set v_badges = (p.badges ?? null) -%}\n{%- set v_level = (p.level ?? 1) -%}\n{%- set v_layout = (p.layout ?? 'split') -%}\n{%- set v_mediaSide = (p.mediaSide ?? 'start') -%}\n{%- set v_thumbs = (p.thumbs ?? 'below') -%}\n{%- set v_buy = (p.buy ?? 'full') -%}\n{%- set v_tone = (p.tone ?? 'default') -%}\n{%- set v_density = (p.density ?? 'default') -%}\n{%- set v_landmarkLabel = (p.landmarkLabel ?? null) -%}\n{%- if og_t(not (og_t(v_product))) %}\n  {%- set c_1 -%}\n    {{ include('blocks/empty-state.html.twig', {'p': {'icon': 'package', 'title': og_get(v_labels, ['empty'])}}, with_context = false) }}\n  {%- endset -%}\n  {{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'tone': v_tone, 'density': v_density, 'landmarkLabel': v_landmarkLabel}, 'children': og_markup(c_1)}, with_context = false) }}\n{%- else %}\n  {%- set f_14 -%}\n    {{ include('blocks/product-gallery.html.twig', {'p': {'name': og_get(v_product, ['name']), 'image': og_get(v_product, ['image']), 'thumbs': v_thumbs}}, with_context = false) }}\n  {%- endset -%}\n  {%- set c_15 -%}\n    {%- set c_13 -%}\n      {%- if og_t(og_get(v_product, ['category'])) %}\n        {%- set c_2 -%}\n          {{ og_text(og_get(v_product, ['category'])) }}\n        {%- endset -%}\n        {{ include('compose/Text.html.twig', {'size': 'xs', 'class': 'uppercase tracking-wide text-muted-foreground', 'attrs': og_attrs(['data-slot', 'category']), 'children': c_2}, with_context = false) }}\n      {%- endif %}\n      {{ include('blocks/product-price.html.twig', {'p': {'price': og_get(v_product, ['price']), 'compareAt': og_get(v_product, ['compareAt']), 'currency': og_get(v_product, ['currency']), 'badge': (og_t(og_get(v_product, ['badge'])) ? og_at(v_badges, og_get(v_product, ['badge'])) : ''), 'was': og_get(v_labels, ['was'])}}, with_context = false) }}\n      {%- set c_4 -%}\n        {{ include('blocks/rating.html.twig', {'p': {'value': og_get(v_product, ['rating']), 'label': og_tpl(og_get(v_labels, ['ratingLabel']), [og_get(v_product, ['rating'])])}}, with_context = false) }}\n        {%- set c_3 -%}\n          {{ og_text(og_tpl(og_get(v_labels, ['reviews']), [og_get(v_product, ['reviews'])])) }}\n        {%- endset -%}\n        {{ include('compose/Text.html.twig', {'size': 'sm', 'class': 'text-muted-foreground', 'children': c_3}, with_context = false) }}\n      {%- endset -%}\n      {{ include('compose/Group.html.twig', {'gap': '2', 'children': c_4}, with_context = false) }}\n      {%- set c_5 -%}\n        {{ og_text((og_t(og_get(v_product, ['inStock'])) ? og_get(v_labels, ['inStock']) : og_get(v_labels, ['soldOut']))) }}\n      {%- endset -%}\n      {{ include('compose/Text.html.twig', {'size': 'sm', 'weight': 'medium', 'class': og_s((og_t(og_get(v_product, ['inStock'])) ? 'text-foreground' : 'text-destructive')), 'attrs': og_attrs(['data-slot', 'stock']), 'children': c_5}, with_context = false) }}\n      {%- set c_7 -%}\n        {%- if og_t(og_eq(v_buy, 'full')) %}\n          {{ include('blocks/number-field.html.twig', {'p': {'value': '1', 'name': og_tpl('{0}-qty', [v_id]), 'min': '1', 'label': og_get(v_labels, ['qty']), 'decrease': og_get(v_labels, ['decrease']), 'increase': og_get(v_labels, ['increase'])}}, with_context = false) }}\n        {%- endif %}\n        {%- set c_6 -%}\n          {{ og_text(og_get(v_labels, ['add'])) }}\n        {%- endset -%}\n        {{ include('compose/Button.html.twig', {'disabled': og_t(not (og_t(og_get(v_product, ['inStock'])))), 'children': c_6}, with_context = false) }}\n      {%- endset -%}\n      {{ include('compose/Group.html.twig', {'gap': '4', 'class': 'flex-wrap', 'children': c_7}, with_context = false) }}\n      {%- if og_t(og_eq(v_buy, 'full')) %}\n        {%- set c_12 -%}\n          {%- set c_9 -%}\n            {{ include('icons/LucideIcon.html.twig', {'name': 'truck', 'size': 16}, with_context = false) }}\n            {%- set c_8 -%}\n              {{ og_text(og_get(v_labels, ['shipping'])) }}\n            {%- endset -%}\n            {{ include('compose/Inline.html.twig', {'children': c_8}, with_context = false) }}\n          {%- endset -%}\n          {{ include('compose/ListItem.html.twig', {'class': 'flex items-center gap-2', 'children': c_9}, with_context = false) }}\n          {%- set c_11 -%}\n            {{ include('icons/LucideIcon.html.twig', {'name': 'shield-check', 'size': 16}, with_context = false) }}\n            {%- set c_10 -%}\n              {{ og_text(og_get(v_labels, ['returns'])) }}\n            {%- endset -%}\n            {{ include('compose/Inline.html.twig', {'children': c_10}, with_context = false) }}\n          {%- endset -%}\n          {{ include('compose/ListItem.html.twig', {'class': 'flex items-center gap-2', 'children': c_11}, with_context = false) }}\n        {%- endset -%}\n        {{ include('compose/List.html.twig', {'tag': 'ul', 'class': 'flex flex-col gap-2 text-sm text-muted-foreground', 'children': c_12}, with_context = false) }}\n      {%- endif %}\n    {%- endset -%}\n    {{ include('compose/Stack.html.twig', {'gap': '4', 'align': 'stretch', 'attrs': og_attrs(['data-slot', 'buy-box']), 'children': c_13}, with_context = false) }}\n  {%- endset -%}\n  {{ include('blocks/section-frame.html.twig', {'p': {'id': v_id, 'title': og_get(v_product, ['name']), 'lead': og_get(v_product, ['summary']), 'heading': {'level': v_level}, 'layout': (og_t(og_eq(v_layout, 'split')) ? 'split' : 'stack'), 'media': {'show': true, 'side': v_mediaSide, 'align': 'start'}, 'tone': v_tone, 'density': v_density, 'landmarkLabel': v_landmarkLabel, 'aside': og_markup(f_14)}, 'children': og_markup(c_15)}, with_context = false) }}\n{%- endif %}\n",
      "path": "blocks/product-detail.html.twig",
      "target": "blocks/product-detail.html.twig"
    }
  ],
  "meta": {
    "category": "commerce",
    "group": "product",
    "kind": "block",
    "tags": [
      "twig",
      "block"
    ]
  },
  "name": "product-detail",
  "registryDependencies": [
    "button",
    "empty-state",
    "group",
    "inline",
    "list",
    "list-item",
    "lucide-icon",
    "number-field",
    "product-gallery",
    "product-price",
    "rating",
    "section-frame",
    "stack",
    "text",
    "utils"
  ],
  "runtime": "twig",
  "title": "Product Detail",
  "type": "registry:block"
}
