const app = {
    state: {
        dialysis_area: {
            zone_select_index: 0,
            schedule_type_select_index: 0,
            schedule_date: new Date(),
        }
    },
    mutations: {
        UPDATE_DIALYSIS_AREA_SELECT: (state, selects) => {
            state.dialysis_area.zone_select_index = selects.zone
            state.dialysis_area.schedule_type_select_index = selects.schedule_type
            state.dialysis_area.schedule_date = selects.schedule_date
        }
    },
    actions: {
        SaveDialysisAreaSelectIndexs({commit}, selects) { // selects: {zone: zone_index, schedule_type: schedule_type_index, schedule_date: Date}
            commit('UPDATE_DIALYSIS_AREA_SELECT', {zone: selects.zone, schedule_type: selects.schedule_type, schedule_date: selects.schedule_date})
        }
    }
}

export default app
