import{_ as V}from"./LoadingIndicator-BUC-Eplr.js";import{_ as B}from"./EmptyStateBlock-Dt7jmbAi.js";import{_ as L,a as P}from"./BlockDependentServices-DgyaIf9K.js";import{_ as $}from"./ClausesKeeper-CyJ_9bTp.js";import{_ as C}from"./BlockBalanceAgreement-396E9Da8.js";import{C as A,r as N,g as n,x as R,o as a,c as d,b as s,a as c,F as v,t as j,w,m as S,d as E,j as F,f}from"./index-Bb2UEb_P.js";import{u as G}from"./services-DEZoSah0.js";import{u as K}from"./orders-B7i92Ara.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./BlueButton.vue_vue_type_script_setup_true_lang-CY8chwQm.js";import"./common-U_VzDrmL.js";import"./StatusBadge-74LYchi-.js";import"./HtmlContent-DrkJBX3e.js";import"./IconCloseCircle-ctElXVvc.js";import"./clauses-Bhz_DuFa.js";import"./index-Dax_IkAt.js";import"./ButtonDefault-CzWpVlv6.js";const T={class:"tw-px-4 md:tw-px-8 tw-mb-6"},q={class:"tw-text-gray-500 tw-text-sm tw-mt-2"},z={class:"tw-flex tw-items-center tw-gap-8 tw-border-b tw-border-gray-200 tw-mt-4 tw-whitespace-nowrap tw-mb-6"},me={__name:"VPSServices",async setup(H){let i,m;const D=F(),o=A(),x=G(),l=K(),p=N(!0),e=n(()=>Object.values(o.vpsList).find(t=>t&&t.OrderID===Number(D.params.id))),u=n(()=>o.vpsSchemes[e.value.SchemeID]),b=n(()=>e.value?l.ordersList.filter(t=>t.DependOrderID===e.value.OrderID&&t.ServiceID&&x.ServicesList[t.ServiceID]).sort((t,r)=>t.ID-r.ID):[]);return[i,m]=R(()=>Promise.all([o.fetchVPS(),o.fetchVPSSchemes(),l.fetchAllOrders()])),await i,m(),p.value=!1,(t,r)=>{const I=C,_=E("RouterLink"),k=$,y=L,O=P,g=B,h=V;return a(),d(v,null,[s(I,{"contract-id":e.value?.ContractID},null,8,["contract-id"]),c("div",T,[e.value&&u.value?(a(),d(v,{key:0},[r[2]||(r[2]=c("h1",{class:"tw-text-xl sm:tw-text-4xl"},"Дополнительные услуги",-1)),c("div",q,"VPS/VDS сервер #"+j(e.value.OrderID),1),c("div",z,[s(_,{class:"tw-py-2 tw-cursor-pointer -tw-mb-[1px]","active-class":"tw-text-sky-400 tw-border-b-2 tw-border-sky-400",to:`/VPSOrders/${e.value.OrderID}`},{default:w(()=>r[0]||(r[0]=[f(" Сервер ",-1)])),_:1,__:[0]},8,["to"]),s(_,{class:"tw-py-2 tw-cursor-pointer -tw-mb-[1px]","active-class":"tw-text-sky-400 tw-border-b-2 tw-border-sky-400",to:`/VPSOrders/${e.value.OrderID}/Services`},{default:w(()=>r[1]||(r[1]=[f(" Услуги ",-1)])),_:1,__:[1]},8,["to"])]),s(k),s(y,{services:b.value},null,8,["services"]),s(O,{"order-id":e.value.OrderID,"service-search-params":{ServiceID:e.value.ServiceID,ServersGroupID:u.value.ServersGroupID},class:"tw-mt-8"},null,8,["order-id","service-search-params"])],64)):p.value?(a(),S(h,{key:2,class:"tw-mt-10"})):(a(),S(g,{key:1,label:"Заказ не найден"}))])],64)}}};export{me as default};
