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