import{c as A}from"./color-filter.utils-DukMf1cu.js";import{u as w}from"./appearanceStore-Cp-euDX2.js";import{t as O,r}from"./vendor-vue-reactivity-CheHbvBM.js";import{w as V,e as n,a as C}from"./vendor-vue-runtime-core-DwK6Ry68.js";function I(s,p){const{field:o,values:u}=O(s),a=r([]);V(()=>s.values,e=>{a.value=e});const l=r(o.value.repeaterIdx),c=r(o.value.alias),v=n(()=>typeof(l==null?void 0:l.value)<"u"?`repeater_${l.value}_${c.value}`:c.value),m=()=>{const e=a.value.length,t=Number(o.value.maxAllowedOptions);Number.isFinite(t)&&t>0&&e>t&&a.value.shift();const i=Object.values(a.value).join(",");p("update",i)},f=n(()=>e=>((e==null?void 0:e.optionValue)||"").split("_")[0]||0),d=n(()=>{var e;return((e=o.value.selectedOption)==null?void 0:e.map(t=>t.optionValue))||[]}),g=n(()=>{const e=w(),t=e.getAppearanceAccentColor;return e.getAppearanceSvgColor&&t?A(t):{}}),h=n(()=>o.value.showValueInOption||!1);return C(()=>{Array.isArray(u.value)&&(a.value=u.value)}),{optionValues:a,changeValue:m,getName:v,getPriceValue:f,selectedOptions:d,getImageStyles:g,showPrice:h}}export{I as u};
//# sourceMappingURL=useMultiOptionChildShared-CiaLWBcL.js.map
