<script setup lang="ts">
import CustomEditor from '@/components/custom-editor/custom-editor.vue'

const contentEdit = defineModel<string>('contentEdit', { required: true })

const isShowEditorDrawer = defineModel<boolean>('isShowEditorDrawer', { required: true })

function onDrawerAfterLeave() {
  contentEdit.value = ''
}
</script>

<template>
  <n-drawer v-model:show="isShowEditorDrawer" :width="800" placement="right" :on-after-leave="onDrawerAfterLeave">
    <n-drawer-content>
      <CustomEditor :content="contentEdit" />
    </n-drawer-content>
  </n-drawer>
</template>
