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

interface DesignDetail{
    designItemDetail:any,
	designPreviewData:any,
}

const DesignDetailModule : Module<DesignDetail,RootState> = {
    state:{
        designItemDetail:{},
		designPreviewData:{}
    },
    mutations:{
        setDesignItemDetail(state,files){
            state.designItemDetail = files
        },
        setDesignItemColthes(state,data){
            state.designItemDetail.clothes[data.index] = data.clothes
        },
        setDesignItemOthers(state,data){
            state.designItemDetail.others[data.index] = data.others
        },
		setDesignPreviewData(state,files){
            state.designPreviewData = files
        },
		// setDesignItemOthers(state,data){
        //     state.designItemDetail.others[data.index] = data.others
        // },
    },
    actions:{

    }
}

export default DesignDetailModule