1import{a as B}from"./TA_tdidu.js";import{_ as D,x as O,$ as j,Z as w,c as V,a as n,o,b as m,f as l,F as _,i as x,n as b,h as T,e as g,t as p,d as E}from"./CM9RFNJZ.js";import{c as C}from"./G5lFtUTJ.js";import{i as y}from"./BRQJpod7.js";const F={class:"f-tabs"},P=["onClick"],q={class:"f-tabs-item"},z={key:0},A=["onClick"],H={class:"f-tabs-item"},L={key:0},M={__name:"Tabs",props:{params:{type:Object,default:()=>({itemValue:"id",itemText:"label",items:[]})},modelValue:[Object,String,null]},emits:["update:modelValue"],setup(r,{emit:I}){const N=I,t=r,s=t.params.sliceValueTabs||4;let k=O({});const u=j("other");w(()=>t.modelValue,a=>{u.value&&(d.value>=s?u.value.onClickItem(a):u.value.onClickItem(null))});const d=V(()=>{const a=t.params.itemValue||"id";return i.value.findIndex(c=>{var e;return c[a]===((e=t.modelValue)==null?void 0:e[a])})}),i=V(()=>{var a;return C(((a=t.params)==null?void 0:a.items)||[])}),S=V(()=>{var e;const a=i.value.length<=s?[]:i.value.slice(s),c=a.length===1;return{...t.params,title:d.value>=s?(e=t.modelValue)==null?void 0:e[t.params.itemText||"label"]:"ÐÑÑгое",afterTitle:d.value>=s&&t.modelValue.cnt?`(${t.modelValue.cnt})`:"",items:c?[]:a,menuPos:"right",menuWidth:200,snapOff:!0}}),v=(a=null)=>a?y(t.modelValue,a):d.value>=s,f=a=>{a&&!y(a,t.modelValue)&&N("update:modelValue",a)};return k=C(t.modelValue),(a,c)=>(o(),n("div",null,[m("div",F,[l(i).length<=l(s)||l(i).length-l(s)===1?(o(!0),n(_,{key:0},x(l(i),(e,h)=>(o(),n("div",{key:e[r.params.itemValue]||h,class:b(["f-tabs__item",{"--active":v(e),"--disabled":e.disabled}]),onClick:$=>f(e)},[m("div",q,[T(p(e.label_short||e[r.params.itemTextShort]||e[r.params.itemText]||"")+" ",1),"cnt"in e?(o(),n("sup",z,"("+p(e.cnt)+")",1)):g("",!0)])],10,P))),128)):(o(),n(_,{key:1},[(o(!0),n(_,null,x(l(i).slice(0,l(s)),(e,h)=>(o(),n("div",{key:e[r.params.itemValue]||h,class:b(["f-tabs__item",{"--active":v(e),"--disabled":e.disabled}]),onClick:$=>f(e)},[m("div",H,[T(p(e.label_short||e[r.params.itemTextShort]||e[r.params.itemText]||"")+" ",1),"cnt"in e?(o(),n("sup",L,"("+p(e.cnt)+")",1)):g("",!0)])],10,A))),128)),m("div",{class:b(["f-tabs__item",{"--active":v()}])},[E(B,{ref_key:"other",ref:u,params:l(S),value:l(k),onChange:c[0]||(c[0]=e=>f(e))},null,8,["params","value"])],2)],64))])]))}},J=D(M,[["__scopeId","data-v-12e3665d"]]);export{J as T};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.