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