"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/form-email/configs/translate.js");const FormEmail=({builderProps:e,builderAttrs:s,setting:t,advanced:a,pageContext:l,styles:r})=>{let{placeholder:i,required:m,hideOnClient:c,defaultEmail:o,showTitle:n,title:y}=t??{},p=helpers.getDynamicSourceLocales({val:i,uid:e?.uid,settingId:helpers.createSettingId({id:translate.FormEmail?.placeholder?.id}),pageContext:l??{}}),u=system.createStyle(styles.composeContainerStyles(t,a)),d=system.createStyle(styles.composeInnerStyles(t,a,r)),$=system.createClass(classes.composeContainerClasses({setting:t,advanced:a,builderProps:e,type:"liquid"})),g=system.createClass(classes.composeInnerClasses(t,e)),C=system.createClass(classes.getClassTitle());return core.template`
    <div
      ${{...s}}
      data-id="${e?.uid}"
      class="${$}"
      style="${u}"
    >
      ${system.If(n,`<span className="${C}">${y}</span>`)}
      <input
        type="email"
        class="${g}"
        style="${d}"
        placeholder="${p}"
        name="${"contact[email]"}"
        ${system.If(m,"required")}
        autocomplete="email"
        ${system.If(c,`value="${o}"`)}
      ></input>
    </div>
  `};exports.default=FormEmail;
