import {Module} from 'vuex'
import {RootState} from '../index'

interface DesignDetail{
    allUserList:any,
	city:any,
	country:any,
}

const adminPage : Module<DesignDetail,RootState> = {
    state:{
        allUserList:[],
        city:[],
        country:[],
    },
    mutations:{
        setAllUserList(state,files){
            state.allUserList = files
        },
		setAllCitiesList(state,files){
            state.city = []
			files.city.forEach((item:any) => {
				state.city.push({
					label:item,
					value:item,
				})    
			})
			state.country = []
			files.country.forEach((item:any) => {
				state.country.push({
					label:item,
					value:item,
				})    
			})
        },
    },
    actions:{

    }
}

export default adminPage