import"./rolldown-runtime-BM3Ffeng.js";import{ot as e}from"./element-plus-vendor-BF9PNysW.js";import{D as t,E as n,N as r,O as i,P as a,Pt as o,Tt as s,Z as c,bt as l,et as u,ht as d}from"./vue-vendor-DMUmTARL.js";import{Et as f}from"./index-y6crcKNt.js";import{t as p}from"./style-CFBBx0Kr.js";import{t as m}from"./useDarks-DlTbL-Si.js";var h={class:`dialog-footer`},g={__name:`readme-editor-dialog`,props:{visible:{type:Boolean,required:!0},title:{type:String,default:``},modelValue:{type:String,default:``}},emits:[`update:modelValue`,`update:visible`],setup(g,{emit:_}){let{isDark:v}=m(),y=s(``),b=n({get:()=>x.visible,set:e=>S(`update:visible`,e)}),x=g,S=_;c(()=>{y.value=x.modelValue});let C=()=>{S(`update:visible`,!1)},w=()=>{S(`update:modelValue`,y.value),S(`update:visible`,!1)};return(n,s)=>{let c=e,m=f;return u(),i(m,{modelValue:o(b),"onUpdate:modelValue":s[1]||=e=>l(b)?b.value=e:null,"append-to-body":``,"destroy-on-close":``,title:x.title,draggable:``,top:`5vh`,width:`80%`},{footer:d(()=>[t(`span`,h,[a(c,{onClick:C},{default:d(()=>[...s[2]||=[r(`取消`,-1)]]),_:1}),a(c,{type:`primary`,onClick:w},{default:d(()=>[...s[3]||=[r(`保存`,-1)]]),_:1})])]),default:d(()=>[a(o(p),{modelValue:o(y),"onUpdate:modelValue":s[0]||=e=>l(y)?y.value=e:null,theme:o(v)?`dark`:`light`,style:{height:`70vh`}},null,8,[`modelValue`,`theme`])]),_:1},8,[`modelValue`,`title`])}}};export{g as default};