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