import{P as s,$ as a,b as t}from"./utils-lib.js?v=1761009159";import{c as e,r as n,q as o,H as l,v as r,x as i,z as m,I as u,y as d,e as p,Q as c,B as g,C as y,G as f}from"./base-lib.js?v=1761009159";import{B as x}from"./index115.js?v=1761009159";import{saveConfFile as _,getConfFile as j}from"./site.js?v=1761009159";import{u as v}from"./useStore4.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./ace.js?v=1761009159";const S=e({__name:"index",setup(e){const{siteInfo:S}=v(),C=t(),b=n(!1),q=n("");n("");const H=n([{content:"此处为运行配置文件,若您不了解配置规则,请勿随意修改."}]),B=async()=>{const a={data:JSON.stringify({name:S.value.name,data:q.value})},t=await s({loading:"正在保存内容，请稍候...",request:_(a),data:{msg:String,status:Boolean}});C.msg({dangerouslyUseHTMLString:!0,message:t.msg,type:t.status?"success":"error",duration:t.status?2e3:0,showClose:!t.status}),t.status&&V()},V=async()=>{const a={data:JSON.stringify({name:S.value.name})};s({loading:b,request:j(a),data:{data:[String,q]}})};return o(()=>{V()}),(s,t)=>{const e=x,n=f,o=a,_=l("bt-loading");return r(),i("div",null,[t[2]||(t[2]=m("span",{class:"my-[4px] text-secondary"},"提示：Ctrl+F 搜索关键字，Ctrl+H 查找替换",-1)),u(p(e,{class:"!h-[54rem] my-[12px]",modelValue:d(q),"onUpdate:modelValue":t[0]||(t[0]=s=>c(q)?q.value=s:null),id:"runContent",request:!1,onSave:B},null,8,["modelValue"]),[[_,d(b)]]),m("div",null,[p(n,{type:"primary",onClick:B},{default:g(()=>t[1]||(t[1]=[y("保存",-1)])),_:1,__:[1]})]),p(o,{options:d(H),"list-style":"none",class:"ml-[20px] mt-[20px]"},null,8,["options"])])}}});export{S as default};
