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