<template>
  <el-dialog
    custom
    append-to-body
    align-center
    :close-on-click-modal="false"
    :close-on-press-escape="false"
    v-bind="attrs"
  >
    <template v-if="props.header !== false" #header>
      <slot name="header"></slot>
    </template>
    <slot />
    <template v-if="props.footer !== false" #footer>
      <slot name="footer"></slot>
    </template>
  </el-dialog>
</template>

<script setup lang="ts" name="EpDialog">
import { withDefaults, ref, useAttrs } from 'vue'
import { ElDialog } from 'element-plus'
const props = withDefaults(
  defineProps<{
    header?: boolean
    footer?: boolean
  }>(),
  { header: true, footer: true }
)
const attrs = useAttrs()
</script>

<style scoped lang="scss"></style>
