import AdmVue from '@assets/js/adm-vue';
import initVue from '@assets/js/initVue';

const vm = new AdmVue({
  data() {
    return {
      configurations: {},
      errorCeo: false,
      showCeoError: false,
    };
  },
  computed: {
    sendData() {
      return {...this.configurations};
    },
  },
  mounted() {
    this.errorCeo = this.error_ceo ? true : false;
    if (this.errorCeo) {
      this.disableForm = true;
    }
  },
  methods: {
    showError() {
      this.showCeoError = !this.showCeoError;
    },
    handleConfigurations() {
      const configurations = this.configurations;
      if (configurations.processo_venda_status == 0) {
        delete configurations.processo_venda_order_status_started;
      }
      this.configurations = configurations;
    }
  },
});

initVue(vm);