/** * 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 { ScheduleResourceRefType } from "@elaraai/e3-ui/internal"; import type { PlanCanvasInspect } from "../root/inspect.js"; /** A resource: its landing series' key, and its key's text. */ export type PlanResourceRef = ValueTypeOf; /** A resource's name by its landing and its key: `undefined` while none is known. */ export type PlanResourceNames = (ref: PlanResourceRef) => string | undefined; /** * The resources some events are on, each once, in their order: what a pane names. Its callers hold the array while the * events are the same, so their reads are not asked again. * * @param resources - Each event's resource, if it is on one * @returns The resources, each once */ export declare function resourcesNamed(resources: Iterable): readonly PlanResourceRef[]; /** * The one resource a view names, held while it names the same one: its read is not asked again. * * @param ref - The resource, if any * @returns It, alone; none for none */ export declare function useNamedResource(ref: PlanResourceRef | undefined): readonly PlanResourceRef[]; /** * The names of the resources a pane shows — see the module docs. * * @param inspect - What the canvas reads of its rows; `undefined` before it has any * @param wanted - The resources the pane names ({@link resourcesNamed}, {@link useNamedResource}) * @returns A resource's name: its landing row's on the canvas, else its row's once read by its key; `undefined` until then */ export declare function usePlanResourceNames(inspect: PlanCanvasInspect | undefined, wanted: readonly PlanResourceRef[]): PlanResourceNames; //# sourceMappingURL=names.d.ts.map