/** * 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 KeyVisibility } from "../shared/schedule/visibility.js"; import type { AllocationStyles, AllocationValue } from "./model.js"; /** A narrowed source's role: what its rows are on the board. */ export type NarrowedSource = "lanes" | "resources" | "arrivals"; /** * The slot the slice names a source by: the lanes' and the resources' the bin * kind's own (`resource.of`, `parts.of`), the arrivals' `arrivals`. * * @param value - The payload * @param source - The source's role * @returns Its name in the slice */ export declare function narrowingSlot(value: AllocationValue, source: NarrowedSource): string; /** * A source's part of the board's narrowing, if the slice has one. * * @param value - The payload * @param source - The source's role * @returns Its record Slice's controls */ export declare function narrowingPart(value: AllocationValue, source: NarrowedSource): ValueTypeOf | undefined; /** * The board's narrowing, as text (#1398): the bins' own choices, apart from * the day the board writes into their range, and the lanes', the resources' * and the arrivals' — what a view keeps its place across. * * @param value - The payload * @param binChoices - The bins' own source's choices, printed (`binChoicesOf`) * @returns The narrowing, printed */ export declare function narrowingText(value: AllocationValue, binChoices: string): string; /** * Which of a source's rows show: its narrowed keys while a choice narrows it, * every row — and no read — while none does. * * @param value - The payload * @param source - The source's role * @param rows - Every row of it, in order * @returns The keys to show, and the narrowing's state */ export declare function useNarrowed(value: AllocationValue, source: NarrowedSource, rows: readonly { key: string; }[]): KeyVisibility; /** * The narrowing left nothing to show: the shared empty state, and Clear filters. * * @param props - The recipe's styles, and the narrowing's Clear all, if there is one * @returns The empty state */ export declare function NarrowedEmpty({ styles, clear }: { styles: AllocationStyles; clear: (() => void) | undefined; }): import("react/jsx-runtime").JSX.Element; //# sourceMappingURL=narrowed.d.ts.map