import{n as e,o as t}from"./rolldown-runtime-C0FnF6B9.js";import{t as n}from"./react-C21x__mS.js";import{i as r,n as i,r as a}from"./iframe-GrlyTB2d.js";import{a as o,i as s}from"./utils-DUM89eIj.js";import{n as c,t as l}from"./ui.module-CiLQZm_L.js";import{i as u,r as d}from"./uiClasses-DiXn3Hc-.js";import{n as f,t as p}from"./CheckBox.module-BNQm6HXI.js";var m,h;function g(){return(g=e((()=>{r(),m=[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]],h=a(`circle`,m)})))()}var _,v;function y(){return(y=e((()=>{_=`gu8UMB`,v={radioInput:_}})))()}var b,x,S;function C(){return(C=e((()=>{b=t(n(),1),s(),g(),f(),l(),u(),y(),x=i(),S=({label:e,description:t,placeholder:n,disabled:r,size:i,className:a,onChange:s,value:l,id:u,tone:f=`neutral`,...m})=>{let g=(0,b.useId)(),_=u??g,y=t?`${_}-description`:void 0,S=e??n,C=l??!1;return(0,x.jsxs)(`div`,{className:o(c.uiElement,i&&c.uiSizable,i&&c[i],r&&c.disabled,a),children:[(0,x.jsxs)(`div`,{className:p.row,children:[(0,x.jsxs)(`div`,{className:o(p.wrapper,d(f)),children:[(0,x.jsx)(`input`,{...m,id:_,type:`radio`,checked:C,disabled:r,"aria-disabled":r,"aria-describedby":y,className:o(c.uiSelectionControl,p.input,v.radioInput),onChange:e=>s?.(e.currentTarget.checked)}),(0,x.jsx)(`div`,{className:o(c.uiSelectionIcon,p.icon),"aria-hidden":`true`,children:(0,x.jsx)(h,{fill:`currentColor`})})]}),S&&(0,x.jsx)(`label`,{htmlFor:_,className:c.uiLabel,children:S})]}),t&&(0,x.jsx)(`p`,{id:y,className:c.uiDescription,children:t})]})},S.__docgenInfo={description:'Компонент радиокнопки для выбора одного варианта.\nНативный `input[type="radio"]` обеспечивает взаимоисключение элементов с\nобщим `name`, а controlled API продолжает публиковать булево состояние.\nПоддерживает tone + appearance и использует общие selection utility-классы из ui.module.scss.',methods:[],displayName:`RadioButton`,props:{label:{required:!1,tsType:{name:`ReactNode`},description:``},description:{required:!1,tsType:{name:`string`},description:``},placeholder:{required:!1,tsType:{name:`string`},description:``},disabled:{required:!1,tsType:{name:`boolean`},description:``},size:{required:!1,tsType:{name:`union`,raw:`"xs" | "sm" | "md" | "lg" | "xl"`,elements:[{name:`literal`,value:`"xs"`},{name:`literal`,value:`"sm"`},{name:`literal`,value:`"md"`},{name:`literal`,value:`"lg"`},{name:`literal`,value:`"xl"`}]},description:``},value:{required:!0,tsType:{name:`V`},description:"Если начальное состояние может быть `null | undefined`\nзначит `onChange` тоже должен ументь сбрасывать.\nПоэтому такой контрол явно должен передавать `UiBaseProps<AnyType | undefined>`"},onChange:{required:!0,tsType:{name:`signature`,type:`function`,raw:`(value: T) => void`,signature:{arguments:[{type:{name:`C`},name:`value`}],return:{name:`void`}}},description:``},tone:{required:!1,tsType:{name:`union`,raw:`"neutral" | "brand" | "error" | "warning" | "success" | "info"`,elements:[{name:`literal`,value:`"neutral"`},{name:`literal`,value:`"brand"`},{name:`literal`,value:`"error"`},{name:`literal`,value:`"warning"`},{name:`literal`,value:`"success"`},{name:`literal`,value:`"info"`}]},description:``,defaultValue:{value:`"neutral"`,computed:!1}}},composes:[`Omit`]}})))()}export{C as n,S as t};