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 boolean> = T extends true ? {
    resource: IResourceItem;
    identifier: string;
} : {
    resource: IResourceItem;
    identifier: string;
} | undefined;
export type UseResourceReturnType = {
    resources: IResourceItem[];
    resource?: IResourceItem;
    select: <T extends boolean = true>(resourceName: string, force?: T) => SelectReturnType<T>;
    identifier?: string;
};
type UseResourceReturnTypeWithResource = UseResourceReturnType & {
    resource: IResourceItem;
    identifier: string;
};
/**
 * @internal
 */
export declare function useResource(): UseResourceReturnType;
/**
 * @internal
 */
export declare function useResource<TIdentifier = UseResourceParam>(identifier: TIdentifier): TIdentifier extends NonNullable<UseResourceParam> ? UseResourceReturnTypeWithResource : UseResourceReturnType;
export {};
//# sourceMappingURL=index.d.ts.map