{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "order-summary",
  "type": "registry:ui",
  "title": "Order summary",
  "description": "A checkout summary card listing line items such as subtotal, shipping and tax, then a separator and a bold total. Built with React for cart pages.",
  "dependencies": [],
  "registryDependencies": [
    "https://ui.minidev.pro/r/separator.json",
    "utils"
  ],
  "files": [
    {
      "path": "registry/ui/order-summary.tsx",
      "type": "registry:ui",
      "target": "components/ui/order-summary.tsx",
      "content": "\"use client\"\nimport * as React from \"react\"\nimport { cn } from \"@/lib/utils\"\nimport { Separator } from \"@/components/ui/separator\"\n\n/** OrderSummary — label and value lines above a separator and a bold total, for checkout and invoices. */\n\ntype Line = { label: string; value: string }\n\n// Lumen checkout for a Northwind annual plan.\nconst SAMPLE_LINES: Line[] = [\n  { label: \"Subtotal\", value: \"$12,400.00\" },\n  { label: \"Discount (NW-10)\", value: \"−$1,240.00\" },\n  { label: \"Tax (8%)\", value: \"$892.80\" },\n  { label: \"Shipping\", value: \"Free\" },\n]\nconst SAMPLE_TOTAL = \"$12,052.80\"\n\ntype OrderSummaryProps = {\n  lines?: Line[]\n  total?: string\n  className?: string\n}\n\nfunction OrderSummary({\n  lines = SAMPLE_LINES,\n  total = SAMPLE_TOTAL,\n  className,\n}: OrderSummaryProps) {\n  return (\n    <div data-slot=\"order-summary\" className={cn(\"min-w-72 space-y-3 rounded-xl border border-border bg-surface p-4\", className)}>\n      {lines.map((l) => (\n        <div key={l.label} className=\"flex justify-between text-sm\">\n          <span className=\"text-fg-muted\">{l.label}</span>\n          <span className=\"tabular-nums text-fg\">{l.value}</span>\n        </div>\n      ))}\n      <Separator />\n      <div className=\"flex justify-between text-sm font-medium\">\n        <span className=\"text-fg\">Total</span>\n        <span className=\"tabular-nums text-fg\">{total}</span>\n      </div>\n    </div>\n  )\n}\nexport { OrderSummary }\nexport type { OrderSummaryProps, Line as OrderSummaryLine }\n"
    }
  ]
}
