import{K as s,n as e,$ as a}from"./utils-lib.js?v=1761009159";import{c as l,q as t,H as n,v as i,x as o,y as r,I as u,e as p,B as m,F as c,b0 as d,Q as f,z as x,C as y,D as b,N as k,g as v,al as h,G as g,A as _,R as C,ak as w}from"./base-lib.js?v=1761009159";import{B as j}from"./index115.js?v=1761009159";import{u as V,S as B}from"./useStore4.js?v=1761009159";import{i as q,t as F,o as S,a as T,h as A,s as E,b as N,c as R,d as U,e as z,f as D}from"./useController16.js?v=1761009159";const G={class:"h-full"},H={key:0},I={key:0,class:"flex items-center justify-between"},K={class:"flex items-center justify-between"},Q=["onClick"],$={class:"my-[12px]"},J={key:1,class:"bg-tertiary flex items-center justify-center h-full min-h-[60rem]"},L={class:"bg-lighter px-[48px] py-[16px] text-default flex"},M=l({__name:"index",setup(l){const{isBindExtranet:M,siteType:O}=V(),{jumpTabEvent:P}=B(),W=()=>{const{BtForm:a,submit:l}=s({options:()=>v(()=>[{type:"input",label:"模板名称",key:"name",attrs:{placeholder:"请输入模板名称"},rules:[{required:!0,message:"请输入模板名称",trigger:"blur"}]}]),submit:async(s,e)=>(await e(),await U(s.value))});e({title:"另存为模板",area:42,showFooter:!0,component:()=>p(a,{class:"p-2rem"},null),onConfirm:l})};return t(q),(s,e)=>{const l=w,t=h,v=j,V=g,B=a,q=n("bt-loading");return i(),o("div",G,[r(M)?u((i(),o("div",H,[["php","proxy","phpasync"].includes(r(O))?(i(),o("div",I,[p(t,{class:"!w-[15rem]",modelValue:r(T),"onUpdate:modelValue":e[0]||(e[0]=s=>f(T)?T.value=s:null),onChange:r(A)},{default:m(()=>[(i(!0),o(c,null,d(r(S),(s,e)=>(i(),k(l,{key:e,value:s},{default:m(()=>[x("div",K,[x("span",null,_(s),1),r(z)(s)?(i(),o("span",{key:0,class:"el-icon-close cursor-pointer text-base ml-1rem",onClick:C(e=>r(D)({name:s}),["stop"])},null,8,Q)):b("",!0)])]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","onChange"]),e[5]||(e[5]=x("span",{class:"flex items-center"},[y("规则转换工具： "),x("a",{class:"bt-link",href:"https://www.bt.cn/Tools",target:"_blank"},[y("Apache转Nginx "),x("i",{class:"svgtofont-el-link"})])],-1))])):b("",!0),x("div",$,[p(v,{id:"staticContentRef",request:!1,class:"!h-[40rem] !w-full rounded-base",modelValue:r(E),"onUpdate:modelValue":e[1]||(e[1]=s=>f(E)?E.value=s:null),onSave:e[2]||(e[2]=s=>r(N)())},null,8,["modelValue"])]),x("div",null,[p(V,{type:"primary",onClick:e[3]||(e[3]=s=>r(N)())},{default:m(()=>e[6]||(e[6]=[y("保存",-1)])),_:1,__:[6]}),["php","proxy"].includes(r(O))?(i(),k(V,{key:0,onClick:W},{default:m(()=>e[7]||(e[7]=[y("另存为模板",-1)])),_:1,__:[7]})):b("",!0)]),p(B,{options:r(R),class:"ml-[20px] mt-[20px]"},null,8,["options"])])),[[q,r(F)],[q,"正在加载内容，请稍候...","title"]]):(i(),o("div",J,[x("div",L,[e[8]||(e[8]=y(" 请开启 ",-1)),x("span",{class:"mx-[.4rem] bt-link",onClick:e[4]||(e[4]=s=>r(P)("mapping"))},"外网映射"),e[9]||(e[9]=y(" 后查看配置信息 ",-1))])]))])}}});export{M as _};
