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