{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "proof-of-delivery",
  "title": "Proof Of Delivery",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-native/blocks/proof-of-delivery/ProofOfDelivery.tsx",
      "content": "import { useWindowDimensions, View, type ViewProps } from 'react-native'\nimport { Button } from '@/components/ui/button'\nimport {\n  Image,\n  ImageFallback,\n  ImageLoading,\n  ImageRetry,\n  ImageSource,\n  type ImageSourceValue,\n} from '@/components/ui/image'\nimport { Text } from '@/components/ui/text'\nimport { cn } from '@/lib/utils'\n\nexport type DeliveryProof =\n  | { kind: 'photo'; source: ImageSourceValue; description: string; location?: string }\n  | { kind: 'signed'; recipient: string; location?: string }\n  | { kind: 'unavailable'; reason?: string }\n\nexport interface ProofOfDeliveryProps extends ViewProps {\n  className?: string\n  title?: string\n  deliveredAt?: string\n  proof?: DeliveryProof\n  onReportIssue?: () => void\n}\n\nconst sampleProof: DeliveryProof = { kind: 'signed', recipient: 'Sam Rivera', location: 'Building reception' }\n\nexport function ProofOfDelivery({\n  className,\n  title = 'Proof of delivery',\n  deliveredAt = 'today, 1:46 PM',\n  proof = sampleProof,\n  onReportIssue,\n  ...props\n}: ProofOfDeliveryProps) {\n  const { fontScale } = useWindowDimensions()\n  return (\n    <View {...props} className={cn('gap-4', className)}>\n      <View className=\"gap-1\">\n        <Text size=\"title\" accessibilityRole=\"header\">\n          {title}\n        </Text>\n        <Text size=\"sm\" variant=\"muted\">\n          Delivered {deliveredAt}\n        </Text>\n      </View>\n      <View className=\"gap-3 rounded-xl border border-border bg-card p-4\">\n        {proof.kind === 'photo' ? (\n          <>\n            <Text className=\"font-semibold\">Delivery photo</Text>\n            <Image source={proof.source} style={fontScale >= 1.5 ? { aspectRatio: 4 / 3 } : undefined}>\n              <ImageSource accessibilityLabel={proof.description} accessibilityRole=\"image\" resizeMode=\"contain\" />\n              <ImageLoading />\n              <ImageFallback accessibilityLiveRegion=\"polite\">\n                <Text size=\"sm\" className=\"text-center\">\n                  The photo couldn’t load.\n                </Text>\n                <ImageRetry>Retry photo</ImageRetry>\n              </ImageFallback>\n            </Image>\n            {proof.location ? (\n              <Text size=\"sm\" variant=\"muted\">\n                {proof.location}\n              </Text>\n            ) : null}\n          </>\n        ) : proof.kind === 'signed' ? (\n          <View className=\"gap-1\">\n            <Text size=\"sm\" variant=\"muted\">\n              Signed for by\n            </Text>\n            <Text className=\"font-semibold\">{proof.recipient}</Text>\n            {proof.location ? <Text size=\"sm\">{proof.location}</Text> : null}\n          </View>\n        ) : (\n          <View className=\"gap-1\">\n            <Text className=\"font-semibold\">No delivery proof available</Text>\n            <Text size=\"sm\" variant=\"muted\">\n              {proof.reason ?? 'The carrier marked this shipment delivered without a photo or signature.'}\n            </Text>\n          </View>\n        )}\n      </View>\n      {onReportIssue ? (\n        <Button variant=\"outline\" onPress={onReportIssue}>\n          Report a delivery issue\n        </Button>\n      ) : null}\n    </View>\n  )\n}\n",
      "type": "registry:block",
      "target": "~/components/blocks/proof-of-delivery/ProofOfDelivery.tsx"
    },
    {
      "path": "packages/registry-native/blocks/proof-of-delivery/index.ts",
      "content": "export { ProofOfDelivery, type DeliveryProof, type ProofOfDeliveryProps } from './ProofOfDelivery'\n",
      "type": "registry:block",
      "target": "~/components/blocks/proof-of-delivery/index.ts"
    }
  ],
  "dependencies": [],
  "devDependencies": [],
  "registryDependencies": [
    "https://native.uipkge.dev/r/native/button.json",
    "https://native.uipkge.dev/r/native/image.json",
    "https://native.uipkge.dev/r/native/text.json",
    "https://native.uipkge.dev/r/native/utils.json"
  ],
  "description": "A delivered shipment receipt with photo retry, signature and missing-proof states, and a support action.",
  "categories": [
    "tracking"
  ]
}