/** * Copyright (c) 2025 Elara AI Pty Ltd * Dual-licensed under AGPL-3.0 and commercial license. See LICENSE for details. */ import { type ValueTypeOf } from "@elaraai/east"; import type { RecordSliceBindType } from "@elaraai/east-ui/internal"; import type { Formatters, KeySearchSource } from "@elaraai/east-ui-components"; import { type RowHidden } from "../shared/schedule/hidden.js"; import type { HiddenBins } from "./hidden.js"; import type { AllocationWords } from "./messages.js"; import { type AllocationDomain, type AllocationValue } from "./model.js"; /** A record Slice's part: the bins' source of the slice. */ type RecordPart = ValueTypeOf; /** A bin Search Records found: its key, and its place — its day and time, its lane — its arrival and its resources. */ export interface FoundBin { readonly key: string; readonly at: Date; readonly lane: string; /** Its arrival's key; `undefined` for a reservation. */ readonly arrival: string | undefined; /** The resources it has parts on, the largest part first: the first, the one it is shown on. */ readonly parts: readonly string[]; } /** * How a found bin reads in the list: its key, its arrival — or that it is a reservation — its lane and time, and its day. * * @param bin - The bin * @param value - The payload: the lanes and the arrivals that name a bin's * @param format - The app's formatters * @returns Its line */ export declare function foundBinLine(bin: FoundBin, value: Pick, format: Pick): string; /** Props of {@link useAllocationFind}. */ export interface AllocationFindProps { /** The payload: its bin kind's `read`, its lanes and its arrivals. */ readonly value: AllocationValue; /** The bin row type's domain: what a row's bytes are written by. */ readonly domain: AllocationDomain; /** The bins' source of the slice: the record sought; `undefined` with none, and no search. */ readonly part: RecordPart | undefined; /** The board's words: the app's formatters, which word a choice as the rail does, and its message table. */ readonly words: AllocationWords; /** Which of the board's sources hide a bin, and what e3 has said of it (the hidden pick). */ readonly hidden: HiddenBins; /** Told the bin a pick lands on, and what hides it on the board, as far as e3 has said; `undefined` for one nothing hides. */ readonly onPick: (bin: FoundBin, hidden: readonly RowHidden[] | undefined) => void; } /** * Search Records' source, for the shared key search's toolbar item (see the module docs). * * @param props - The payload, the domain, the bins' source, the words, the hidden pick and the pick * @returns The source; `undefined` without a source of the bins to seek */ export declare function useAllocationFind({ value, domain, part, words, hidden, onPick }: AllocationFindProps): KeySearchSource | undefined; export {}; //# sourceMappingURL=find.d.ts.map