import errorMessageHandler from "./errorMessageHandler";
import {VMoney} from 'v-money'

export default {
    props: {
        section:{
            type: String,
            required: true
        },
        data: {
            type: Object,
            default: null
        }
    },
    data() {
        return {
            isLoading: false,
            error: '',
            money: {decimal: '.',thousands: ',', precision: 2},
            productPrice: {decimal: '.',thousands: ',', precision: 3},
            exchangeRate: {decimal: '.', thousands: '', precision: 5},
            percentage: {decimal: '.', thousands: '', precision: 2, suffix: '%'},
            integer: {decimal: '', thousands: '', precision: 0},

        }
    },
    methods: {
        formHandler(errorMessage){
            this.isLoading = false;
            this.updateList();
            this.errorMessageHandler(errorMessage);
        }
    },
    mixins: [errorMessageHandler],
    directives: {money: VMoney}

}