"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),t=require("react"),e=require("../index-DEZRGktf.js"),h=require("lucide-react");require("react-router-dom");require("react-dom");const g=()=>{const[r,i]=t.useState(""),[d,n]=t.useState("a"),c=[{label:"Primary",color:"primary"},{label:"Secondary",color:"secondary"},{label:"Danger",color:"danger"},{label:"Info",color:"info"},{label:"Success",color:"success"},{label:"Warning",color:"warning"}],m=[{label:"Small",size:"sm"},{label:"Medium",size:"md"},{label:"Large",size:"lg"},{label:"Extra Large",size:"xl"}];return a.jsxs(a.Fragment,{children:[a.jsx(e.HeroCard,{title:"Radio",description:"A single radio button component for binary choices.",icon:a.jsx("div",{className:"w-20 h-20 sm:w-24 sm:h-24 md:w-32 md:h-32 bg-linear-to-br from-violet-500 via-purple-500 to-fuchsia-500 rounded-full flex items-center justify-center shadow-lg border border-violet-500/50",children:a.jsx(h.Circle,{className:"w-10 h-10 sm:w-12 sm:h-12 md:w-16 md:h-16 text-white filter drop-shadow-lg"})})}),a.jsx(e.CardContainer,{className:"overflow-hidden",children:a.jsx(e.CardTitle,{title:"Examples",className:"mt-2 mb-2",children:a.jsx("div",{className:"w-full p-4 sm:p-6",children:a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[a.jsxs(e.CardContainer,{className:"p-4",children:[a.jsx(e.Typography,{tag:"h5",className:"mb-3",children:"Basic Radio"}),a.jsx(e.Radio,{label:"Option 1",value:"option1",checked:r==="option1",onChange:l=>i(l.target.value)})]}),a.jsxs(e.CardContainer,{className:"p-4",children:[a.jsx(e.Typography,{tag:"h5",className:"mb-3",children:"Disabled"}),a.jsx(e.Radio,{label:"Disabled option",value:"disabled",disabled:!0})]})]})})})}),a.jsx(e.CardContainer,{className:"overflow-hidden",children:a.jsx(e.CardTitle,{title:"Variants",className:"mt-2 mb-2",children:a.jsx("div",{className:"w-full p-4 sm:p-6",children:a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[a.jsxs(e.CardContainer,{className:"p-4",children:[a.jsx(e.Typography,{tag:"h5",className:"mb-3",children:"Ghost (default)"}),a.jsx(e.Radio,{label:"Ghost Variant",value:"ghost",variant:"ghost",checked:r==="ghost",onChange:l=>i(l.target.value)})]}),a.jsxs(e.CardContainer,{className:"p-4",children:[a.jsx(e.Typography,{tag:"h5",className:"mb-3",children:"Solid"}),a.jsx(e.Radio,{label:"Solid Variant",value:"solid",variant:"solid",checked:r==="solid",onChange:l=>i(l.target.value)})]}),a.jsxs(e.CardContainer,{className:"p-4",children:[a.jsx(e.Typography,{tag:"h5",className:"mb-3",children:"Transparent"}),a.jsx(e.Radio,{label:"Transparent Variant",value:"transparent",variant:"transparent",checked:r==="transparent",onChange:l=>i(l.target.value)})]})]})})})}),a.jsx(e.CardContainer,{className:"overflow-hidden",children:a.jsx(e.CardTitle,{title:"Colors",className:"mt-2 mb-2",children:a.jsx("div",{className:"w-full p-4 sm:p-6",children:a.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 xl:grid-cols-3",children:c.map(({label:l,color:s})=>a.jsxs(e.CardContainer,{className:"p-4",children:[a.jsx(e.Typography,{tag:"h5",className:"mb-3",children:l}),a.jsx(e.Radio,{label:`${l} Radio`,value:s,color:s})]},s))})})})}),a.jsx(e.CardContainer,{className:"overflow-hidden",children:a.jsx(e.CardTitle,{title:"Sizes",className:"mt-2 mb-2",children:a.jsx("div",{className:"w-full p-4 sm:p-6",children:a.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-4",children:m.map(({label:l,size:s})=>a.jsxs(e.CardContainer,{className:"p-4",children:[a.jsx(e.Typography,{tag:"h5",className:"mb-3",children:l}),a.jsx(e.Radio,{label:`${l} Radio`,value:s,size:s})]},s))})})})}),a.jsx(e.PropPlayground,{componentName:"Radio",defaultValues:{label:"Preview Radio",variant:"ghost",color:"primary",size:"md",disabled:!1,labelPlacement:"end"},includeProps:["label","variant","color","size","disabled","labelPlacement"],excludeProps:["checked","onChange","value"],children:l=>{const s=typeof l.label=="string"&&l.label.length>0?l.label:"Preview Radio";return a.jsxs("div",{className:"space-y-3",children:[a.jsx(e.Radio,{...l,label:`${s} A`,value:"a",checked:d==="a",onChange:o=>n(o.target.value)}),a.jsx(e.Radio,{...l,label:`${s} B`,value:"b",checked:d==="b",onChange:o=>n(o.target.value)})]})}}),a.jsx(e.AutoPropsTable,{componentName:"Radio"}),a.jsx(e.CardContainer,{className:"overflow-hidden",children:a.jsx(e.CardTitle,{title:"Code Example",className:"mt-2 mb-2",children:a.jsx("div",{className:"w-full p-4 sm:p-6",children:a.jsx(e.CodeBlock,{language:"tsx",code:`import { Radio } from '@e-burgos/tucu-ui';

<Radio
  label="Option 1"
  value="option1"
  checked={value === 'option1'}
  onChange={(e) => setValue(e.target.value)}
/>

// Variants
<Radio label="Ghost" variant="ghost" value="ghost" />
<Radio label="Solid" variant="solid" value="solid" />
<Radio label="Transparent" variant="transparent" value="transparent" />

// Colors
<Radio label="Primary" color="primary" />
<Radio label="Secondary" color="secondary" />
<Radio label="Danger" color="danger" />
<Radio label="Info" color="info" />
<Radio label="Success" color="success" />
<Radio label="Warning" color="warning" />

// Sizes
<Radio label="Small" size="sm" />
<Radio label="Medium" size="md" />
<Radio label="Large" size="lg" />
<Radio label="Extra Large" size="xl" />`})})})})]})};exports.default=g;
