import { type ParkDugouts, type ParkQuirk, type ParkWall } from "./parks.ts"; import { type KyogijoWords } from "./strings.ts"; import type { Language, SurfaceOptions } from "./types.ts"; /** The unit the heights and distances are written in: feet, or metres for a drawing in metres, centimetres or millimetres. */ export type BallparkUnit = "ft" | "m"; /** What a ballpark drawing has been asked to add to the plain field. */ export interface Ballpark { /** The warning track's width in feet where the park's article gives it. */ track?: number; /** The stretches of wall to draw, with their heights in feet; none unless `walls` is asked for. */ walls: readonly ParkWall[]; legend: boolean; wallLabels: boolean; /** The quirks to draw. */ quirks: readonly ParkQuirk[]; /** The distance to the backstop in feet, when `quirks` asks for it and the article gives it. */ backstop?: number; dugouts?: ParkDugouts; quirkLabels: boolean; unit: BallparkUnit; language: Language; words: KyogijoWords["ballpark"]; } /** True when a drawing has something of a ballpark to add (its stylesheet is then written in). */ export declare const ballparkDrawn: (b: Ballpark | undefined) => boolean; /** * The ballpark of a drawing: the park the options name, in the season they name, with the walls and quirks they ask for. `undefined` for a drawing with no park. * A request that cannot be read is left out, as the other options' are. */ export declare function ballparkFor(o: SurfaceOptions): Ballpark | undefined; /** A length in feet as it is written: in feet, or in metres, to a tenth. */ export declare function lengthText(feet: number, unit: BallparkUnit): string; /** Where a stretch of fence stands, in words: the whole outfield, or the part of the field its middle falls in. */ export declare function sectionName(from: number, to: number, words: KyogijoWords["ballpark"]): string; /** The name of a wall: the article's, else where the article puts it, else where its middle falls in the field. */ export declare const wallName: (wall: ParkWall, words: KyogijoWords["ballpark"]) => string; /** The wall as one phrase: its name and its height. */ export declare function wallText(wall: ParkWall, b: Pick): string; /** What the tiers of the legend say, from the thresholds of 10, 20 and 30 feet: `under 10 ft`, `10 to 20 ft`, `20 to 30 ft`, `30 ft and over`. */ export declare function tierTexts(b: Pick): string[]; /** The tier a height falls in, 1 to 4. */ export declare const tierOf: (feet: number) => 1 | 2 | 3 | 4; /** What a quirk is called: the article's name for it, else its kind's. */ export declare function quirkName(q: ParkQuirk, words: KyogijoWords["ballpark"]): string; /** A quirk in a phrase, with its figures. */ export declare function quirkText(q: ParkQuirk, b: Pick): string; /** The sentences a ballpark adds to a drawing's description: its walls, then its quirks. */ export declare function ballparkSentences(b: Ballpark): string[];