import { type Arena } from "./arenas.core.ts"; import { type Ground } from "./grounds.core.ts"; import { type Park } from "./parks.core.ts"; import type { Language } from "./types.ts"; /** * An arena by its key, read from its own file the first time and held for the drawing after: asking again gives the same promise. A key that is not an arena rejects, naming the keys there are. * @example * ```ts * import { loadArena } from "@johnmorrisdotca/kyogijo-stadiums/venue-data"; * const arena = await loadArena("rogers-arena"); * console.log(arena.name, arena.city); * // Rogers Arena Vancouver * ``` */ export declare const loadArena: (id: string) => Promise; /** A park by its key, read from its own file the first time and held for the drawing after (see `loadArena`). */ export declare const loadPark: (id: string) => Promise; /** A ground by its key, read from its own file the first time and held for the drawing after (see `loadArena`). */ export declare const loadGround: (id: string) => Promise; /** The keys of the arenas, parks and grounds whose records the drawing of some venues reads. */ export interface VenueDataKeys { arenas: string[]; parks: string[]; grounds: string[]; } /** * The records the drawing of some venues of a district reads, by kind: an arena's own, a ballpark's park, a stadium's ground, and nothing for a hall (which carries its own names) or the Kodokan. The keys are a district's (`rogers-arena`, * `bc-place:cfl`). * @example * ```ts * import { venueDataKeysFor } from "@johnmorrisdotca/kyogijo-stadiums/venue-data"; * console.log(venueDataKeysFor(["rogers-arena", "bc-place:cfl", "t-mobile-park:mlb"])); * // { * // arenas: [ 'rogers-arena' ], * // parks: [ 't-mobile-park' ], * // grounds: [ 'bc-place' ] * // } * ``` */ export declare function venueDataKeysFor(venues: readonly string[]): VenueDataKeys; /** * The records of the venues a page is about to draw, each read from its own file (an arena of the NHL's real venue from its own two) and no other, and held for the drawing: what `planDistrict`, `drawDistrict` and `mountDistrictTurn` of the lean district read. Await it before the * first call and again when the venues change; a venue whose records are held is not read twice. * @example * ```ts * import { loadVenueDataFor, planDistrict } from "@johnmorrisdotca/kyogijo-stadiums/district-lean"; * const venues = ["bc-place:cfl", "rogers-arena"]; * await loadVenueDataFor(venues); * console.log(planDistrict({ venues }).members.length); * // 2 * ``` */ export declare function loadVenueDataFor(venues: readonly string[]): Promise; /** * The name of a venue of a district in a language, from the lists of names alone: no record is read, so a page can list every venue to choose from and read only the records of those chosen. It is the name `districtMember(key, language).name[language]` gives. * `undefined` for a key that is not a venue of a district. * @example * ```ts * import { venueName } from "@johnmorrisdotca/kyogijo-stadiums/venue-data"; * console.log(venueName("rogers-arena", "en"), venueName("bc-place:cfl", "ja")); * // Rogers Arena BCプレイス * ``` */ export declare function venueName(key: string, language?: Language): string | undefined;