<script setup>
import Modal from './Modal.vue';

const emit = defineEmits(['close']);

defineProps({
    show: {
        type: Boolean,
        default: false,
    },
    maxWidth: {
        type: String,
        default: '2xl',
    },
    closeable: {
        type: Boolean,
        default: true,
    },
});

const close = () => {
    emit('close');
};
</script>

<template>
    <Modal
        :show="show"
        :max-width="maxWidth"
        :closeable="closeable"
        @close="close"
    >
        <div>
            <div class="text-lg px-4 font-medium">
                <slot name="title" />
            </div>
            <div class="text-sm">
                <slot name="content" />
            </div>
        </div>
        <div class="flex flex-row justify-center p-2 text-end">
            <slot name="footer" />
        </div>
    </Modal>
</template>
