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

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

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