import{r as h,e as E,o as w,g as y,w as i,a as b,h as d,j as m,f as c,m as D,C as T,_ as l}from"./index-25eb6331.js";import{E as P}from"./dialog-66decf59.js";import"./overlay-25bb32bf.js";import{E as A}from"./button-c2afb424.js";import"./index-db57f3ab.js";import"./vnode-761469ca.js";import"./index-3bef6acb.js";import"./scroll-044a6ede.js";import"./refs-e3c707bd.js";const C={class:"dialog-footer"},f=!0,N={__name:"readme-editor-dialog",props:{visible:{type:Boolean,required:!0},title:{type:String,default:""},modelValue:{type:String,default:""}},emits:["update:modelValue","update:visible"],setup(V,{emit:r}){const u=V,g=T(()=>new Promise((p,t)=>{(async function(){try{const e=await l(()=>import("./base-editor-e37730bd.js").then(n=>n.b),["assets/base-editor-e37730bd.js","assets/index-25eb6331.js","assets/index-db71f7b4.css","assets/vue.runtime.esm-bundler-41046dfa.js"]);await l(()=>Promise.resolve({}),["assets/base-editor-28237bf2.css"]),l(()=>Promise.resolve({}),["assets/github-716cd734.css"]);const s=await l(()=>import("./github-3059bab4.js").then(n=>n.g),["assets/github-3059bab4.js","assets/index-25eb6331.js","assets/index-db71f7b4.css"]),a=await l(()=>import("./index-c1469080.js"),["assets/index-c1469080.js","assets/index-25eb6331.js","assets/index-db71f7b4.css","assets/core-aff39b80.js"]);e.use(s,{Hljs:a.HighlightJS}),p(e)}catch(e){t(e)}})()})),o=h("");E(()=>{o.value=u.modelValue});const _=()=>{r("update:visible",!1)},v=()=>{r("update:modelValue",o.value),r("update:visible",!1)};return(p,t)=>{const e=A,s=P;return w(),y(s,{"append-to-body":"",modelValue:f,"onUpdate:modelValue":t[1]||(t[1]=a=>f=a),"destroy-on-close":!0,onClose:_,title:u.title,"show-close":!1,draggable:"",top:"5vh",width:"80%"},{footer:i(()=>[b("span",C,[d(e,{onClick:_},{default:i(()=>[m("取消")]),_:1}),d(e,{type:"primary",onClick:v},{default:i(()=>[m("保存")]),_:1})])]),default:i(()=>[d(c(g),{modelValue:c(o),"onUpdate:modelValue":t[0]||(t[0]=a=>D(o)?o.value=a:null),height:"70vh"},null,8,["modelValue"])]),_:1},8,["title"])}}};export{N as default};
