import{_ as N}from"./EmptyStateBlock-BaR9js3E.js";import{f as O,_ as V,g as L}from"./BlockBalanceAgreement-qtspRQ_B.js";import{_ as w}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{E as j,c,o as r,a as t,h as y,t as u,v as A,L as E,b as h,F as m,i as f,w as M,e as F,n as G,O as z,G as J,r as P,D as p,f as R,C as k,I as T,J as q}from"./index-CmCGXBst.js";import{_ as H}from"./ClausesKeeper-CTja-fCz.js";import{u as K}from"./server-CRQmsQ4v.js";import"./contracts-P7YPBhEI.js";import"./ButtonDefault-BIBStZbJ.js";import"./IconClose-B_k4TzXM.js";const Q={class:"server-item__wrapper"},U={class:"server-item__header"},W={class:"server-item__top"},X={class:"server-item__name"},Y={key:0,class:"server-item__image"},Z=["src"],ee={class:"server-item__price"},te={class:"tw-p-4 tw-space-y-4"},se={class:"tw-text-gray-500 tw-text-xs"},re={class:"tw-gray-800 tw-text-sm"},oe={class:"server-item__row"},ae={class:"server-item__note"},ne={__name:"ServerItem",props:{data:{type:Object,default:()=>({})},specifications:{type:Array,default:()=>[]},image:{type:String,default:""}},setup(o){return(i,n)=>{const l=j("router-link");return r(),c("div",{class:G(["server-item",{"server-item--special":o.data.special}])},[t("div",Q,[t("div",U,[t("div",W,[t("div",X,u(o.data.Name),1),o.image?(r(),c("div",Y,[t("img",{src:o.image,alt:"OS Image"},null,8,Z)])):y("",!0)]),t("div",ee,u(A(O)(o.data.CostMonth))+" в месяц",1)]),t("div",te,[(r(!0),c(m,null,f(o.specifications,d=>(r(),c("div",{key:d.label,class:""},[t("div",se,u(d.label),1),t("div",re,u(d.text),1)]))),128)),o.data.note?E(i.$slots,"default",{key:0},()=>[t("div",oe,[t("div",ae,u(o.data.note),1)])],!0):y("",!0),h(l,{class:"btn btn--wide btn--border btn--wide",to:`/DSSchemes/${o.data.ID}`},{default:M(()=>n[0]||(n[0]=[F(" Заказать ",-1)])),_:1,__:[0]},8,["to"])])])],2)}}},ce=w(ne,[["__scopeId","data-v-2e231459"]]),ie={class:"section"},le={class:"container"},_e={class:"section-header"},ue={class:"section-nav"},de=["title","onClick"],me={key:0,class:"list"},ve={__name:"DSSchemes",async setup(o){let i,n;const l=z(),d=J(),D=K(),v=P(0);[i,n]=p(()=>l.fetchDSOrders()),await i,n(),[i,n]=p(()=>l.fetchDSSchemes()),await i,n(),[i,n]=p(()=>d.fetchVPSSchemes()),await i,n(),v.value=S()?.[0]?.ServersGroupID;const g=R(()=>Object.keys(l.DSSchemes).filter(e=>l.DSSchemes[e].IsActive).map(e=>l.DSSchemes[e]).sort((e,s)=>e.CostMonth-s.CostMonth));function b(e){v.value=e}function I(e){return D?.serverGroupsList?.ServersGroups?.[e]}function S(){let e={};return Object.values(D?.serverGroupsList?.Servers).forEach(s=>{if(s.ServiceID==="40000"){const _=s.ServersGroupID;e[_]||(e[_]={SortID:s.SortID,ServersGroupID:_,servers:[]}),e[_].servers.push(s)}}),Object.values(e).sort((s,_)=>s.SortID-_.SortID)}function x(e){const s=l.DSSchemes?.[e];return s?L(s):[]}return(e,s)=>{const _=V,C=H,$=ce,B=N;return r(),c(m,null,[h(_),t("section",ie,[t("div",le,[t("div",_e,[s[0]||(s[0]=t("h1",{class:"section-title"},"Заказ выделенного сервера",-1)),s[1]||(s[1]=t("div",{class:"section-text"}," При покупке этой услуги у вас появляется полностью укомплектованный, настроенный выделенный сервер, с операционной системой на ваш выбор, размещённый в дата-центре в Москве, по самым низким ценам. ",-1)),h(C),T(t("div",ue,[(r(!0),c(m,null,f(S(),(a,Se)=>(r(),c("div",{class:G(["section-nav__item",{active:String(v.value)===String(a?.ServersGroupID)}]),key:a.ServersGroupID,title:I(a?.ServersGroupID)?.Comment,onClick:pe=>b(a?.ServersGroupID)},u(I(a?.ServersGroupID)?.Name),11,de))),128))],512),[[q,S().length>1]])]),g.value.length?(r(),c("div",me,[(r(!0),c(m,null,f(g.value,a=>(r(),k($,{key:a.ID,data:a,specifications:x(a.ID),image:a.Image},null,8,["data","specifications","image"]))),128))])):(r(),k(B,{key:1,label:"Нет доступных серверов"}))])])],64)}}},be=w(ve,[["__scopeId","data-v-0c25191f"]]);export{be as default};
