import * as streamingAvailability from "streaming-availability"; import type { Catalog } from "../libraries/Catalog"; import React from "react"; import type { HtmlAnchorProps, HtmlDivProps, HtmlImgProps } from "../libraries/HtmlProps"; /** * PosterType is the type of the poster. * It can be either "vertical" or "horizontal". * Vertical posters are taller than they are wide. * Horizontal posters are wider than they are tall. */ export type PosterType = "vertical" | "horizontal"; /** * CatalogLogoType is the type of the catalog logo. * It can be either "light", "dark" or "white". * Light logos are suitable for dark backgrounds. * Dark logos are suitable for light backgrounds. * White logos are colored completely white. */ export type CatalogLogoType = "light" | "dark" | "white"; export interface PosterVisualProps { /** * The type of the poster to display. * * @defaultValue "horizontal" */ posterType?: PosterType; /** * The type of the catalog logo to display. * * @defaultValue "dark" */ catalogLogoType?: CatalogLogoType; /** * The function to convert a change to text. * Such as converting an "upcoming" change to "Coming Soon on August 1". * The text will be displayed below the catalog logo. * If not provided, the default {@link English.convertChangeToText} will be used. * You can check that function as an example to create your own. * * This function is only used if there's a highlighted change. * * A highlighted change is automatically picked, * if the poster is displayed within a * {@link Row} or a {@link Grid} component * with a {@link ChangesSource}. * * @defaultValue {@link English.convertChangeToText} */ convertChangeToText?: (change: streamingAvailability.Change) => string; /** * The props for the root anchor that contains the poster, the catalog logo * and the text div. */ posterContainerAnchorProps?: HtmlAnchorProps; /** * The props for the poster image. */ posterImageProps?: HtmlImgProps; /** * The props for the catalog logo image. */ catalogLogoImageProps?: HtmlImgProps; /** * The props for the text div to display the text below the catalog logo * regarding the highlighted change such as "Coming Soon on August 1". * * This field is only used if there's a highlighted change. * * A highlighted change is automatically picked, * if the poster is displayed within a * {@link Row} or a {@link Grid} component * with a {@link ChangesSource}. */ textDivProps?: HtmlDivProps; } /** * @category Components */ export interface PosterProps extends PosterVisualProps, PosterContentProps { /** * If set to true, the poster will not be displayed if there's no streaming option available. * * @defaultValue false */ hidePosterIfNoStreamingOption?: boolean; } export interface PosterContentProps { /** * The ID of the show to display. * It could be an IMDB id, a TMDB id or a Streaming Availability API id. * * Either this field or the {@link show} field must be provided. * * @example The Batman (IMDB) * `tt1877830` * @example The Batman (TMDB) * `movie/414906` * @example The Queen's Gambit (IMDB) * `tt10048342` * @example The Queen's Gambit (TMDB) * `tv/87739` */ showId?: string; /** * The show to display. * This field is used if you already have the show object from * the Streaming Availability API Client. * * Either this field or the {@link showId} field must be provided. */ show?: streamingAvailability.Show; /** * A highlighted change to display, * such as a new episode, an expiring movie or an upcoming series. * * This field is used if you want to display a highlighted change * you already have from the Streaming Availability API Client. * * This field is automatically picked if the poster is displayed within a * {@link Row} or a {@link Grid} component with a {@link ChangesSource}. */ highlightedChange?: streamingAvailability.Change; /** * The priority catalogs to use when displaying the poster. * The catalogs are prioritized in the order they are provided. * * If a show is available in multiple streaming catalogs, * the first catalog in the list that contains the show will be used * when showing the catalog logo and deep link. */ priorityCatalogs?: Catalog[]; /** * The country to use when checking the streaming options. */ country: string; } /** * The Poster component displays a poster image of a show with a streaming catalog logo. * * The provided Poster is a clickable anchor that deep-links to show's page on the streaming service. * * @category Components */ export declare function Poster(props: PosterProps): React.ReactElement | null; //# sourceMappingURL=Poster.d.ts.map