import{i as u,c as y}from"./app-DckefXYL.js";import{_ as h}from"./app-7YN_tEb-.js";import{_ as k}from"./app-CjXr3cCY.js";import{L as b,s as d}from"./app-DM6WPmnv.js";import{N as f}from"./app-C9iVkiu5.js";import{N as m}from"./app-CUPmXIij.js";import{o as t,g as o,b as s,w as i,u as a,h as n,F as v,t as r,f as c,a as p,n as _}from"./app-DnroACXc.js";import"./app-uFawAv7F.js";import"./app-BJhJ7lM8.js";import"./app-Dd07dUxy.js";import"./app-CYYQ_Zep.js";import"./app-Dpl5YSiv.js";import"./app-CF8nmC-F.js";import"./app-NVAx7Sc3.js";import"./app-CF0qXH5Q.js";import"./app-xECxwo4T.js";import"./app-BtWF1kMA.js";import"./app-B0NrURRk.js";import"./app-CGj1gg44.js";import"./app-B4bUdtyo.js";import"./app-BeuOvIof.js";import"./app-DSjO_8RR.js";import"./app-CZGZgDLc.js";import"./app-DrIi-dNq.js";import"./app-zueB50zj.js";import"./app-Co2SIBzr.js";import"./app-Cu6FD8m8.js";function g(){u(this)}const x={key:0,class:"comment"},N={key:0},z={key:1},B={key:1},C={key:0},S={key:1,class:"disabled"},T={key:2},U={key:0,class:"small red"},V={key:1,class:"small red"},w={key:0},E={key:1,class:"disabled"},ne={__name:"index",setup(F){const l=y(new g);return(P,$)=>(t(),o(v,null,[s(h,{"active-tab":"index"}),s(f,{secondary:""},{tabs:i(()=>[s(m,{href:"/servers/packages",active:a(l).type=="",name:"可用流量包"},null,8,["active"]),s(m,{href:"/servers/packages?type=all",active:a(l).type=="all",name:"所有流量包"},null,8,["active"])]),_:1}),a(l).userPackages.length==0?(t(),o("p",x,[a(l).type==""?(t(),o("span",N,"暂时还没有可用的流量包。")):n("",!0),a(l).type=="all"?(t(),o("span",z,"暂时还没有流量包。")):n("",!0)])):n("",!0),a(l).userPackages.length>0?(t(),o("div",B,[s(b,{items:a(l).userPackages},{default:i(()=>[s(a(d),{header:"流量包",frozen:"",class:"normal-value-column"},{body:i(({data:e})=>[e.package!=null?(t(),o("span",C,r(e.package.size)+r(e.package.unit.toUpperCase().replace(/(.)B/,"$1iB")),1)):(t(),o("span",S,"[已删除]")),e.isUsedAll||e.isExpired?(t(),o("div",T,[e.isUsedAll?(t(),o("span",U,"已用尽")):e.isExpired?(t(),o("span",V,"已过期")):n("",!0)])):n("",!0)]),_:1}),s(a(d),{header:"区域",class:"value-column"},{body:i(({data:e})=>[e.region!=null?(t(),o("span",w,r(e.region.name),1)):(t(),o("span",E,"[已删除]"))]),_:1}),s(a(d),{header:"有效期",class:"value-column"},{body:i(({data:e})=>[c(r(e.periodCount)+r(e.periodUnitName),1)]),_:1}),s(a(d),{header:"开始日期",class:"date-column"},{body:i(({data:e})=>[c(r(e.dayFrom),1)]),_:1}),s(a(d),{header:"结束日期",class:"date-column"},{body:i(({data:e})=>[c(r(e.dayTo),1)]),_:1}),s(a(d),{header:"已用流量",class:"value-column"},{body:i(({data:e})=>[p("span",{class:_({disabled:e.usedSize=="0B"})},r(e.usedSize),3)]),_:1}),s(a(d),{header:"剩余流量",class:"value-column"},{body:i(({data:e})=>[p("span",{class:_({disabled:e.availableSize=="0B"})},r(e.availableSize),3)]),_:1}),s(a(d),{header:"购买时间",class:"datetime-column"},{body:i(({data:e})=>[c(r(e.createdTime),1)]),_:1})]),_:1},8,["items"]),s(k,{data:a(l).page},null,8,["data"])])):n("",!0)],64))}};export{ne as default};
