'use client';
import{jsxs as e,jsx as r}from"react/jsx-runtime";import{useUniqProductID as o}from"@gem-sdk/core";import{getPPCWrapperClasses as t,getPPCLabelClasses as s,getPPCWrapperClassesMain as m}from"./common/getProductPropertiesChoiceClasses.js";import{getPPCWrapperStyles as i,getPPCContainerStyles as c,getPPCLabelStyles as l,getPPCInputStyles as a}from"./common/getProductPropertiesChoiceStyles.js";import{getPPCInlineStyleChoice as d}from"./common/getProductPropertiesChoiceInlineCss.js";import{createClass as n,createStyle as p}from"@gem-sdk/system";let ProductPropertyChoice=({setting:h,styles:u,defaultName:y,currentProductId:P})=>{let C=o(),{name:$,type:f,handleChange:g,childItem:j}=h??{},{valueTextColor:v}=u??{},N=`${($||y)??""}-${P}`,k=d(y,v),x=n({...t()}),b=n({...s(u)}),F=p({...i(u)}),I=n({...m()}),S=p({...c(u)}),q=p({...l(u)}),w=p({...a(u)});return e("div",{style:F,className:I,children:[r("style",{children:k}),j?.map((o,t)=>e("div",{style:S,className:x,children:[r("input",{type:f,id:`${C}-${N}-${t}`,name:N,value:o,style:w,onChange:g}),r("label",{htmlFor:`${C}-${N}-${t}`,className:b,style:q,children:o})]},t))]})};export{ProductPropertyChoice as default};
