{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "input-otp-4",
  "type": "registry:component",
  "title": "Input OTP 4",
  "description": "Input OTP 4. A set of input fields designed to capture one-time passwords (OTP) or verification codes, typically split into individual boxes for better UX and security.",
  "dependencies": [],
  "registryDependencies": [
    "input-otp",
    "label"
  ],
  "files": [
    {
      "path": "components/watermelon/input-otp-4.tsx",
      "type": "registry:component",
      "content": "'use client';\n\nimport { useId } from 'react';\n\nimport {\n  InputOTP,\n  InputOTPGroup,\n  InputOTPSlot,\n} from '@/components/base-ui/input-otp';\nimport { Label } from '@/components/base-ui/label';\n\nconst InputOtp4 = () => {\n  const id = useId();\n\n  const handleResend = () => {\n    // trigger resend logic here\n  };\n\n  return (\n    <div className=\"space-y-2\">\n      <div className=\"leading-tight\">\n        <Label htmlFor={id} className=\"text-sm font-semibold\">\n          Enter verification code\n        </Label>\n        <p className=\"text-muted-foreground text-xs\">\n          We’ve sent a 4-digit code to your device\n        </p>\n      </div>\n\n      <InputOTP id={id} maxLength={4} className=\"w-full\">\n        <InputOTPGroup className=\"flex justify-center\">\n          {[0, 1, 2, 3].map((i) => (\n            <InputOTPSlot\n              key={i}\n              index={i}\n              className=\"data-[active=true]:ring-primary/30! data-[active=true]:border-primary/50 bg-muted/50 dark:bg-muted/50 h-14 w-14 border text-lg\"\n            />\n          ))}\n        </InputOTPGroup>\n      </InputOTP>\n\n      <div className=\"flex items-center text-sm\">\n        <button\n          onClick={handleResend}\n          className=\"text-primary font-medium transition hover:underline\"\n        >\n          Resend\n        </button>\n      </div>\n    </div>\n  );\n};\n\nexport default InputOtp4;\n\n// shadow-[inset_0px_1px_0px_0px_rgba(255,255,255,1),inset_0px_-1px_0px_0px_rgba(0,0,0,0.05)] data-[active=true]:ring-2! dark:shadow-[inset_0px_1px_0px_0px_rgba(255,255,255,0.1),inset_0px_-1px_0px_0px_rgba(0,0,0,0.2)]\n"
    }
  ]
}
