<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 m-b-5 animate__animated animate__fadeInUpBig animate__fast" v-if="error">
                <div class="col">
                    <small class="bold fs-10 text-danger">{{error}}</small>
                </div>
            </div>
            <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">Are you sure you want to detach customer from <span class="bold">{{this.item.name}}</span> segment?</div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col p-r-5">
                            <div class="btn btn-sm btn-success btn-block b-rad-none" data-dismiss="modal">Cancel</div>
                        </div>
                        <div class="col p-l-5">
                            <div class="btn btn-sm btn-danger btn-block b-rad-none" @click="submit(route('api.company.connection.detach', company_id, connection, item.id), 'delete', 'customerProfileSection', true, true)">Remove Segment</div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
    import componentHandler from '../../../general/mixins/componentHandler';
    import ModalFormHandler from '../../../general/mixins/modalFormHandler';
    export default {
        props: {
            company_id: {
                required: true,
                type: Number
            },
            connection: {
                required: true,
                type: Number
            }
        },

        mixins: [componentHandler, ModalFormHandler]
    }
</script>