import type { IResourceItem } from "../../../contexts/resource/types"; /** * Matches the resource by identifier. * If not provided, the resource from the route will be returned. * If your resource does not explicitly define an identifier, the resource name will be used. */ export type UseResourceParam = string | undefined; export type SelectReturnType = T extends true ? { resource: IResourceItem; identifier: string; } : { resource: IResourceItem; identifier: string; } | undefined; export type UseResourceReturnType = { resources: IResourceItem[]; resource?: IResourceItem; select: (resourceName: string, force?: T) => SelectReturnType; identifier?: string; }; type UseResourceReturnTypeWithResource = UseResourceReturnType & { resource: IResourceItem; identifier: string; }; /** * @internal */ export declare function useResource(): UseResourceReturnType; /** * @internal */ export declare function useResource(identifier: TIdentifier): TIdentifier extends NonNullable ? UseResourceReturnTypeWithResource : UseResourceReturnType; export {}; //# sourceMappingURL=index.d.ts.map