import{u as S}from"./widget-BUAABBRb.js";import{c as V}from"./color-filter.utils-DukMf1cu.js";import{C as _,k as $,b as r,o as h}from"./convert-case-to-camel-case.utils-DDUpNI96.js";function b(i,p){const{options:g,alias:u,current:o,repeater:n}=_(i),a=$(""),v=()=>{var t;const e=(t=g.value)==null?void 0:t.find(l=>{var c;return l.optionValue===((c=a.value)==null?void 0:c.toString())});p("update",e)},s=()=>Math.random().toString(36).substring(2,15),d=r(()=>typeof(n==null?void 0:n.value)<"u"?`repeater_${n.value}_${u.value}_${s()}`:`${u.value}_${s()}`),f=r(()=>e=>((e==null?void 0:e.optionValue)||"").split("_")[0]||0),m=r(()=>{const e=(a.value||"").split("_")[1];return e?+e:""}),C=r(()=>{const e=S(),t=e.getAppearanceAccentColor;return e.getAppearanceSvgColor&&t?V(t):{}});return h(()=>{var e;o!=null&&o.value&&(a.value=((e=o.value)==null?void 0:e.optionValue)||"")}),{optionValues:a,changeValue:v,getName:d,current:o,getPriceValue:f,getCurrentIndex:m,getImageStyles:C}}export{b as u};
//# sourceMappingURL=useSingleOptionChildShared-BHJplqM1.js.map
