<script setup lang="ts">
import Dialog from 'primevue/dialog'

defineProps<{ visible: boolean; title: string; modal?: boolean; closable?: boolean }>()
defineEmits<{ 'update:visible': [value: boolean] }>()
</script>

<template>
  <Dialog
    class="ks-dialog"
    :visible="visible"
    :header="title"
    :modal="modal ?? true"
    :closable="closable ?? true"
    @update:visible="$emit('update:visible', $event)"
  >
    <slot />
    <template #footer><slot name="footer" /></template>
  </Dialog>
</template>
