{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "The price line of a product page: the price (integer minor units in the currency), the old price (compare_at) struck through when higher, and the badge.",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by packages/kit-compose/src/organisms.ts from packages/compose-gen/specs (compose-gen organism emitters on kit-compose). DO NOT EDIT.\n/**\n * The price line of a product page: the price (integer minor units in the currency), the old price (compare_at)\n * struck through when higher, and the badge.\n */\nimport { type ReactNode } from \"react\";\nimport { Badge, Group, Inline, Text } from \"../compose\";\nimport { fmtMoney } from \"../utils\";\n\nexport type ProductPriceProps = {\n  price: number;\n  compareAt?: number;\n  currency: string;\n  badge?: string;\n  was: string;\n};\n\nexport function ProductPrice({ price, compareAt, currency, badge = \"\", was }: ProductPriceProps) {\n  return (\n    <Group gap=\"4\" align=\"center\" className=\"flex-wrap\" data-slot=\"product-price\">\n      <Text size=\"4xl\" weight=\"bold\">\n        {fmtMoney(price, currency)}\n      </Text>\n      {(compareAt && (compareAt > price)) ? (\n        <Text tag=\"del\" size=\"lg\" className=\"relative text-muted-foreground\" data-slot=\"compare-at\">\n          <Inline className=\"sr-only\">\n            {was}\n          </Inline>\n          {fmtMoney(compareAt, currency)}\n        </Text>\n      ) : null}\n      {badge ? (\n        <Badge variant=\"default\" size=\"default\">\n          {badge}\n        </Badge>\n      ) : null}\n    </Group>\n  );\n}\n",
      "path": "components/product-price.tsx",
      "target": "components/product-price.tsx"
    }
  ],
  "meta": {
    "category": "components",
    "kind": "component",
    "tags": [
      "react",
      "component"
    ]
  },
  "name": "product-price",
  "registryDependencies": [
    "compose",
    "utils"
  ],
  "runtime": "react",
  "title": "Product Price",
  "type": "registry:component"
}
