<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 class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4">
            <div class="sm:flex sm:items-start w-full">
                <div class="mt-3 text-center sm:mt-0 sm:text-start w-full">
                    <h3 class="text-lg font-medium text-gray-900">
                        <slot name="title"/>
                    </h3>

                    <div class="mt-4 text-sm text-gray-600">
                        <slot name="content"/>
                    </div>
                </div>
            </div>
        </div>

        <div class="flex flex-row justify-end px-6 py-4 bg-gray-100 text-end">
            <slot name="footer"/>
        </div>
    </Modal>
</template>
