import{w as b}from"./vendor-vue-runtime-dom-B2rky8vu.js";import{u as g}from"./useOrderFormDropdown-CHNt9hBN.js";import{s as V,l as C}from"./fieldsStore-CNpVuoPu.js";import{u as h}from"./translationsStore-D6vLzgNA.js";import{d as B,e as T,a as x,f as a,i as l,x as r,t as F,F as D,r as S}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{t as A,r as L,u as t}from"./vendor-vue-reactivity-CheHbvBM.js";import{t as i}from"./vendor-vue-shared-DrzsEcag.js";import"./vendor-pinia-BSPefQhS.js";import"./settingsStore-8bwiLMEn.js";import"./convert-case-to-camel-case.utils-CK5dBN7n.js";import"./appStore-CFAkQG2b.js";import"./vendor-moment-Cv92BTSA.js";import"./vendor-bootstrap-CCU-90um.js";import"./vendor-jspdf-UFhKzYHA.js";import"./vendor-php-date-formatter-DSpPwBF8.js";import"./callbackStore-BhxBUA6V.js";const M={class:"ccb-order-dropdown"},N={key:0,class:"ccb-dropdown__label"},O={key:1,class:"ccb-order-dropdown__label"},W={class:"ccb-order-dropdown__list"},$=["onClick"],ee=B({__name:"Default",props:{field:{}},emits:["toggle"],setup(w,{emit:k}){const y=k,d=w,{field:e}=A(d),c=L(null),{toggleBody:p}=g(d,y,c),u=h(),m=T(()=>V(e.value.value||"")),_=s=>{e.value.value=s,p();const{updateValue:o}=C();o(e.value.id,e.value.value)};return x(()=>{var s;Array.isArray((s=e.value)==null?void 0:s.value)&&(e.value.value=e.value.value[0])}),(s,o)=>{var f;return l(),a("div",{class:"ccb-field__input-wrapper",ref_key:"dropdownWrapper",ref:c},[r("div",M,[r("div",{class:"ccb-order-dropdown__input",onClick:o[0]||(o[0]=(...n)=>t(p)&&t(p)(...n))},[m.value.length?(l(),a("span",O,i(m.value),1)):(l(),a("span",N,i(t(e).placeholder?t(e).placeholder:t(u).getTranslations.selectValue),1)),o[2]||(o[2]=r("span",{class:"ccb-order-dropdown__icon"},[r("i",{class:"ccb-icon-Path-3485"})],-1))]),r("div",W,[r("ul",null,[r("li",{onClick:o[1]||(o[1]=b(()=>_(""),["prevent"]))},i(t(u).getTranslations.selectValue),1),(f=t(e).attributes)!=null&&f.options?(l(!0),a(D,{key:0},S(t(e).attributes.options,(n,v)=>(l(),a("li",{key:v,onClick:b(()=>_(`${n.optionText}_${v}`),["prevent"])},i(n.optionText),9,$))),128)):F("",!0)])])])],512)}}});export{ee as default};
//# sourceMappingURL=Default-LlpKFrKl.js.map
