import{c as e,r as a,q as s,v as l,x as t,I as r,N as i,B as n,e as o,F as u,b0 as c,A as d,C as m,z as p,L as v,D as f,bO as _,bN as b,bu as h}from"./base-lib.js?v=1761009159";import{$ as y}from"./utils-lib.js?v=1761009159";import{getCertDetail as D}from"./site.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";const w={class:"p-[2rem]"},x={class:"max-w-[25rem] whitespace-pre-wrap"},C={class:"max-w-[25rem] whitespace-pre-wrap"},T=e({__name:"mulit-cert-detail",props:{compData:{default:()=>({})}},setup(e,{expose:T}){const V=e,j=a(!1),g=a({domain:"",purchaseYears:0,purchaseTime:"",currentCycle:0,remainingDays:0,nextRenewalTime:"",verificationMethod:"",hostname:"",recordValue:""}),I=a("red"),M=async()=>{var e,a,s;if(V.compData.oid||V.compData.pid){j.value=!0;try{const{data:l}=await D({oid:V.compData.oid,pid:V.compData.pid});if(l.success&&l.res){const t=l.res;g.value={domain:t.domainName||[],purchaseYears:t.years||0,purchaseTime:t.purchase_date||"--",currentCycle:t.cycle_text||"--",remainingDays:t.remaining_text||"--",nextRenewalTime:t.renewal_text||"--",verificationMethod:(null==(e=t.verifyInfo)?void 0:e.DCVdnsType)||"--",hostname:(null==(a=t.verifyInfo)?void 0:a.DCVdnsHost)||"--",recordValue:(null==(s=t.verifyInfo)?void 0:s.DCVdnsValue)||"--"}}}catch(l){}finally{j.value=!1}}};return s(()=>{M()}),T({refresh:M}),(e,a)=>{const s=_,D=b,T=y,V=h;return l(),t("div",w,[r((l(),i(D,{column:1,border:"",class:"table-descriptions"},{default:n(()=>[o(s,{label:"域名"},{default:n(()=>[(l(!0),t(u,null,c(g.value.domain,e=>(l(),t("div",{key:e},d(e),1))),128))]),_:1}),o(s,{label:"购买年限"},{default:n(()=>[m(d(g.value.purchaseYears),1)]),_:1}),o(s,{label:"购买时间"},{default:n(()=>[m(d(g.value.purchaseTime),1)]),_:1}),o(s,{label:"当前签发周期"},{default:n(()=>[m(d(g.value.currentCycle),1)]),_:1}),o(s,{label:"当前周期剩余时间"},{default:n(()=>[m(d(g.value.remainingDays),1)]),_:1}),o(s,{label:"下一次自动续签时间"},{default:n(()=>[p("span",{style:v({color:I.value})},d(g.value.nextRenewalTime),5)]),_:1}),o(s,{label:"验证方式"},{default:n(()=>[m(d(g.value.verificationMethod),1)]),_:1}),g.value.verificationMethod.includes("cname")?(l(),t(u,{key:0},[o(s,{label:"主机名"},{default:n(()=>[p("div",x,d(g.value.hostname),1)]),_:1}),o(s,{label:"记录值"},{default:n(()=>[p("div",C,d(g.value.recordValue),1)]),_:1})],64)):f("",!0)]),_:1})),[[V,j.value]]),o(T,{class:"mt-[1rem]",options:[{content:"请确保验证记录正确否则将无法自动续签成功"}]})])}}});export{T as default};
