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