import{B as a}from"./index115.js?v=1761009159";import{jc as e,ak as s,E as t,jd as o,b as n}from"./utils-lib.js?v=1761009159";import{u as i}from"./useMethod7.js?v=1761009159";import{c as r,r as l,H as d,v as m,x as c,z as p,I as u,y,e as f,Q as h}from"./base-lib.js?v=1761009159";import"./ace.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./validator.js?v=1761009159";import"./index106.js?v=1761009159";import"./column.js?v=1761009159";const j={class:"p-16px"},x=r({__name:"config",props:{compData:{}},setup(r,{expose:x}){const v=n(),g=r,{row:b}=g.compData,w=l(""),_=l("utf-8"),{loading:C,setLoading:S}=i(),k=(a={readonly:!1,theme:"chrome"})=>({mode:"ace/mode/nginx",theme:t.value?"ace/theme/clouds_midnight":"ace/theme/".concat(a.theme),wrap:!0,showInvisibles:!1,showFoldWidgets:!1,useSoftTabs:!0,tabSize:2,showPrintMargin:!1,readOnly:a.readonly,fontSize:"12px"});return(async()=>{try{S(!0);const{data:a}=await e({service:b.key});s(a)&&(w.value=a.data.data,_.value=a.data.encoding)}finally{S(!1)}})(),x({onConfirm:async a=>{const{data:e}=await o({service:b.key,data:w.value});v.request(e),e.status&&a()}}),(e,s)=>{const t=d("bt-loading");return m(),c("div",j,[s[1]||(s[1]=p("span",{class:"my-[4px] text-secondary"},"提示：Ctrl+F 搜索关键字，Ctrl+S 保存，Ctrl+H 查找替换",-1)),u(f(y(a),{class:"!h-[550px] my-[12px] rounded-base",modelValue:y(w),"onUpdate:modelValue":s[0]||(s[0]=a=>h(w)?w.value=a:null),id:"mailConfigContent",editorOption:k()},null,8,["modelValue","editorOption"]),[[t,y(C)]])])}}});export{x as default};
