import * as api from "../api/api.js";
export default {
    namespaced: true,
    state: {
        /* common */
        snackbar: {
            color: 'success',
            msg: '',
            state: false
        },
        loading_process: false,

        /* main layout */
        filterasset: {
            startdate: moment(new Date()).format('YYYY-MM-DD'),
            enddate: moment(new Date()).format('YYYY-MM-DD'),
            status: 'All',
            search: ''
        },
        list_status: ['All', 'Confirmed', 'Unconfirmed'],
        list_roasset: {
            records: [],
            total: 0
        },
        currpage: 1
    },
    mutations: {
        /* common */
        update_snackbar(state, val) {
            state.snackbar = val
        },
        update_loading_process(state, val) {
            state.loading_process = val
        },

        /* main layout */
        update_filterasset(state, val) {
            state.filterasset = val
        },
        update_list_status(state, val) {
            state.list_status = val
        },
        update_list_roasset(state, val) {
            state.list_roasset = val
        },
        update_currpage(state, val) {
            state.currpage = val
        }
    },
    actions: {}
}
