import { MovieStatus } from "@autoplex-api/search";

export enum ExternalSource {
	Facebook  = "facebook_id",
	Freebase  = "freebase_id",
	FreebaseM = "freebase_mid",
	Imdb      = "imdb_id",
	Instagram = "instagram_id",
	Tvdb      = "tvdb_id",
	TvRage    = "tvrage_id",
	Twitter   = "twitter_id"
}

export interface IGenre {
	id  : number,
	name: string
}

export interface ILanguage {
	iso_639_1: string,
	name     : string
}

export interface IFindResult {
	movie_results     : IMovieSearchResult[],
	person_results    : unknown,
	tv_results        : unknown,
	tv_episode_results: unknown,
	tv_season_results : unknown
}

export interface IMovieSearchResult {
	adult            : boolean,
	backdrop_path    : string | null,
	genre_ids        : number[],
	id               : number,
	original_language: string,
	original_title   : string,
	overview         : string,
	popularity       : number,
	poster_path      : string | null,
	release_date     : string,
	title            : string,
	video            : boolean,
	vote_average     : number
	vote_count       : number,
}

export interface IMovieDetails {
	adult                : boolean,
	backdrop_path        : string | null,
	belongs_to_collection: any,
	budget               : number,
	genres               : IGenre[]
	imdb_id              : string | null,
	original_language    : string,
	original_title       : string,
	overview             : string | null,
	popularity           : number,
	poster_path          : string | null,
	production_companies : IProductionCompany[],
	production_countries : IProductionCountry[],
	release_date         : string,
	revenue              : number,
	runtime              : number | null,
	spoken_languages     : ILanguage[],
	status               : MovieStatus,
	tagline              : string | null,
	title                : string,
	video                : boolean,
	vote_average         : number,
	vote_count           : number
}

export interface IProductionCompany {
	name          : string,
	id            : number,
	logo_path     : string | null,
	origin_country: string
}

export interface IProductionCountry {
	release_date: string,
	revenue     : number,
	runtime     : number | null
}

export interface IPaginatedResponse<T> {
	page         : number,
	results      : T[],
	total_results: number,
	total_pages  : number
}
