'use client';
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),system=require("@gem-sdk/system"),styles=require("./common/styles.js"),classes=require("./common/classes.js");const TextInput=({setting:e,builderProps:s,className:t,builderAttrs:a,advanced:l,children:r,styles:m})=>{let{text:c,name:i,placeholder:o,required:n,formType:u}=e??{},y=i?.[u??"text"]===""||void 0===i?"contact[first_name]":i?.[u??"text"],x=system.createStyle(styles.composeContainerStyles(l,e)),d=system.createClass(classes.composeContainerClasses(l,s)),p=system.createClass(classes.composeTextFieldClasses(e,s,t??"")),j=system.createStyle(styles.composeTextareaStyles(l,e,m)),C=system.createClass({composedTextFieldClasses:!0}),v=styles.getRowsTextArea(e),q="textarea"===u;return jsxRuntime.jsx("div",{...a,"data-id":s?.uid,className:d,style:x,children:jsxRuntime.jsxs("div",{children:[system.If(!q,jsxRuntime.jsx("input",{type:u,className:p,style:j,placeholder:o,required:n,name:y,value:c}),jsxRuntime.jsx("textarea",{rows:v,className:C,placeholder:o,style:j,required:n,name:y,value:c})),r]})})};exports.default=TextInput;
