1 | import * as React from "react";
|
2 | import { MenuItem2Props } from "@blueprintjs/popover2";
|
3 | import type { ItemPredicate, ItemRenderer, ItemRendererProps } from "../common";
|
4 | export interface Film {
|
5 |
|
6 | title: string;
|
7 |
|
8 | year: number;
|
9 |
|
10 | rank: number;
|
11 | }
|
12 |
|
13 | export declare const TOP_100_FILMS: Film[];
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 | export declare function getFilmItemProps(film: Film, { handleClick, handleFocus, modifiers, ref, query }: ItemRendererProps): MenuItem2Props & React.Attributes;
|
20 |
|
21 |
|
22 |
|
23 | export declare const renderFilm: ItemRenderer<Film>;
|
24 |
|
25 |
|
26 |
|
27 | export declare const renderCreateFilmMenuItem: (query: string, active: boolean, handleClick: React.MouseEventHandler<HTMLElement>) => JSX.Element;
|
28 |
|
29 |
|
30 |
|
31 | export declare const renderCreateFilmsMenuItem: (query: string, active: boolean, handleClick: React.MouseEventHandler<HTMLElement>) => JSX.Element;
|
32 | export declare const filterFilm: ItemPredicate<Film>;
|
33 | export declare function createFilm(title: string): Film;
|
34 | export declare function createFilms(query: string): Film[];
|
35 | export declare function areFilmsEqual(filmA: Film, filmB: Film): boolean;
|
36 | export declare function doesFilmEqualQuery(film: Film, query: string): boolean;
|
37 | export declare function arrayContainsFilm(films: Film[], filmToFind: Film): boolean;
|
38 | export declare function addFilmToArray(films: Film[], filmToAdd: Film): Film[];
|
39 | export declare function deleteFilmFromArray(films: Film[], filmToDelete: Film): Film[];
|
40 | export declare function maybeAddCreatedFilmToArrays(items: Film[], createdItems: Film[], film: Film): {
|
41 | createdItems: Film[];
|
42 | items: Film[];
|
43 | };
|
44 | export declare function maybeDeleteCreatedFilmFromArrays(items: Film[], createdItems: Film[], film: Film): {
|
45 | createdItems: Film[];
|
46 | items: Film[];
|
47 | };
|