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

interface VerificationState {
    lastSendTime: number | null;
}

const initialState: VerificationState = {
    lastSendTime: null,
};

export const verificationSlice = createSlice({
    name: "verification",
    initialState,
    reducers: {
        setLastSendTime: (state, action: PayloadAction<number>) => {
            state.lastSendTime = action.payload;
        },
    },
});

export const { setLastSendTime } = verificationSlice.actions;

export default verificationSlice.reducer;