import type { Formation, FormationPosition, FormationSport, LineupPlayer } from "./team.types.ts"; /** The positions a short code may stand for, by sport, in the order a player takes them: a code that is also an id of the formation is that place first. */ export declare const LINEUP_CODES: Readonly>>>; /** A code as the table has it: upper case, with no spaces, dots or hyphens. */ export declare const codeOf: (pos: unknown) => string; /** The ids a player's code may stand for in a formation of a sport, best first: the id itself, then the table's. A second line's ids end in its number. */ export declare function candidates(sport: FormationSport, player: LineupPlayer, ids: ReadonlySet): string[]; /** The places of a formation that a lineup may fill: the side on the surface and, beside it, the places it only lists. */ export declare const spotsOf: (f: Formation) => FormationPosition[]; /** Where each player of a lineup stands in a formation, by the index of the player; the places taken; and the players with none. */ export interface Assignment { /** The id of the position of each player, or undefined. */ of: (string | undefined)[]; placed: number; /** How many took the place their own code names, which settles a tie between formations. */ exact: number; } /** Players to places. Those whose code is a place's id take it first, then the others take the first free place their code may stand for; a volleyball team turns by `rotation`. */ export declare function assign(f: Formation, players: readonly LineupPlayer[], rotation?: number): Assignment; /** The formations that may hold a lineup on a surface, in table order. */ export declare const formationsFor: (sports: readonly FormationSport[]) => Formation[]; /** The formation that places the most of the players: the first of the table on a tie. */ export declare function bestFormation(candidatesList: readonly Formation[], players: readonly LineupPlayer[], rotation?: number): Formation | undefined;