{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "order-summary",
  "title": "Order summary",
  "description": "A checkout order-summary card — line items, a promo code field, a total, and a pay-now button.",
  "registryDependencies": [
    "card",
    "button",
    "input",
    "separator",
    "https://www.quilldesignsystem.com/r/icon.json"
  ],
  "files": [
    {
      "path": "registry/blocks/order-summary.tsx",
      "content": "import {\n  Card,\n  CardHeader,\n  CardTitle,\n  CardContent,\n  CardFooter,\n} from '@/components/ui/card'\nimport { Button } from '@/components/ui/button'\nimport { Input } from '@/components/ui/input'\nimport { Separator } from '@/components/ui/separator'\nimport { Icon } from '@/components/ui/icon'\n\nconst lines = [\n  { name: 'Pro plan (annual)', qty: 1, price: '$180.00' },\n  { name: 'Extra seats × 3', qty: 3, price: '$54.00' },\n  { name: 'Priority support', qty: 1, price: '$24.00' },\n]\n\n/** A checkout order-summary card — line items, a promo code field, a total, and a pay-now button. */\nexport function OrderSummary() {\n  return (\n    <Card className=\"w-card\">\n      <CardHeader>\n        <CardTitle>Order summary</CardTitle>\n      </CardHeader>\n      <CardContent className=\"flex flex-col gap-3\">\n        {lines.map((l) => (\n          <div key={l.name} className=\"flex items-center justify-between text-sm\">\n            <span className=\"text-foreground\">{l.name}</span>\n            <span className=\"text-muted-foreground tabular-nums\">{l.price}</span>\n          </div>\n        ))}\n        <Separator />\n        <div className=\"flex items-center gap-2\">\n          <Input placeholder=\"Promo code\" className=\"flex-1\" />\n          <Button variant=\"outline\">Apply</Button>\n        </div>\n        <Separator />\n        <div className=\"flex items-center justify-between\">\n          <span className=\"text-sm text-muted-foreground\">Total due today</span>\n          <span className=\"text-lg font-medium text-foreground tabular-nums\">$258.00</span>\n        </div>\n      </CardContent>\n      <CardFooter>\n        <Button className=\"w-full\">\n          <Icon name=\"credit_card\" /> Pay now\n        </Button>\n      </CardFooter>\n    </Card>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/quill/order-summary.tsx"
    }
  ],
  "meta": {
    "intent": [
      "commerce"
    ],
    "use_when": "You need a cart-review card with line items, a promo field, a total, and a pay button.",
    "not_for": "you're showing a record of a completed, already-paid transaction, not a cart pending payment → invoice; you need the full payment form (card fields, billing address) alongside the summary, not just the review → checkout"
  },
  "docs": "A checkout order-summary card — line items, a promo code field, a total, and a pay-now button. Do: Recompute the total the instant a promo code applies or a line item changes — never leave a stale total on screen after an update. Don't: Require a page refresh or separate action to see the corrected total. Do: Show an applied promo as its own line item with the discount amount, so the line items and the total add up to the same number. Don't: Let the total drop after a promo applies with no corresponding line item — buyers can't verify what changed. Use invoice when you're showing a record of a completed, already-paid transaction, not a cart pending payment. Use checkout when you need the full payment form (card fields, billing address) alongside the summary, not just the review.",
  "categories": [
    "commerce"
  ],
  "type": "registry:block"
}