import React from 'react'; import { IJaenPage } from '../../../../pages/types'; export interface JaenPageProviderProps { jaenPage: { id: string; } & Partial; jaenPages?: Array>; unregisterFields?: boolean; } export interface JaenPageContext extends JaenPageProviderProps { } export declare const JaenPageContext: React.Context; export declare const JaenPageProvider: React.FC>; /** * Access the JaenPageContext. * * @example * ``` * const {jaenPage} = useJaenPageContext() * ``` */ export declare const useJaenPageContext: () => JaenPageContext; export interface UsePageIndexProps { /** * Opts out the field from the page content on which it is applied. * Instead the page context of the provided jaenPageId will be used. * * Priority: jaenPageId > path > current page */ jaenPageId?: string; /** * Opts out the field from the page content on which it is applied. * Instead it resolves the page by the provided path. * * This is useful when you want to use a dynamic page as a context. * * Priority: jaenPageId > path > current page */ path?: string; filter?: (page: Partial) => boolean; sort?: (a: Partial, b: Partial) => number; } export declare const useJaenPageIndex: (props?: UsePageIndexProps) => { children: ({ id: string; } & Partial)[]; withJaenPage: (childId: string, children: React.ReactNode) => React.ReactNode; };