import{_ as B}from"./LoadingIndicator-BUC-Eplr.js";import{_ as h}from"./EmptyStateBlock-Dt7jmbAi.js";import{_ as N,a as $}from"./BlockDependentServices-DgyaIf9K.js";import{_ as L}from"./ClausesKeeper-CyJ_9bTp.js";import{_ as C}from"./BlockBalanceAgreement-396E9Da8.js";import{N as A,u as j,r as R,g as v,x as V,o as n,c as w,b as s,a as c,F as f,t as E,w as D,m as S,d as F,j as K,f as b}from"./index-Bb2UEb_P.js";import{u as P}from"./services-DEZoSah0.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"},U={class:"tw-text-gray-500 tw-text-sm tw-mt-2"},q={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"},ce={__name:"DomainServices",async setup(z){let l,d;const O=K(),u=A(),x=P(),o=j(),p=R(!0),e=v(()=>Object.values(u.domainsList).find(a=>a.OrderID===Number(O.params.id))),k=v(()=>{if(!e.value?.OrderID||!o?.userOrders)return[];const a=e.value.OrderID;return Object.keys(o.userOrders).map(t=>o.userOrders[t]).filter(t=>t.DependOrderID===a&&t.ServiceID&&x.ServicesList[t.ServiceID]).sort((t,m)=>Number(t?.ID)-Number(m?.ID))});return[l,d]=V(()=>Promise.all([u.fetchDomainOrders(),o.fetchUserOrders()])),await l,d(),p.value=!1,(a,r)=>{const _=C,i=F("RouterLink"),t=L,m=N,I=$,y=h,g=B;return n(),w(f,null,[s(_,{"contract-id":e.value?.ContractID},null,8,["contract-id"]),c("div",T,[e.value?(n(),w(f,{key:0},[r[2]||(r[2]=c("h1",{class:"tw-text-xl sm:tw-text-4xl"},"Дополнительные услуги",-1)),c("div",U,"Домен #"+E(e.value.OrderID),1),c("div",q,[s(i,{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:`/DomainOrders/${e.value.OrderID}`},{default:D(()=>r[0]||(r[0]=[b(" Домен ",-1)])),_:1,__:[0]},8,["to"]),s(i,{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:`/DomainOrders/${e.value.OrderID}/Services`},{default:D(()=>r[1]||(r[1]=[b(" Услуги ",-1)])),_:1,__:[1]},8,["to"])]),s(t),s(m,{services:k.value},null,8,["services"]),s(I,{"order-id":e.value.OrderID,"service-search-params":{ServiceID:e.value.ServiceID},class:"tw-mt-8"},null,8,["order-id","service-search-params"])],64)):p.value?(n(),S(g,{key:2,class:"tw-mt-10"})):(n(),S(y,{key:1,label:"Заказ не найден"}))])],64)}}};export{ce as default};
