/** * 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 { PlanValue } from "./index.js"; /** One resource kind, as the payload carries it. */ type PlanResourceKindValue = PlanValue["resources"][number]; /** One resource, resolved: its name, its lines and its group. */ export type PlanResourceRowValue = PlanResourceKindValue["rows"][number]; /** A resource: its kind's slot, and its key's text. */ export type PlanResourceRefValue = ValueTypeOf; /** A resource's row, by its kind and key: `undefined` while a paged kind's read of it is in flight, and for a key its kind does not have. */ export type PlanResourceLookup = (ref: PlanResourceRefValue) => PlanResourceRowValue | undefined; /** * The resources a pane names, by their kind and key — see the module docs. * * @param resources - The resource kinds * @param wanted - The resources the pane names — the same array while they hold, so their reads are not asked again * @returns A resource's row by its kind and key: a listed kind's at once, a paged kind's once its read lands */ export declare function usePlanResourceRows(resources: PlanValue["resources"], wanted: readonly PlanResourceRefValue[]): PlanResourceLookup; export {}; //# sourceMappingURL=resources.d.ts.map