/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type option } from "@elaraai/east"; import type { KeySearchSource } from "@elaraai/east-ui-components"; import { type RowHidden, type SourceHidden } from "../shared/schedule/hidden.js"; import type { RosterWords } from "./messages.js"; import type { Person, RosterValue } from "./model.js"; /** A person found, and what hides them. */ export interface FoundPerson { readonly person: Person; /** What hides them, as far as e3 has said — the people's source; `undefined` for one the rail's narrowing shows. */ readonly hidden: readonly RowHidden[] | undefined; } /** * How a found person reads in the list: their key, their name where it is not their key, their group, and — one the * rail hides — what hides them, in the Roster's words (the shared hidden pick). * * @param found - The person * @param groups - The Roster's groups: what names a person's * @param words - The Roster's words: the app's formatters, and its message table * @returns Their line */ export declare function foundPersonLine(found: FoundPerson, groups: RosterValue["groups"], words: RosterWords): string; /** Props of {@link useRosterFind}. */ export interface RosterFindProps { /** Every person of the staff. */ readonly people: readonly Person[]; /** The people the rail shows; `none` while it narrows none. */ readonly visible: option>; /** Whether `visible` is the narrowing's own, read: not the last one standing in while a new one is read. */ readonly settled: boolean; /** The Roster's groups. */ readonly groups: RosterValue["groups"]; /** The hidden pick over the people's source: what e3 has said hides a person. */ readonly hidden: SourceHidden; /** The Roster's words: the app's formatters, which word a choice as the rail does, and its message table. */ readonly words: RosterWords; /** Told the person a pick lands on. */ readonly onPick: (found: FoundPerson) => void; } /** * Search Records' source, for the shared key search's toolbar item (see the module docs). * * @param props - The staff, who the rail shows, the groups, the hidden pick, the words and the pick * @returns The source; `undefined` with no one to seek */ export declare function useRosterFind({ people, visible, settled, groups, hidden, words, onPick }: RosterFindProps): KeySearchSource | undefined; //# sourceMappingURL=find.d.ts.map