{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ds-receipt-card",
  "description": "Receipt Card component.",
  "dependencies": [
    "class-variance-authority"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "components/ds/ds-receipt-card.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\n// ── Variants ──\n\nconst receiptCardVariants = cva(\n  \"relative w-full max-w-sm overflow-hidden bg-card text-card-foreground shadow-lg\",\n  {\n    variants: {\n      edges: {\n        both: \"rounded-none\",\n        top: \"rounded-b-2xl\",\n        bottom: \"rounded-t-2xl\",\n        none: \"rounded-2xl\",\n      },\n    },\n    defaultVariants: {\n      edges: \"both\",\n    },\n  }\n)\n\nexport interface ReceiptCardProps\n  extends\n    React.HTMLAttributes<HTMLDivElement>,\n    VariantProps<typeof receiptCardVariants> {}\n\n// ── Components ──\n\nexport const ReceiptCard = React.forwardRef<HTMLDivElement, ReceiptCardProps>(\n  ({ className, edges, ...props }, ref) => {\n    // We use a pseudo-element mask or radial gradients for the jagged edge effect\n    const maskImageStyle = React.useMemo(() => {\n      const size = \"10px\"\n      const topMask = `radial-gradient(circle at top, transparent ${size}, black ${size}) top / ${size} 100% repeat-x`\n      const bottomMask = `radial-gradient(circle at bottom, transparent ${size}, black ${size}) bottom / ${size} 100% repeat-x`\n\n      if (edges === \"both\") return `${topMask}, ${bottomMask}`\n      if (edges === \"top\") return topMask\n      if (edges === \"bottom\") return bottomMask\n      return undefined\n    }, [edges])\n\n    return (\n      <div\n        ref={ref}\n        className={cn(receiptCardVariants({ edges }), className)}\n        style={\n          edges !== \"none\"\n            ? {\n                WebkitMaskImage: maskImageStyle,\n                maskImage: maskImageStyle,\n                WebkitMaskComposite: \"source-in\",\n                maskComposite: \"intersect\",\n                paddingTop: edges === \"both\" || edges === \"top\" ? \"12px\" : \"0\",\n                paddingBottom:\n                  edges === \"both\" || edges === \"bottom\" ? \"12px\" : \"0\",\n              }\n            : undefined\n        }\n        {...props}\n      />\n    )\n  }\n)\nReceiptCard.displayName = \"ReceiptCard\"\n\nexport const ReceiptCardHeader = React.forwardRef<\n  HTMLDivElement,\n  React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n  <div\n    ref={ref}\n    className={cn(\"flex flex-col items-center p-6 text-center\", className)}\n    {...props}\n  />\n))\nReceiptCardHeader.displayName = \"ReceiptCardHeader\"\n\nexport const ReceiptCardTitle = React.forwardRef<\n  HTMLHeadingElement,\n  React.HTMLAttributes<HTMLHeadingElement>\n>(({ className, ...props }, ref) => (\n  <h3\n    ref={ref}\n    className={cn(\"text-xl font-bold tracking-widest uppercase\", className)}\n    {...props}\n  />\n))\nReceiptCardTitle.displayName = \"ReceiptCardTitle\"\n\nexport const ReceiptCardDivider = React.forwardRef<\n  HTMLHRElement,\n  React.HTMLAttributes<HTMLHRElement>\n>(({ className, ...props }, ref) => (\n  <hr\n    ref={ref}\n    className={cn(\"mx-6 border-t-2 border-dashed border-muted\", className)}\n    {...props}\n  />\n))\nReceiptCardDivider.displayName = \"ReceiptCardDivider\"\n\nexport const ReceiptCardContent = React.forwardRef<\n  HTMLDivElement,\n  React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n  <div ref={ref} className={cn(\"p-6\", className)} {...props} />\n))\nReceiptCardContent.displayName = \"ReceiptCardContent\"\n\nexport const ReceiptCardItem = React.forwardRef<\n  HTMLDivElement,\n  React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n  <div\n    ref={ref}\n    className={cn(\"flex justify-between py-1 text-sm\", className)}\n    {...props}\n  />\n))\nReceiptCardItem.displayName = \"ReceiptCardItem\"\n\nexport const ReceiptCardTotal = React.forwardRef<\n  HTMLDivElement,\n  React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n  <div\n    ref={ref}\n    className={cn(\n      \"flex justify-between pt-4 text-lg font-bold tracking-wide uppercase\",\n      className\n    )}\n    {...props}\n  />\n))\nReceiptCardTotal.displayName = \"ReceiptCardTotal\"\n\nexport const ReceiptCardFooter = React.forwardRef<\n  HTMLDivElement,\n  React.HTMLAttributes<HTMLDivElement>\n>(({ className, ...props }, ref) => (\n  <div\n    ref={ref}\n    className={cn(\n      \"flex flex-col items-center p-6 text-center text-xs text-muted-foreground\",\n      className\n    )}\n    {...props}\n  />\n))\nReceiptCardFooter.displayName = \"ReceiptCardFooter\"\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}
