"use strict";const r=require("./jsx-runtime-CITbqOLs.cjs"),e=require("./main-2qH2bggR.cjs"),n=require("./css-CmXY6iPo.cjs");require("./eraser-C1jjA5cv.cjs");require("react");require("react-dom");const T=t=>r.jsxRuntimeExports.jsx(e.Boolean,{inputType:"checkbox",...t}),d=({className:t,variant:a,...s})=>r.jsxRuntimeExports.jsx(e.Text,{className:n.CSS(n.CSS.B("input-help-text"),t),color:8,status:n.xr.removeVariants(a,"success"),level:"small",...s}),R=({className:t,required:a=!1,children:s,...l})=>r.jsxRuntimeExports.jsxs("label",{className:n.CSS(n.CSS.B("input-label"),t),...l,children:[s," ",a&&r.jsxRuntimeExports.jsx("span",{className:n.CSS.B("required-indicator"),children:"*"})]}),b=(t,a="y")=>t??(n.p.construct(a)==="y"?"stretch":"center"),f=({label:t,showLabel:a=!0,helpText:s,direction:l,x:o,y:x,className:m,children:u,required:S,align:g,gap:C="small",padHelpText:c=!1,status:i,showHelpText:h=!0,...B})=>{const j=e.parseDirection(l,o,x,!1);let p;const D=h&&s!=null&&s.length>0,E=a&&t!=null&&t.length>0;return!D&&!E?r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:u}):(j==="x"?p=r.jsxRuntimeExports.jsxs(e.Box,{y:!0,gap:"small",children:[u,h&&(c||s!=null&&s.length>0)&&r.jsxRuntimeExports.jsx(d,{variant:i,children:s})]}):p=r.jsxRuntimeExports.jsxs(e.Box,{y:!0,gap:1/3,align:"stretch",children:[u,(c||s!=null&&s.length>0)&&r.jsxRuntimeExports.jsx(d,{variant:i,children:s})]}),r.jsxRuntimeExports.jsxs(e.Box,{className:n.CSS(n.CSS.BE("input","item"),m),direction:j,gap:C,align:b(g,j),...B,children:[E&&r.jsxRuntimeExports.jsx(R,{required:S,children:t}),p]}))},y=({ref:t,value:a,style:s,onChange:l,className:o,onFocus:x,selectOnFocus:m=!1,variant:u="outlined",sharp:S=!1,children:g,wrap:C,...c})=>r.jsxRuntimeExports.jsx("textarea",{style:s,className:n.CSS(n.CSS.B("textarea"),n.CSS.BM("textarea",u),n.CSS.sharp(S),o),ref:t,value:a,onChange:i=>l(i.target.value.replace(/\n/g,"")),onFocus:i=>{m&&i.target.select(),x?.(i)},...c}),q=Object.freeze(Object.defineProperty({__proto__:null,Calendar:e.Calendar,Checkbox:T,Date:e.Date,DateTime:e.DateTime$1,DragButton:e.DragButton,HelpText:d,Item:f,Label:R,Numeric:e.Numeric,Switch:e.Switch$1,Text:e.Text$2,TextArea:y,Time:e.Time,TimeSelector:e.TimeSelector,combineDateAndTimeValue:e.combineDateAndTimeValue,createTimeList:e.createTimeList,useDate:e.useDate,useTime:e.useTime},Symbol.toStringTag,{value:"Module"}));exports.Item=f;exports.external=q;
