import Vue from 'vue';
import formMixin from '@mixins/formMixin';

const vm = new Vue({
  el: '#schedule-success',
  components: {
    BaseButton: () => import(/* webpackChunkName: "BaseButton" */ '@elements/BaseButton/index.vue'),
    ScheduleCustomerSelect: () => import(/* webpackChunkName: "ScheduleCustomerSelect" */ '@components/Schedule/ScheduleCustomerSelect/index.vue'),
  },
  data() {
    return {
      configurations: {},
      showForm: false,
    };
  },
  mixins: [formMixin],
  methods: {
    setData({ configurations }) {
      this.configurations = configurations;
    },
    callbackCreateForm(propValue) {
      this.showForm = propValue;
    },
    callbackScheduledInfos(infos) {
      this.configurations.has_order_scheduled = infos.order_id ? true : false;
    },
  },
});

vm.setData(DATA);
vm.$mount('#schedule-success');
