import { createSlice, PayloadAction } from '@reduxjs/toolkit';

export const settingsSlice = createSlice({
    name: 'settings',
    initialState: {
        design: 'material' as 'material' | 'flat',
    },
    reducers: {
        setDesign: (state, { payload: design }: PayloadAction<'material' | 'flat'>) => {
            state.design = design;
        },
    },
});

export const { setDesign } = settingsSlice.actions;
export const { reducer: settings } = settingsSlice;
