<template>
    <div class="inline">
        <notification-component ref="notification"></notification-component>
        <div class="btn btn-sm btn-success b-rad-none requestModal p-t-10 p-b-10"  data-type="unpacked">Order Unpacked</div>
        <confirm-modal-component
                title="Order UnPacked"
                :message="'Are you sure this order has been unpacked?'"
                type="unpacked"
                v-on:confirm="completeUnpacking()">
            <div class="card card-default no-border m-b-0 m-t-15">
                <div class="card-block no-padding">
                    <action-date-component v-model="complete_date"></action-date-component>
                </div>
            </div>
        </confirm-modal-component>
    </div>

</template>

<script>
    export default {
        props: {
            'data': {
                required: true
            }
        },
        data() {
            return {
                isLoading: false,
                complete_date: null
            }
        },
        methods: {
            completeUnpacking() {
                this.$emit('updateStep', {'complete_date': this.complete_date, 'type': 'UNPACKED'});
            }
        }
    }
</script>