import { Entity, EntityCollection, EntityCustomView, FireCMSContext, User } from "../types"; /** * @see resolveNavigationFrom * @group Hooks and utilities */ export type ResolvedNavigationEntry> = ResolvedNavigationEntity | ResolvedNavigationCollection | ResolvedNavigationEntityCustom; /** * @see resolveNavigationFrom * @group Hooks and utilities */ export interface ResolvedNavigationEntity> { type: "entity"; entity: Entity; entityId: string; path: string; parentCollection: EntityCollection; } /** * @see resolveNavigationFrom * @group Hooks and utilities */ export interface ResolvedNavigationCollection> { type: "collection"; path: string; collection: EntityCollection; } /** * @see resolveNavigationFrom * @group Hooks and utilities */ interface ResolvedNavigationEntityCustom> { type: "custom_view"; path: string; view: EntityCustomView; } /** * Use this function to retrieve an array of navigation entries (resolved * collection, entity or entity custom_view) for the given path. You need to pass the app context * that you receive in different callbacks, such as the save hooks. * * It will take into account the `navigation` provided at the `FireCMS` level. * * @param path * @param context * @group Hooks and utilities */ export declare function resolveNavigationFrom, UserType extends User>({ path, context }: { path: string; context: FireCMSContext; }): Promise[]>; /** * @group Hooks and utilities */ export interface NavigationFromProps { path: string; } /** * @group Hooks and utilities */ export interface NavigationFrom> { data?: ResolvedNavigationEntry[]; dataLoading: boolean; dataLoadingError?: Error; } /** * Use this hook to retrieve an array of navigation entries (resolved * collection or entity) for the given path. You can use this hook * in any React component that lives under `FireCMS` * @group Hooks and utilities */ export declare function useResolvedNavigationFrom, UserType extends User>({ path }: NavigationFromProps): NavigationFrom; export {};