<template>
    <modal modal-id="document-edit-modal" size="large" v-model="showModal" title="Document Edit" :preloader="preloader"
        :modal-scroll="false" @submit="submit" @close-modal="closeModal">
        <template slot="body">
            <app-overlay-loader v-if="preloader" />
            <DocumentForm :document-id="documentId" :category-id="categoryId" :document-name="documentName"
                :document-content="documentContent" :url="updateUrl" :is-store="false" :submit-form="submitForm"
                @document-updated="documentUpdated" />
        </template>
    </modal>
</template>

<script>

import { ModalMixin } from "../../../mixins/ModalMixin";
import DocumentEditMixin from '../../../mixins/document/DocumentEditMixin';
import DocumentForm from "./DocumentForm";

export default {
    name: "DocumentEditModal",
    mixins: [ModalMixin, DocumentEditMixin],
    components: { DocumentForm },
    props: {
        selectedUrl: {
            type: String,
        }
    },
}
</script>