1import{u as E}from"./CgDj6rrw.js";import{d as O,M as A,x as D,W as F,at as P,V as U,h as r,J as g,i as z,n as x,D as i,m as B,F as k,r as $,P as J,y as u,l as c,o,b as d,R as f,t as j,_ as q}from"./QJre-PsH.js";import{B as G}from"./HDGNBR0W.js";const H={key:0,class:"b-tab__scroll-btn b-tab__scroll-btn--left"},K=["id","onClick"],Q={class:"b-tab__title"},X={key:1,class:"b-tab__scroll-btn b-tab__scroll-btn--right"},Y=O({__name:"BTab",props:J({type:{default:"text"},size:{default:"14"},list:{},wide:{type:Boolean},grow:{type:Boolean},rounded:{type:Boolean},scrollable:{type:Boolean},arrows:{type:Boolean,default:!1},customClass:{}},{modelValue:{default:0},modelModifiers:{}}),emits:["update:modelValue"],setup(_){const e=_,{generateRandomId:C}=E(),m=u(""),n=A(_,"modelValue"),a=u(),b=u(0),h=u(0),y=u(0),I={14:"xs",16:"sm",32:"md",40:"lg",48:"xl",56:"xl1",64:"xl2"},S=c(()=>{const t=["b-tab--default",e.customClass];return["text","bar"].includes(e.type)&&t.push("b-tab--simple"),e.type==="text"?t.push("b-tab--text"):e.type==="bar"?t.push("b-tab--bar"):e.type==="switch"&&t.push("b-tab--switch"),e.wide&&t.push("b-tab--wide"),e.scrollable&&t.push("b-tab--scrollable"),e.arrows&&t.push("b-tab--arrows"),e.grow&&t.push("b-tab--grow"),e.rounded&&t.push("b-tab--rounded"),t.push(`b-tab--size-${I[e.size]||e.size}`),t}),p=c(()=>{switch(e.size){case"14":return"20";case"16":return"24";default:return"20"}}),T=t=>{n.value=t},v=t=>{switch(e.type){case"text":return t===n.value?"text-brand--icn":"text-de-secondary--icn";case"bar":return t===n.value?"text-de-primary--icn":"text-de-secondary--icn";case"switch":return t===n.value?"text-brand--icn":"text-de-secondary--icn";default:return t===n.value?"text-brand--icn":"text-de-secondary--icn"}},M=c(()=>e.type=="switch"&&["56","64"].includes(e.size)?"md":"sm"),V=c(()=>e.arrows?b.value!==0:!1),W=c(()=>e.arrows?b.value!==y.value-h.value:!1),w=c(()=>({14:"32",16:"32",32:"32",40:"40",48:"48",56:"48",64:"48"})[e.size]||"40"),l=()=>{if(!a.value||!e.arrows)return;const t=a.value;b.value=t.scrollLeft,h.value=t.scrollWidth,y.value=t.clientWidth},L=()=>{if(!a.value)return;const t=a.value.clientWidth/3;a.value.scrollBy({left:t,behavior:"smooth"}),setTimeout(l,100)},R=()=>{if(!a.value)return;const t=a.value.clientWidth/3;a.value.scrollBy({left:-t,behavior:"smooth"}),setTimeout(l,100)},N=()=>{m.value=C()};return D(async()=>{e.type!=="text"&&N(),e.arrows&&(await F(),setTimeout(l,50),a.value&&(
1a.value.addEventListener("scroll",l),new ResizeObserver(()=>{setTimeout(l,50)}).observe(a.value)))}),P(()=>{e.arrows&&a.value&&setTimeout(l,50)}),U(()=>{a.value&&e.arrows&&a.value.removeEventListener("scroll",l)}),(t,Z)=>(o(),r("div",{class:g(S.value)},[e.arrows&&V.value?(o(),r("div",H,[z(x,{type:"icon",color:"neutral",emphasis:"low",size:w.value,rounded:"",icon:"icon-right","aria-label":"اسکرÙ٠ب٠ÚÙ¾",onClick:L},null,8,["size"])])):i("",!0),B("div",{ref_key:"scrollContainer",ref:a,class:"b-tab__row",onScroll:l},[(o(!0),r(k,null,$(e.list,s=>(o(),r("button",{id:m.value+"_"+s.id,key:s.id,class:g(["b-tab__item",{"b-tab__item--active":s.id===n.value}]),onClick:ee=>T(s.id)},[s.icon&&s.leadingIcon?(o(),d(f,{key:0,name:s.leadingIcon,color:v(s.id),size:p.value,class:"b-tab__icon"},null,8,["name","color","size"])):(o(),r(k,{key:1},[s.leadingIcon&&e.type!=="switch"?(o(),d(f,{key:0,name:s.leadingIcon,color:v(s.id),size:p.value,class:"b-tab__icon b-tab__icon--leading"},null,8,["name","color","size"])):i("",!0),B("span",Q,j(s.label),1),s.trailingIcon&&e.type!=="switch"?(o(),d(f,{key:1,name:s.trailingIcon,color:v(s.id),size:p.value,class:"b-tab__icon b-tab__icon--trailing"},null,8,["name","color","size"])):i("",!0)],64)),s.badge?(o(),d(G,{key:2,type:s.icon?"sign":"text","shine-effect":!1,size:M.value,content:"Ø¬Ø¯ÛØ¯",class:"mr-1","content-color":"text-in-primary--txt","icon-color":"text-in-primary--icn"},null,8,["type","size"])):i("",!0)],10,K))),128))],544),e.arrows&&W.value?(o(),r("div",X,[z(x,{type:"icon",color:"neutral",emphasis:"low",size:w.value,rounded:"",icon:"icon-left","aria-label":"اسکرÙ٠ب٠راست",onClick:R},null,8,["size"])])):i("",!0)],2))}}),oe=q(Y,[["__scopeId","data-v-dac002a5"]]);export{oe as B};
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.