import{U as a,$ as e,Y as l}from"./public.js?v=1753954525509";import{c as s,i as t,O as n,_ as i}from"./page_layout.js?v=1753954525509";import{r as u,Q as o,F as r,j as v}from"./vue.js?v=1753954525509";import{c3 as m,bY as c,bA as d,c0 as p}from"./naive.js?v=1753954525509";const b=u("host"),g=u(!1),f=u([]),_=u([]),k=u(),y=u(""),x=u(""),A=u(!1),S=[{label:"A",value:"A"},{label:"AAAA",value:"AAAA"},{label:"MX",value:"MX"},{label:"TXT",value:"TXT"},{label:"NS",value:"NS"},{label:"CAA",value:"CAA"},{label:"CNAME",value:"CNAME"}],h=async()=>{try{A.value=!0;const{message:e}=await a({p:1,limit:9999});s(e)&&(e.data.length>0?(f.value=e.data.map((a=>({label:a.name,value:a.id,alias:a.alias}))),k.value||(k.value=f.value[0].value),y.value||(y.value=f.value[0].label)):(f.value=[],k.value=void 0,y.value=""))}finally{A.value=!1}},w=async()=>{try{A.value=!0;const{message:a}=await l({p:1,limit:9999,id:k.value});s(a)&&(a.data.length>0?(_.value=a.data.map((a=>({label:a.name,value:a.name,ssl_info:a.ssl_info.end_time}))),x.value||(x.value=_.value[0].value)):(_.value=[],x.value=""))}finally{A.value=!1}},C=a=>({key:"provider",title:t.global.t("SSL.Domain.index_28"),render:e=>{const l=e.task&&e.task.some((a=>100!==a.task_status));return o(c,null,{default:()=>[o("span",null,[e.name||e.provider]),l?o(m,{trigger:"hover"},{trigger:()=>o(n,{size:"small"},null),default:()=>o(r,null,[e.task.map((e=>o("div",{class:"flex flex-nowrap! p-10px cursor-pointer justify-between items-center",title:t.global.t("SSL.Domain.index_33"),key:e.id,onClick:()=>{a(e.task_log)}},[o("span",{class:"whitespace-nowrap mr-10px"},[e.task_name]),o(c,{class:"items-center flex-nowrap!"},{default:()=>[o(d,{class:"w-120px!",type:"line",status:"success",percentage:e.task_status,"indicator-placement":"inside",processing:100!==e.task_status},null),o(i,{name:"base-left-logs",size:18},null)]})])))])}):""]})}}),N=a=>({key:"ps",title:t.global.t("SSL.Domain.index_29"),render:l=>{var s,n,i;const u=l.user_for;if(!u)return"--";const r=(e="site")=>{a(l,e)};return Object.keys(u).map((a=>u[a])).every((a=>0===a.length))?o("span",{class:"bt-link",onClick:()=>r()},[t.global.t("SSL.Domain.index_30")]):o(e,{options:[{label:t.global.t("Layout.Sider.site_1"),onClick:()=>r("site"),show:(null==(s=u.sites)?void 0:s.length)>0},{label:t.global.t("SSL.Domain.index_31"),onClick:()=>r("mail"),show:(null==(n=u.mails)?void 0:n.length)>0},{label:t.global.t("SSL.Domain.index_32"),onClick:()=>r("panel"),show:(null==(i=u.panel)?void 0:i.length)>0}]},null)}}),j=a=>{const{key:e="end_time"}=a;return{key:e,title:a.title,width:a.width,render:a=>{const l=e.split(".").reduce(((a,e)=>a&&a[e]),a);return-1===l||void 0===l?"--":o(p,{type:Number(l)>30?"success":Number(l)>0?"warning":"error",class:"px-10px"},{default:()=>[Number(l)?Number(l):t.global.t("Config.Safe.index_166"),v(" "),t.global.t("Crontab.arrange.index_41")]})}}};export{y as a,f as b,x as c,_ as d,g as e,h as f,w as g,k as h,N as i,A as l,b as m,C as r,S as t,j as u};
