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