import { IMovie } from "@autoplex-api/request";
import { IUser } from "./schema";
import Modal from "../components/modals";

/**
 * The state definition
 */
export interface IState {
	movies    : {
		[tmdbId: string]: {
			refCount: number,
			movie: IMovie
		}
	},
	user        : IUser | null,
	modalName   : Modal | null,
	modalVisible: boolean
}

/**
 * The state implementation
 */
export const state: IState = {
	movies: {},
	user: null,
	modalName: null,
	modalVisible: false,
};
