import{c as e,aA as l,g as s,e as o,C as a,G as r,v as t,x as u,B as p,z as m,y as d,aY as i}from"./base-lib.js?v=1761009159";import{K as n,bq as g,c5 as c,gt as v}from"./utils-lib.js?v=1761009159";import{_ as C}from"./input-popover.vue_vue_type_script_setup_true_lang.js?v=1761009159";import{aD as y,aE as b,aF as f,aG as j}from"./useController13.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./site.js?v=1761009159";import"./index105.js?v=1761009159";import"./index106.js?v=1761009159";import"./column.js?v=1761009159";import"./useStore12.js?v=1761009159";import"./useStore4.js?v=1761009159";import"./useController6.js?v=1761009159";import"./validator.js?v=1761009159";import"./useController5.js?v=1761009159";import"./useMethod5.js?v=1761009159";import"./useController4.js?v=1761009159";import"./useStore10.js?v=1761009159";const h={class:"p-[16px]"},x=e({__name:"apply-bt-ssl",setup(e,{expose:x}){const w=l("popupClose",()=>{}),{BtForm:_,submit:V}=n({data:y,options:e=>s(()=>[{type:"custom",render:()=>o(g,{label:"证书信息"},{default:()=>[o("span",{class:"text-primary"},[a(" TrustAsia TLS RSA CA(免费版)")])]})},{type:"select",label:"域名",key:"domain",options:b.value||[],attrs:{placeholder:"请选择",style:"width: 15rem"},rules:[c({message:"请选择域名"})]},{type:"custom",render:()=>o(g,{label:"个人/公司名称",prop:"orgName"},{default:()=>[o(C,{customClass:"!w-[36rem]",modelValue:e.value.orgName,"onUpdate:modelValue":l=>e.value.orgName=l,placeholderTips:"请输入个人/公司名称，必填项"},null)]}),rules:{orgName:[c({message:"请输入个人/公司名称"})]}},{type:"custom",render:()=>o(g,{label:"所在地区"},{default:()=>[o("div",{class:"flex flex-row"},[o(g,{prop:"orgRegion"},{default:()=>[o(C,{customClass:"mr-[16px] !w-[17rem]",modelValue:e.value.orgRegion,"onUpdate:modelValue":l=>e.value.orgRegion=l,placeholderTips:"请输入所在省份，必填项"},null)]}),o(g,{prop:"orgCity"},{default:()=>[o(C,{customClass:"!w-[17.4rem]",modelValue:e.value.orgCity,"onUpdate:modelValue":l=>e.value.orgCity=l,placeholderTips:"请输入所在市/县，必填项"},null)]})])]}),rules:{orgRegion:[c({message:"请输入所在省份"})],orgCity:[c({message:"请输入所在市/县"})]}},{type:"custom",render:()=>o(g,{label:"地址",prop:"orgAddress"},{default:()=>[o(C,{customClass:"!w-[36rem]",modelValue:e.value.orgAddress,"onUpdate:modelValue":l=>e.value.orgAddress=l,placeholderTips:"请输入个人/公司地址，必填项"},null)]}),rules:{orgAddress:[c({message:"请输入个人/公司地址"})]}},{type:"custom",render:()=>o(g,{label:"手机",prop:"orgPhone"},{default:()=>[o(C,{customClass:"!w-[36rem]",modelValue:e.value.orgPhone,"onUpdate:modelValue":l=>e.value.orgPhone=l,placeholderTips:"请输入手机号码，必填项"},null)]}),rules:{orgPhone:[{required:!0,message:"请输入手机号码",validator:(e,l,s)=>{v(l)?s():s(new Error("请输入正确的手机号码"))},trigger:["blur","change"]}]}},{type:"custom",render:()=>o(g,{label:"邮政编码",prop:"orgPostalCode"},{default:()=>[o(C,{customClass:"!w-[36rem]",modelValue:e.value.orgPostalCode,"onUpdate:modelValue":l=>e.value.orgPostalCode=l,placeholderTips:"请输入邮政编码，必填项"},null)]}),rules:{orgPostalCode:[{required:!0,message:"请输入邮政编码",validator:(e,l,s)=>{6===l.length?s():s(new Error("请输入正确的邮政编码"))},trigger:["blur","change"]}]}},{type:"custom",render:()=>o(g,{label:" "},{default:()=>[o(r,{type:"primary",onClick:()=>V()},{default:()=>{var e;return[(null==(e=f.value)?void 0:e.ssl_id)?"提交信息":"申请证书"]}})]})}]),submit:async(e,l)=>{await l();const s=await j(e.value);return s&&w(),s}});return x({onConfirm:V}),(e,l)=>{const s=i;return t(),u("div",h,[o(s,{type:"error",closable:!1},{title:p(()=>l[0]||(l[0]=[m("span",{class:"text-small"},[m("i",{calss:"svgtofont-el-warning text-small text-warning"}),m("span",null," 禁止含有诈骗、赌博、色情、木马、病毒等违法违规业务信息的站点申请SSL证书，如有违反，撤销申请，停用账号。 ")],-1)])),_:1}),o(d(_),{"label-width":"100px",class:"mt-[16px] pb-[16px]"})])}}});export{x as default};
