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

export interface ReprintModalState {
    isVisible: boolean;
}

const initialState: ReprintModalState = {
    isVisible: false,
}

export const reprintModalSlice = createSlice({
    name: 'reprintModal',
    initialState,
    reducers: {
        openReprintModal: (state) => {
            state.isVisible = true
        },
        closeReprintModal: (state) => {
            state.isVisible = false
        },
    }
})

export const {openReprintModal, closeReprintModal} = reprintModalSlice.actions;
export default reprintModalSlice.reducer;