import{composeClasses as t,template as o}from"@gem-sdk/core";import{getDynamicSourceLocales as e,createSettingId as r}from"../../../../helpers.js";import{createAttr as s,createClass as m,createStyle as i}from"@gem-sdk/system";import{getSelectAttrs as p}from"./common/attrs.js";import{getSelectStyles as l,getOptionStyles as c}from"./common/styles.js";import{getSelectClasses as d}from"./common/classes.js";import{ProductProperties as n}from"../../../settings/product-properties/configs/translate.js";let ProductPropertySelect=({setting:a,styles:f,builderProps:u,pageContext:$,attributes:g})=>{let j=u?.uid,{name:y,childItem:P}=a??{},h=s({...p(a,g)}),k=m({...d(f),...t("gp-shadow-none")}),v=i({...l(f)}),x=i({...c(f)});return o`
    <select
      ${{...h}}
      name="properties[${y}]"
      id="${j}-${y}"
      class="${k}"
      form="{{ product_form_id }}"
      style="${v}"
    >
      ${P?.map((t,s)=>{let m=e({val:t,uid:j,settingId:r({id:n?.childItem?.id,index:s}),pageContext:$??{}});return o`
            <option
              value="${m}"
              style="${x}"
            >
              ${m}
            </option>`}).join("")}
    </select>`};export{ProductPropertySelect as default};
