import{P as s,M as a,l as e}from"./utils-lib.js?v=1761009159";import{ah as r,ag as t}from"./config.js?v=1761009159";import{u as i}from"./column.js?v=1761009159";import{c as o,r as l,aD as n,q as m,H as c,v as d,x as p,I as u,y as f,e as b}from"./base-lib.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";const h={class:"p-[2rem]"},_=o({__name:"cert-list-dialog",props:{compData:{}},emits:["close"],setup(o,{emit:_}){const g=o,j=_,y=l(!1),D=l([]),q=[{label:"域名",render:s=>s.info.dns.map(s=>[s,n("br")])},{label:"到期时间",minWidth:100,render:s=>n("span",[s.info.notAfter])},{label:"品牌",prop:"info.issuer",minWidth:150},{label:"位置",minWidth:60,render:s=>-1==s.cloud_id?"本地":"云端"},i([{onClick:async e=>{await s({loading:"正在选择证书，请稍候...",request:t({ssl_id:e.id,ssl_hash:e.hash}),success:s=>{if(s.msg)return a.error(s.msg);a.success("选择成功"),j("close"),g.compData.refreshData(s.data)}})},title:"选择"}])];return m(()=>(async()=>{await s({loading:y,request:r(),data:[Array,D]})})()),(s,a)=>{const r=e,t=c("bt-loading");return d(),p("div",h,[u(b(r,{ref:"certTable",column:q,data:f(D),description:"证书列表为空"},null,8,["data"]),[[t,f(y)],[t,"正在加载证书列表，请稍后...","title"]])])}}});export{_ as default};
