"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("../../../helpers.js"),s=require("@gem-sdk/system"),a=require("./common/styles.js"),r=require("./common/classes.js"),l=require("../../settings/text-input/configs/translate.js");exports.default=({setting:i,builderProps:o,className:c,builderAttrs:d,advanced:n,pageContext:u,styles:p})=>{let{text:m,name:$,placeholder:x,required:y,formType:v}=i??{},g=$?.[v??"text"]===""||void 0===$?"contact[first_name]":$?.[v??"text"],C=t.getDynamicSourceLocales({val:x,uid:o?.uid,settingId:t.createSettingId({id:l.TextInput?.placeholder?.id}),pageContext:u??{}}),q=s.createStyle(a.composeContainerStyles(n,i)),f=s.createClass(r.composeContainerClasses(n,o)),I=s.createClass(r.composeTextFieldClasses(i,o,c??"")),S=s.createStyle(a.composeTextareaStyles(n,i,p)),j=s.createClass({composedTextFieldClasses:!0}),T=a.getRowsTextArea(i),h="textarea"===v;return e.template`
    <div
      ${d}
      data-id="${o?.uid}"
      class="${f}"
      style="${q}"
    >
      <div>
        ${s.If(!h,e.template`<input
            type="text"
            class="${I}"
            style="${S}"
            placeholder="${C}"
            ${s.If(y,"required")}
            name="${g}"
            value="${m}"
          ></input>`,e.template`<textarea
            rows="${T}"
            class="${j}"
            style="${S}"
            placeholder="${C}"
            ${s.If(y,"required")}
            name="${g}"
            value="${m}"
          ></textarea>`)}
      </div>
    </div>
  `};
