'use client';
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{createStyle as s,createClass as a,If as r}from"@gem-sdk/system";import{composeContainerStyles as m,composeTextareaStyles as l,getRowsTextArea as o}from"./common/styles.js";import{composeContainerClasses as i,composeTextFieldClasses as d}from"./common/classes.js";let TextInput=({setting:c,builderProps:n,className:p,builderAttrs:u,advanced:x,children:f,styles:y})=>{let{text:v,name:h,placeholder:j,required:N,formType:T}=c??{},q=h?.[T??"text"]===""||void 0===h?"contact[first_name]":h?.[T??"text"],I=s(m(x,c)),g=a(i(x,n)),k=a(d(c,n,p??"")),w=s(l(x,c,y)),C=a({composedTextFieldClasses:!0}),F=o(c),_="textarea"===T;return e("div",{...u,"data-id":n?.uid,className:g,style:I,children:t("div",{children:[r(!_,e("input",{type:T,className:k,style:w,placeholder:j,required:N,name:q,value:v}),e("textarea",{rows:F,className:C,placeholder:j,style:w,required:N,name:q,value:v})),f]})})};export{TextInput as default};
