{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "ipad-02",
  "type": "registry:component",
  "title": "Apple iPad",
  "files": [
    {
      "path": "registry/designali/components/apple/ipad/ipad-02.tsx",
      "content": "\"use client\"\n\nimport { useState } from \"react\"\nimport { IPad } from \"@/registry/designali/ui/apple/ipad\"\n\ntype IPadVariant = \"ipad-air\" | \"ipad-pro\"\n\ntype IPadColor =\n  | \"blue\"\n  | \"purple\"\n  | \"space-grey\"\n  | \"starlight\"\n  | \"black\"\n  | \"silver\"\n\nconst colorOptions: Record<\n  IPadVariant,\n  { value: IPadColor; label: string }[]\n> = {\n  \"ipad-air\": [\n    { value: \"blue\", label: \"Blue\" },\n    { value: \"purple\", label: \"Purple\" },\n    { value: \"space-grey\", label: \"Space Grey\" },\n    { value: \"starlight\", label: \"Starlight\" },\n  ],\n\n  \"ipad-pro\": [\n    { value: \"black\", label: \"Space Black\" },\n    { value: \"silver\", label: \"Silver\" },\n  ],\n}\n\nexport function IPadVariantDemo() {\n  const [variant, setVariant] =\n    useState<IPadVariant>(\"ipad-air\")\n\n  const [color, setColor] =\n    useState<IPadColor>(\"blue\")\n\n  const handleVariantChange = (\n    newVariant: IPadVariant\n  ) => {\n    setVariant(newVariant)\n\n    // Reset color when switching model\n    setColor(\n      newVariant === \"ipad-air\"\n        ? \"blue\"\n        : \"black\"\n    )\n  }\n\n  return (\n    <div className=\"flex flex-col items-center justify-center gap-10 p-8\">\n\n      {/* Model Tabs */}\n      <div className=\"flex items-center gap-1 rounded-lg bg-gray-100 p-1 dark:bg-zinc-800\">\n        {(\n          [\n            {\n              value: \"ipad-air\",\n              label: \"iPad Air\",\n            },\n            {\n              value: \"ipad-pro\",\n              label: \"iPad Pro\",\n            },\n          ] as {\n            value: IPadVariant\n            label: string\n          }[]\n        ).map((option) => (\n          <button\n            key={option.value}\n            onClick={() =>\n              handleVariantChange(option.value)\n            }\n            className={`rounded-md px-5 py-2 text-sm font-medium transition-all duration-200 ${\n              variant === option.value\n                ? \"bg-white text-black shadow-sm dark:bg-zinc-950 dark:text-white\"\n                : \"text-gray-500 hover:text-gray-900 dark:text-zinc-400 dark:hover:text-zinc-100\"\n            }`}\n          >\n            {option.label}\n          </button>\n        ))}\n      </div>\n\n      {/* Color Options */}\n      <div className=\"flex flex-wrap items-center justify-center gap-2\">\n        {colorOptions[variant].map((option) => (\n          <button\n            key={option.value}\n            onClick={() =>\n              setColor(option.value)\n            }\n            className={`rounded-full border px-4 py-2 text-xs font-medium transition-all duration-200 ${\n              color === option.value\n                ? \"border-foreground bg-foreground text-background\"\n                : \"border-border bg-background text-muted-foreground hover:text-foreground\"\n            }`}\n          >\n            {option.label}\n          </button>\n        ))}\n      </div>\n\n      {/* iPad Preview */}\n      <div className=\"flex items-center justify-center\">\n        <IPad\n          variant={variant}\n          color={color}\n          \n        >\n          <iframe\n            src=\"https://design-agency.designali.com/\"\n            className=\"block size-full border-0\"\n            loading=\"lazy\"\n            allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\"\n            referrerPolicy=\"strict-origin-when-cross-origin\"\n          />\n        </IPad>\n      </div>\n\n    </div>\n  )\n}",
      "type": "registry:component"
    }
  ]
}