import{n as e}from"./rolldown-runtime-C0FnF6B9.js";import{n as t}from"./iframe-GrlyTB2d.js";import{a as n,i as r}from"./utils-DUM89eIj.js";import{n as i,t as a}from"./ui.module-CiLQZm_L.js";import{d as o,l as s,s as c,u as l}from"./Input-DI_ErAU0.js";var u,d;function f(){return(f=e((()=>{u=`TjY2iu`,d={textarea:u}})))()}function p({label:e,description:t,className:r,disabled:a,size:s,value:l,onChange:u,error:f,onClearError:p,id:h,...g}){let{controlId:_,labelId:v,descriptionId:y,errorId:b,describedBy:x}=o({id:h,hasLabel:e!=null,hasDescription:!!t,hasError:!!f});return(0,m.jsx)(c,{label:e,description:t,disabled:a,required:g.required,size:s,error:f,controlId:_,labelId:v,descriptionId:y,errorId:b,children:(0,m.jsx)(`textarea`,{...g,id:_,disabled:a,value:l,"aria-invalid":!!f||void 0,"aria-labelledby":v,"aria-describedby":x,"data-invalid":f?``:void 0,className:n(i.uiControl,d.textarea,`scrollable`,r),onChange:e=>{u?.(e.target.value),f&&p&&p()}})})}var m;function h(){return(h=e((()=>{r(),s(),l(),a(),f(),m=t(),p.__docgenInfo={description:`Многострочное текстовое поле для ввода свободного текста. Поддерживает подпись, описание, ошибки и единый визуальный стиль формы.`,methods:[],displayName:`Textarea`,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:``},error:{required:!1,tsType:{name:`string`},description:``},onClearError:{required:!1,tsType:{name:`signature`,type:`function`,raw:`() => void`,signature:{arguments:[],return:{name:`void`}}},description:``}},composes:[`Omit`]}})))()}export{h as n,p as t};