{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "storefront-collection",
  "title": "Storefront Collection",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-native/blocks/storefront-collection/StorefrontCollection.tsx",
      "content": "import { Pressable, useWindowDimensions, View, type ViewProps } from 'react-native'\nimport { Grid, GridItem } from '@/components/ui/grid'\nimport { Image, ImageFallback, ImageSource, type ImageSourceValue } from '@/components/ui/image'\nimport { Text } from '@/components/ui/text'\nimport { cn } from '@/lib/utils'\n\nexport interface StorefrontProduct {\n  id: string\n  title: string\n  detail?: string\n  /** Caller-localized price. */\n  price?: string\n  image?: ImageSourceValue\n  soldOut?: boolean\n}\n\nexport interface StorefrontCollectionProps extends Omit<ViewProps, 'children'> {\n  className?: string\n  title: string\n  /** Bounded collection; page or replace items at the parent for long result sets. */\n  items?: readonly StorefrontProduct[]\n  labels?: Partial<Record<'soldOut' | 'empty' | 'photoUnavailable' | 'openHint', string>>\n  onOpen: (productId: string) => void\n}\n\nexport function StorefrontCollection({\n  className,\n  title,\n  items = [],\n  labels,\n  onOpen,\n  ...props\n}: StorefrontCollectionProps) {\n  const { fontScale } = useWindowDimensions()\n\n  return (\n    <View {...props} className={cn('gap-[16px]', className)}>\n      <Text size=\"title\" accessibilityRole=\"header\">\n        {title}\n      </Text>\n      {items.length > 0 ? (\n        <Grid minColumnWidth={132} maxColumns={fontScale >= 1.5 ? 1 : 3} gap={16}>\n          {items.map(({ id, title, detail, price, image, soldOut }) => {\n            const availability = soldOut ? (labels?.soldOut ?? 'Sold out') : undefined\n            return (\n              <GridItem key={id}>\n                <Pressable\n                  accessibilityRole=\"button\"\n                  accessibilityLabel={[title, detail, price, availability].filter(Boolean).join(', ')}\n                  accessibilityHint={labels?.openHint ?? 'Opens product details'}\n                  className=\"min-h-[48px] gap-[8px] rounded-lg border border-transparent p-px focus:border-ring active:bg-muted\"\n                  onPress={() => onOpen(id)}\n                >\n                  <Image\n                    source={image}\n                    style={{ aspectRatio: 1 }}\n                    className=\"rounded-md\"\n                    accessibilityElementsHidden\n                    importantForAccessibility=\"no-hide-descendants\"\n                  >\n                    <ImageSource accessible={false} />\n                    <ImageFallback>\n                      <Text size=\"sm\" variant=\"muted\" className=\"text-center\">\n                        {labels?.photoUnavailable ?? 'Photo unavailable'}\n                      </Text>\n                    </ImageFallback>\n                  </Image>\n                  <View aria-hidden className=\"gap-[4px] px-[4px] pb-[4px]\">\n                    <Text className=\"font-semibold\">{title}</Text>\n                    {detail ? (\n                      <Text size=\"sm\" variant=\"muted\">\n                        {detail}\n                      </Text>\n                    ) : null}\n                    {price ? <Text size=\"sm\">{price}</Text> : null}\n                    {availability ? (\n                      <Text size=\"sm\" variant=\"muted\">\n                        {availability}\n                      </Text>\n                    ) : null}\n                  </View>\n                </Pressable>\n              </GridItem>\n            )\n          })}\n        </Grid>\n      ) : (\n        <Text variant=\"muted\">{labels?.empty ?? 'No products to show.'}</Text>\n      )}\n    </View>\n  )\n}\n",
      "type": "registry:block",
      "target": "~/components/blocks/storefront-collection/StorefrontCollection.tsx"
    },
    {
      "path": "packages/registry-native/blocks/storefront-collection/index.ts",
      "content": "export { StorefrontCollection, type StorefrontCollectionProps, type StorefrontProduct } from './StorefrontCollection'\n",
      "type": "registry:block",
      "target": "~/components/blocks/storefront-collection/index.ts"
    }
  ],
  "dependencies": [],
  "devDependencies": [],
  "registryDependencies": [
    "https://native.uipkge.dev/r/native/grid.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 responsive native product grid with availability, photos and caller-owned product selection.",
  "categories": [
    "commerce"
  ]
}