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

const initialState = {
  email: '',
  firstName: '',
  lastName: '',
  password: '',
  token: '',
};

export const slice = createSlice({
  name: '@@auth/GUEST_ACTIVATION',
  initialState,
  reducers: {
    setFieldAction: (state, action) => {
      Object.entries(action.payload).forEach(([key, value]) => {
        state[key] = value;
      });
    },
    verifyTokenAction: (state) => state,
    registerUserAction: (state) => state,
  },
});

export const { setFieldAction, verifyTokenAction, registerUserAction } = slice.actions;
