import axios from 'axios';

export default {
    namespaced: true,
    state: {
        formats: [],
    },
    mutations: {
        setFormats(state, item) {
            state.formats = item;
        },
    },
    getters: {},
    actions: {
        getFormats({ commit }) {
            axios
                .get('/api/PlaceHolderFormat')
                .then(result => commit('setFormats', result.data))
                .catch(console.error);
        },
    },
};
