import{_ as T,A as S}from"./settings.consts-C6F6lZ8o.js";import{u as C}from"./admin-BM775jCq.js";import{_ as I}from"./Badge.vue_vue_type_script_setup_true_lang-D3oqtQF2.js";import"./vendor-vueform-slider-CCH9_7pb.js";import{d as w,w as $,f as o,i as s,t as c,x as _,j as A,F as N,r as P,k as j}from"./vendor-vue-runtime-core-DwK6Ry68.js";import{t as z,u as l}from"./vendor-vue-reactivity-CheHbvBM.js";import{a as u,t as F}from"./vendor-vue-shared-DrzsEcag.js";import{_ as R}from"./vendor-vue3-html2pdf-KR020wX8.js";const W={key:0,class:"ccb-tab__title"},D={class:"ccb-tab__items"},E=["onClick"],L={class:"ccb-tab__item__label"},O={key:0,class:"ccb-tab__item__icon"},q=["src"],G={class:"ccb-tab__item__label__text"},H=w({__name:"Tab",props:{items:{},modelValue:{},disabled:{type:Boolean},name:{},title:{},type:{},proBadge:{type:Boolean}},emits:["update:modelValue","change"],setup(m,{emit:p}){const b=m,{items:i,modelValue:n,disabled:f,name:v,title:d}=z(b),g=C(),r=p,h=e=>{r("update:modelValue",e.id),r("change",v.value||"",e.id)},k=e=>n.value?n.value===e.id:!1,y=e=>e?/\.(svg|png|jpe?g|webp|gif)$/i.test(e)||e.startsWith("/")||e.startsWith("http"):!1,B=e=>S(e,g.getTranslations),x=(e,a)=>!e||!a?!1:e.id!=null&&a.id!=null?e.id===a.id:e===a,V=e=>{var a;return!e||!((a=i.value)!=null&&a.length)?!1:i.value.some(t=>x(t,e))};return $(()=>[i.value,n.value],()=>{var e;(e=i.value)!=null&&e.length&&(!n.value||!V(i.value[0]))&&r("update:modelValue",i.value[0].id)},{immediate:!0}),(e,a)=>(s(),o("div",{class:u(["ccb-tab",{"ccb-tab--regular":e.type==="regular"}])},[l(d)?(s(),o("div",W,[A(l(T),{text:l(d)||"",size:"s",weight:"medium"},null,8,["text"])])):c("",!0),_("div",D,[(s(!0),o(N,null,P(l(i),t=>(s(),o("div",{class:u(["ccb-tab__item",{"ccb-tab__item--active":k(t),"ccb-tab__item--disabled":l(f),"ccb-tab__item--pro":t.isPro}]),key:t.id,onClick:J=>!t.isPro&&h(t)},[_("div",L,[t.icon?(s(),o("span",O,[y(t.icon)?(s(),o("img",{key:0,src:t.icon||"",alt:""},null,8,q)):(s(),o("i",{key:1,class:u(t.icon),"aria-hidden":"true"},null,2))])):c("",!0),_("span",G,F(B(t.label||"")),1),t.proBadge?(s(),j(l(I),{key:1,label:"PRO",type:"blue"})):c("",!0)])],10,E))),128))])],2))}}),te=R(H,[["__scopeId","data-v-92055f05"]]);export{te as T};
//# sourceMappingURL=Tab-CaYIC5iw.js.map
