import{_ as U}from"./StatusBadge-74LYchi-.js";import{_ as E}from"./ServerStatusBadge.vue_vue_type_script_setup_true_lang-DDAMgezp.js";import{_ as F}from"./OrderIDBadge.vue_vue_type_script_setup_true_lang-KWXp-xol.js";import{_ as P}from"./InputCheckbox.vue_vue_type_script_setup_true_lang-CIWL6ota.js";import{r as Y,Y as q,v as z}from"./bootstrap-vue-next-C0pyDr3k.js";import{_ as G}from"./IconDots-Cy-HnTG0.js";import{_ as J}from"./UserNote-Dl_Lvcuh.js";import{_ as K}from"./CardButton-CMmjhM47.js";import{_ as Q}from"./IconCard-L5YmAIcD.js";import{H as W,A as X,e as Z,g as h,d as tt,o as u,c as w,a as o,b as s,w as d,k as l,f as p,m as et,i as st,t as m,F as ot,h as nt,n as rt,I as v}from"./index-Bb2UEb_P.js";import{f as g}from"./time-CsiTV-I2.js";import{m as at}from"./common-U_VzDrmL.js";import{_ as dt}from"./_plugin-vue_export-helper-DlAUqK2U.js";const it={class:"btn btn--dots"},lt={class:"tw-flex tw-items-center tw-gap-4 tw-mt-10 xl:tw-mt-0"},mt={class:"tw-flex"},ut={class:"tw-text-lg"},ct={class:"tw-text-sky-400 tw-mt-2"},ft={class:"tw-flex tw-flex-col lg:tw-items-center lg:tw-flex-row lg:tw-justify-between tw-gap-2 tw-mt-2"},wt={class:"tw-flex tw-items-center tw-flex-wrap tw-gap-x-4 tw-gap-y-1 tw-text-sm tw-text-gray-500"},pt={class:"tw-flex tw-items-center tw-gap-2 tw-text-nowrap"},_t={__name:"DSCard",props:v({params:{type:Array,default:()=>[]},ds:{type:Object,required:!0},isBulk:{type:Boolean,default:!1}},{modelValue:{type:Array,default:()=>[]},modelModifiers:{}}),emits:v(["delete","transfer","manage"],["update:modelValue"]),setup(e,{emit:I}){const r=e,i=W(e,"modelValue"),_=I,x=X("emitter"),O=Z(),D=h({get:()=>i.value.includes(r.ds.OrderID),set:n=>{if(n){i.value.includes(r.ds.OrderID)||(i.value=[...i.value,r.ds.OrderID]);return}i.value=i.value.filter(t=>t!==r.ds.OrderID)}});function S(n){if(!n)return g(new Date);const t=new Date,c=new Date(t.getTime()+n*24*60*60*1e3);return g(c)}function k(n){at()||O.push(`/DSOrders/${n}`)}function y(){_("delete",r.ds.ID,r.ds.OrderID)}function b(){_("transfer",{ServiceOrderID:r.ds.ID,ServiceID:r.ds.ServiceID})}function C(n){x.emit("open-modal",{component:"StatusHistory",data:{modeID:"DSOrders",rowID:n}})}return(n,t)=>{const c=Q,$=K,B=J,V=G,N=tt("router-link"),f=Y,A=q,M=z,T=P,j=F,H=E,L=U;return u(),w("div",{class:"tw-relative tw-p-4 tw-border tw-border-gray-200 tw-rounded tw-cursor-pointer hover:tw-bg-sky-100",onClick:t[7]||(t[7]=a=>k(e.ds.OrderID))},[o("div",{class:"tw-absolute tw-right-4 tw-top-4 tw-flex tw-items-center tw-gap-1",onClick:t[3]||(t[3]=l(()=>{},["stop"]))},[s($,{onClick:t[0]||(t[0]=l(a=>n.$router.push(`/DSOrderPay/${e.ds.OrderID}`),["stop"]))},{default:d(()=>[s(c),t[8]||(t[8]=o("div",null,"Оплатить",-1))]),_:1,__:[8]}),s(B,{text:e.ds.UserNotice,"order-id":e.ds.OrderID,emit:"updateDSOrdersList"},null,8,["text","order-id"]),s(M,{class:"dropdown-dots",right:""},{"button-content":d(()=>[o("span",it,[s(V)])]),default:d(()=>[s(f,null,{default:d(()=>[s(N,{to:`/DSOrders/${e.ds.OrderID}`},{default:d(()=>t[9]||(t[9]=[p("Дополнительная информация",-1)])),_:1,__:[9]},8,["to"])]),_:1}),s(f,{onClick:t[1]||(t[1]=l(a=>b(),["stop"]))},{default:d(()=>t[10]||(t[10]=[p("Передать на другой аккаунт",-1)])),_:1,__:[10]}),s(A),s(f,{class:"color-red",onClick:t[2]||(t[2]=l(a=>y(),["stop"]))},{default:d(()=>t[11]||(t[11]=[p(" Удалить ",-1)])),_:1,__:[11]})]),_:1})]),o("div",lt,[e.isBulk?(u(),et(T,{key:0,modelValue:D.value,"onUpdate:modelValue":t[4]||(t[4]=a=>D.value=a),onClick:t[5]||(t[5]=l(()=>{},["stop"]))},null,8,["modelValue"])):st("",!0),s(j,{id:e.ds.OrderID},null,8,["id"]),o("div",mt,[o("span",ut,m(e.ds.IP),1)])]),o("div",ct,m(e.ds.Customer),1),o("div",ft,[o("div",wt,[s(H,{indicators:e.ds.Stat?.Last},null,8,["indicators"]),(u(!0),w(ot,null,nt(e.params,(a,R)=>(u(),w("div",{key:R,class:"last:tw-font-bold"},m(a),1))),128))]),o("div",pt,[o("span",{class:rt(["hosting-item__date tw-pl-0",{"tw-text-red-400":Number(e.ds.DaysRemainded)<14}])},m(S(e.ds.DaysRemainded))+" • "+m(e.ds.DaysRemainded||0)+" дн. ",3),s(L,{class:"status-badge tw-cursor-pointer",status:e.ds.StatusID,"status-table":"DSOrders",onClick:t[6]||(t[6]=l(a=>C(e.ds.ID),["stop"]))},null,8,["status"])])])])}}},Vt=dt(_t,[["__scopeId","data-v-477e0de7"]]);export{Vt as _};
