import{aV as D,w as M,hp as N,hq as j,i as F,ar as P,hr as R,hn as q,f as E,c as O}from"./index-BTglIPU2.js?v=1773287522785";import{al as W,B as X}from"./naive-ui--dJnpVcV.js?v=1773287522785";import{k as Z,R as A,r as p,c as u,ab as G,$ as c,Z as d,_ as e,aa as a,F as b,P as y,L as J,S as n,a0 as r,X as K,a9 as i,au as Q,H as Y,j as g}from"./vue-core-DJjvd5ZC.js?v=1773287522785";const ee={class:"w-650px"},te={class:"card"},se={class:"mb-12px font-bold text-18px text-center"},ae={class:"min-h-172px text-13px"},ne={class:"card"},oe={class:"mb-10px text-16px text-center"},ie={class:"h-180px overflow-auto"},le={class:"date"},ce={class:"text"},de=["innerHTML"],re={class:"font-bold"},_e={class:"text-error"},pe=Z({__name:"details",emits:["close"],setup(ue,{emit:k}){const H=k,{t:m}=A(),_=p(!1),l=p(5),w=u(()=>l.value>0),B=u(()=>!_.value),v=p([]),x=p([]),{height:f}=D(),C=u(()=>f.value?"".concat(f.value*.9,"px"):"auto"),U=async()=>{const{message:t}=await j();F(t)&&(v.value=t.beta_ps.split("<br>").map(o=>o.trim()),x.value=t.list,$())},$=()=>{const t=setInterval(()=>{l.value--,l.value<=0&&clearInterval(t)},1e3)},I=()=>{H("close")},S=()=>{P({title:m("Home.Update.index_24"),content:m("Home.Update.index_25"),onConfirm:async()=>{await R(),await q(),E()}})};return U(),(t,o)=>{const z=G("i18n-t"),L=W,h=X,T=N;return c(),d("div",ee,[e("div",{class:"p-20px overflow-auto",style:Y({maxHeight:n(C)})},[e("div",te,[e("div",se,a(t.$t("Home.Update.index_20")),1),e("ul",ae,[(c(!0),d(b,null,y(n(v),(s,V)=>(c(),d("li",{key:s,class:J(["indent--15px pl-15px leading-20px",{"mt-8px":V!==0}])},a(s),3))),128))])]),e("div",ne,[e("div",oe,a(t.$t("Home.Update.index_21")),1),e("div",ie,[(c(!0),d(b,null,y(n(x),s=>(c(),d("div",{key:s.version,class:"version"},[o[1]||(o[1]=e("div",{class:"active"},null,-1)),e("div",le,a(n(M)(s.uptime,"yyyy-MM-dd")),1),e("div",ce,a(s.version),1),e("div",{class:"content",innerHTML:s.upmsg},null,8,de)]))),128))])]),e("div",null,[r(L,{checked:n(_),"onUpdate:checked":o[0]||(o[0]=s=>K(_)?_.value=s:null),disabled:n(w)},{default:i(()=>[r(z,{tag:"div",class:"text-14px",keypath:"Home.Update.index_23_1"},Q({title:i(()=>[e("span",re,a(t.$t("Home.Update.index_23_2")),1)]),_:2},[n(l)>0?{name:"wait",fn:i(()=>[e("span",_e,a(t.$t("Home.Update.index_23_3",[n(l)])),1)]),key:"0"}:void 0]),1024)]),_:1},8,["checked","disabled"])])],4),r(T,null,{default:i(()=>[r(h,{class:"cancel-btn",size:"small",color:"#cbcbcb",onClick:I},{default:i(()=>[g(a(t.$t("Public.Btn.Cancel")),1)]),_:1}),r(h,{type:"primary",size:"small",disabled:n(B),onClick:S},{default:i(()=>[g(a(t.$t("Home.Update.index_19")),1)]),_:1},8,["disabled"])]),_:1})])}}}),fe=O(pe,[["__scopeId","data-v-76523929"]]);export{fe as B};
