"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@gem-sdk/core"),t=require("../../../../helpers.js"),r=require("@gem-sdk/system"),s=require("./common/classes.js"),a=require("./common/styles.js"),o=require("./common/helpers.js"),i=require("./common/attrs.js"),l=require("../../../settings/product-properties/configs/translate.js");exports.default=({setting:u,styles:n,builderProps:m,pageContext:c,attributes:p})=>{let{name:d,type:g,placeholder:$,required:h,minChar:q,maxChar:y,label:j}=u??{minChar:Number,maxChar:Number},x="textarea"===g?"textarea":"input",C=t.getDynamicSourceLocales({val:$,uid:m?.uid,settingId:t.createSettingId({id:l.ProductProperties?.placeholder?.id}),pageContext:c??{}}),f=`${C}${$&&h&&!j?" *":""}`,v=r.createClass({...s.getClasses(n),...e.composeClasses("gp-shadow-none group-data-[invalid=true]:gp-border-[#F44336]")}),b=r.createStyle({...a.getStyles(n)}),{elementValue:S}=o.getElementContent(u),_=r.createAttr({...i.getInputAttrs(p)});return e.template`
    <${x}
      ${{..._}}
      type="${g}"
      placeholder="${f}"
      name="properties[${d}]"
      form="{{ product_form_id }}"
      value="${S}"
      class="${v}"
      style="${b}"
      ${h?`required="${h}"`:""}
      minlength="${q}"
      maxlength="${y}"
    ></${x}>
    `};
