import{c as s,s as e,g as l,q as t,v as a,x as i,y as n,C as r,z as o,D as p,e as u,B as c,F as m,A as d,G as v,aY as x}from"./base-lib.js?v=1761009159";import{aj as f}from"./utils-lib.js?v=1761009159";import{u as b,S as y}from"./useStore4.js?v=1761009159";import{t as k,m as g,c as j,r as h,d as S}from"./useController13.js?v=1761009159";import{u as _}from"./useStore12.js?v=1761009159";const C={class:"relative h-full"},z={key:0,class:"bg-light flex items-center justify-center h-full",style:{"min-height":"600px"}},w={key:0,class:"bg-lighter px-[48px] py-[16px] text-default"},T={key:1,class:"bg-lighter px-[48px] py-[16px] text-default"},A={key:1,class:"relative"},B={key:0,class:"mb-[16px]"},E={class:"flex items-center justify-between w-full"},I={class:"flex items-center"},L={class:"mr-[32px] text-small flex items-center"},q=["title"],D=s({__name:"index",setup(s,{expose:D}){const{isBindExtranet:F}=b(),{siteType:G,siteInfo:N}=e(y()),{jumpTabEvent:R}=y(),{sslTabActive:Y,sslAlertState:H,sslInfo:J}=_(),K=l(()=>{var s,e;return"java"===G.value?null!==(null==(s=N.value)?void 0:s.pid):"phpasync"===G.value?!!(null==(e=N.value)?void 0:e.status):N.value.run}),M=l(()=>!K.value&&["java","nodejs","go","python","net"].includes(G.value)),{BtTabs:O}=f({type:"card",options:k,value:Y});return t(g),D({init:g}),(s,e)=>{const l=v,t=x;return a(),i("div",C,[!n(F)||n(M)?(a(),i("div",z,[n(F)?n(M)?(a(),i("div",T,[e[7]||(e[7]=r(" 请 ",-1)),o("span",{class:"!inline-block bt-link",onClick:e[1]||(e[1]=s=>n(R)("state"))}," 启动项目 "),e[8]||(e[8]=r(" 后再管理SSL ",-1))])):p("",!0):(a(),i("div",w,[e[5]||(e[5]=r(" 请开启 ",-1)),o("span",{class:"!inline-block bt-link",onClick:e[0]||(e[0]=s=>n(R)("mapping"))}," 外网映射 "),e[6]||(e[6]=r(" 后查看配置信息 ",-1))]))])):(a(),i("div",A,[n(H)?(a(),i("div",B,[u(t,{type:"error",class:"mb-[16px]",closable:!1},{title:c(()=>{var s,t,v;return[o("div",E,[o("div",I,[(null==(s=n(J))?void 0:s.isStart)?p("",!0):(a(),i(m,{key:0},[e[10]||(e[10]=o("div",{class:"mr-[32px] text-small"},"温馨提示：当前站点未开启SSL证书访问，站点访问可能存在风险。",-1)),u(l,{type:"primary",size:"small",onClick:n(j)},{default:c(()=>e[9]||(e[9]=[r(" 申请证书 ",-1)])),_:1,__:[9]},8,["onClick"])],64)),(null==(t=n(J))?void 0:t.isSupportRenewal)&&(null==(v=n(J))?void 0:v.isStart)?(a(),i(m,{key:1},[o("div",L,[e[11]||(e[11]=r(" 温馨提示：当前[ ",-1)),o("span",{class:"flex max-w-[20rem] truncate leading-[18px] inline-block",title:n(J).dns.join("、")},d(n(J).dns.join("、")),9,q),r(" ]证书"+d(Number(n(J).endtime)<0?"已过期":"即将过期"),1)]),u(l,{type:"primary",size:"small",onClick:e[2]||(e[2]=s=>n(h)())},{default:c(()=>e[12]||(e[12]=[r(" 续签证书 ",-1)])),_:1,__:[12]})],64)):p("",!0)]),o("span",{class:"bt-link absolute top-.7rem z-10 right-1.2rem flex items-center",onClick:e[3]||(e[3]=(...s)=>n(S)&&n(S)(...s))},e[13]||(e[13]=[o("span",{class:"svgtofont-desired text-medium"},null,-1),r(" 需求反馈 ",-1)]))])]}),_:1})])):p("",!0),u(n(O)),n(H)?p("",!0):(a(),i("span",{key:1,class:"bt-link absolute top-.7rem z-10 right-0 flex items-center",onClick:e[4]||(e[4]=(...s)=>n(S)&&n(S)(...s))},e[14]||(e[14]=[o("span",{class:"svgtofont-desired text-medium"},null,-1),r(" 需求反馈 ",-1)])))]))])}}});export{D as _};
