import{l as t,t as e,v as s,x as a}from"./utils-lib.js?v=20260328163632";import{u as o,e as i}from"./index.vue_vue_type_script_setup_true_lang9.js?v=20260328163632";import{cb as r}from"./site.js?v=20260328163632";import{k as p,O as l,c as n,r as u,o as m,V as c,W as d,Y as v}from"./base-lib.js?v=20260328163632";import"./naive-ui.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.js?v=20260328163632";import"./index84.js?v=20260328163632";import"./store4.js?v=20260328163632";import"./useMethod4.js?v=20260328163632";import"./index.vue_vue_type_script_setup_true_lang10.js?v=20260328163632";import"./index158.js?v=20260328163632";import"./ace.js?v=20260328163632";import"./index91.js?v=20260328163632";import"./index88.js?v=20260328163632";import"./index118.js?v=20260328163632";import"./logs.js?v=20260328163632";const _={class:"p-16px"},j=p({__name:"index",props:{compData:{type:Object,default:()=>({})}},setup(p,{expose:j}){const H=p,{certVerifyInfo:T,verifyBusCertEvent:x}=o(),S=[{content:t("文件验证（HTTP）：确保网站能够通过http正常访问")},{content:t("文件验证（HTTPS）：确保网站已开启https，并且网站能够通过https正常访问")},{content:l("span",{class:"text-danger"},[t("DNS验证：需要手动解析DNS记录值")])}],f=n((()=>[{label:t("文件验证(HTTP)"),value:"HTTP_CSR_HASH"},{label:t("文件验证(HTTPS)"),value:"HTTPS_CSR_HASH"},...H.compData.isIp?[]:[{label:t("DNS验证(CNAME解析)"),value:"CNAME_CSR_HASH"}]])),y=n((()=>({label:t("验证方式"),children:[{type:"select",key:"dcvMethod",attrs:{class:"w-[360px]",options:f.value}}]}))),b=u({formAttrs:{labelWidth:"100px"},formItems:[]}),h=n((()=>(b.value.formItems=[y.value],b.value))),[C,A,M]=e(h);return m((()=>{A.value.dcvMethod="HTTP_CSR_HASH"})),j({onConfirm:async()=>{try{const e={oid:T.value.oid,dcvMethod:A.value.dcvMethod},s=await a({loading:t("正在更改验证方式，请稍后..."),request:r(e),message:!0});return(null==s?void 0:s.status)&&(async(t,e,s)=>{const{data:a}=await x(t);a&&i({...a,certType:e,pid:s})})(e.oid,T.value.certType,T.value.pid),s.status}catch(e){return!1}}}),(t,e)=>(c(),d("div",_,[l(v(C)),l(v(s),{options:S})]))}});export{j as default};
