<template>
    <div class="row">
        <div class="col">
            <loading-component style="height: 300px; top: 0;" key="1" color="success" v-show="isLoading" ></loading-component>
            <div class="row justify-content-center" v-show="!isLoading">
                <div class="col">
                    <div class="row m-b-20">
                        <div class="col">
                            <h3 class="all-caps">Are you Sure?</h3>
                            <div class="fs-11">{{ contentText }}</div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col p-r-5">
                            <div class="btn btn-sm btn-default btn-block bg-master-lighter" data-dismiss="modal">Cancel</div>
                        </div>
                        <div class="col p-l-5">
                            <div class="btn btn-sm btn-block b-rad-none" :class="[{'btn-danger': modalType !== 'confirm'}, {'btn-success': modalType === 'confirm'}]" @click="submit(apiRoute, apiMethod, section, true, true)">{{ buttonText }}</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
    import componentHandler from '../../../general/mixins/componentHandler';
    import ModalFormHandler from '../../../general/mixins/modalFormHandler';
    export default {
        props: {
            contentText: {
                type: String,
                required: true
            },
            modalType: {
                type: String,
                default: 'confirm'
            },
            buttonText: {
                type: String,
                default: 'Confirm'
            },
            apiRoute: {
                type: String,
                required: true
            },
            apiMethod: {
                type: String,
                required: true
            },
        },
        mixins: [componentHandler, ModalFormHandler]

    }
</script>