import{_ as b}from"./index-Dax_IkAt.js";import{r as u,j as k,e as N,g,v as _,l as C,ak as W,o as n,c,F as y,h as x,B as p,n as w,t as f,m as B,w as I,b as L,a as z,i as A}from"./index-Bb2UEb_P.js";import{u as E}from"./services-DEZoSah0.js";import{u as G}from"./server-KemHlIfj.js";import{s as O}from"./multiselect-Bk-p1X5E.js";import{_ as V}from"./_plugin-vue_export-helper-DlAUqK2U.js";const $={class:"section-nav"},j=["title","onClick"],F={class:"multiselect-option"},H={__name:"TabsAdditionalServices",setup(P){const v=u(!1),t=u(3),d=k(),r=N(),S=E(),h=G(),i=u(null),o=g(()=>Object.values(S.ServicesList).filter(e=>e.ServicesGroupID!=1e3&&e.IsActive&&!e.IsHidden).sort((e,a)=>Number(e.SortID)-Number(a.SortID)).map(e=>({...e,ID:Number(e.ID),value:Number(e.ID)})));async function m(e){v.value=!0,e===5e4?await r.push("/ExtraIPOrders"):e===51e3?await r.push("/ISPswOrders"):e===52e3?await r.push("/DNSmanagerOrders"):await r.push(`/AdditionalServices?ServiceID=${e}`),v.value=!1}_(()=>d.query.ServiceID,e=>{e&&(i.value=Number(e))},{immediate:!0}),_(()=>d.meta?.ServiceID,e=>{e&&(i.value=Number(e))},{immediate:!0}),C(async()=>{window.addEventListener("resize",l),l()}),W(()=>{window.removeEventListener("resize",l)});const l=()=>{window.innerWidth>=1920?t.value=o.value.length:window.innerWidth>=1536?t.value=8:window.innerWidth>=1280?t.value=6:window.innerWidth>=1024?t.value=4:window.innerWidth>=768?t.value=3:window.innerWidth>=640?t.value=4:window.innerWidth>=480?t.value=3:t.value=2};return(e,a)=>{const D=b;return n(),c("div",$,[(n(!0),c(y,null,x(o.value.slice(0,t.value),s=>(n(),c("div",{key:s?.ID,class:w(["section-nav__item",{"section-link":!0,"section-link-active":i.value===s?.ID}]),title:p(h).serverGroupsList?.ServersGroups[s.ServersGroupID]?.Comment,onClick:R=>m(s.ID)},f(s?.Item),11,j))),128)),o.value.length>t.value?(n(),B(p(O),{key:0,modelValue:i.value,"onUpdate:modelValue":a[0]||(a[0]=s=>i.value=s),class:w({"multiselect--white additional-service__select":!0,"additional-service__select_active":o.value.slice(t.value).find(s=>s?.ID===i.value)}),options:o.value.slice(t.value),label:"ID",onSelect:a[1]||(a[1]=s=>m(s))},{option:I(({option:s})=>[z("div",F,f(s?.Item),1)]),caret:I(()=>[L(D,{class:"icon-arrow_caret"})]),_:1},8,["modelValue","class","options"])):A("",!0)])}}},Q=V(H,[["__scopeId","data-v-56a005b7"]]);export{Q as _};
