import{w as v}from"./vendor-vue-runtime-dom-B2rky8vu.js";import{d as h}from"./close-B3N-Pi1J.js";import{u as I}from"./appearanceStore-Cp-euDX2.js";import{_ as S}from"./ProBadge.vue_vue_type_style_index_0_lang-DqDXUf8-.js";import{u as D}from"./translationsStore-D6vLzgNA.js";import{p as g}from"./placeholder-JM22f3fS.js";import{d as O,e as _,f as t,i,x as e,t as a,z as B,j as N,F as A,r as P}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{t as q,r as w,u as s}from"./vendor-vue-reactivity-CheHbvBM.js";import{t as r,a as k}from"./vendor-vue-shared-DrzsEcag.js";import{_ as z}from"./vendor-vue3-html2pdf-KR020wX8.js";import"./vendor-pinia-BSPefQhS.js";import"./appStore-CFAkQG2b.js";import"./convert-case-to-camel-case.utils-CK5dBN7n.js";import"./vendor-html2pdf.js-B-tok4Ns.js";import"./vendor-jspdf-UFhKzYHA.js";import"./vendor-bootstrap-CCU-90um.js";import"./vendor-html2canvas-BfYXEYrK.js";const F={class:"ccb-field__label"},W={class:"ccb-field__title"},j={key:0,class:"ccb-field-required-mark"},E={key:0,class:"ccb-field__hidden"},L={key:0,class:"ccb-field__descriptions ccb-before"},M={key:0,class:"ccb-field__description"},R={class:"ccb-dropdown"},$={class:"ccb-dropdown__input"},G={key:0,class:"ccb-dropdown__label"},H=["src"],J={key:1,class:"ccb-dropdown__label"},K=["src"],Q={class:"ccb-dropdown__list"},U=["src"],X=["onClick"],Y=["src"],Z={class:"ccb-dropdown--option"},ee={class:"ccb-dropdown--option-label"},se={key:0,class:"ccb-dropdown--option-converted"},oe={key:1,class:"ccb-field__descriptions ccb-after"},te={key:0,class:"ccb-field__description"},ie=O({__name:"ImageDropdown",props:{field:{}},setup(y){const V=y,{field:o}=q(V),u=I(),d=D(),m=w(!1),C=w(null),f=_(()=>{var n;return(n=o.value.options)==null?void 0:n.map(c=>({...c}))}),p=_(()=>{const n=f.value;return n&&n.length>0?n[0]:null}),x=_(()=>o.value.additionalStyles||""),b=(n,c=!1)=>{o.value.selectedOption=c?void 0:n,m.value=!1};return(n,c)=>(i(),t("div",{class:k(["ccb-field ccb-dropdown-img-field",{active:m.value,"ccb-field-disabled":s(o).disabled,[x.value]:!0}])},[e("div",F,[e("div",W,[B(r(s(o).label),1),s(o).required?(i(),t("span",j,"*")):a("",!0),N(S)]),s(o).hidden?(i(),t("div",E,c[1]||(c[1]=[e("i",{class:"ccb-icon-ic_eye_crossed"},null,-1)]))):a("",!0)]),s(u).getAppearanceDescriptionPosition==="before"?(i(),t("div",L,[s(o).description?(i(),t("div",M,r(s(o).description),1)):a("",!0)])):a("",!0),e("div",{class:"ccb-field__input-wrapper",ref_key:"dropdownWrapper",ref:C},[e("div",R,[e("div",$,[p.value?(i(),t("div",G,[e("img",{src:p.value.src||s(g),alt:"first-option-image"},null,8,H),e("span",null,r(p.value.optionText),1)])):(i(),t("div",J,[e("img",{src:s(h),alt:"#"},null,8,K),e("span",null,r(s(d).getTranslations.selectValue),1)])),c[2]||(c[2]=e("span",{class:"ccb-dropdown__icon"},[e("i",{class:"ccb-icon-Path-3485"})],-1))]),e("div",Q,[e("ul",null,[e("li",{onClick:c[0]||(c[0]=v(()=>b(void 0,!0),["prevent"]))},[e("img",{src:s(h),alt:""},null,8,U),e("span",null,r(s(d).getTranslations.selectValue),1)]),(i(!0),t(A,null,P(f.value,(l,T)=>(i(),t("li",{key:l.optionValue,onClick:v(()=>b(l),["prevent"]),class:k({"ccb-option-disabled":s(o).disableOptions.includes(T)})},[e("img",{src:l.src||s(g),alt:"#"},null,8,Y),e("span",Z,[e("span",ee,r(l.optionText),1),s(o).showValueInOption?(i(),t("span",se,r(s(d).getTranslations.price)+": "+r(l.optionConverted),1)):a("",!0)])],10,X))),128))])])])],512),s(u).getAppearanceDescriptionPosition==="after"?(i(),t("div",oe,[s(o).description?(i(),t("div",te,r(s(o).description),1)):a("",!0)])):a("",!0)],2))}}),ye=z(ie,[["__scopeId","data-v-480855e5"]]);export{ye as default};
//# sourceMappingURL=ImageDropdown-Ccm52v-o.js.map
