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