import { Page, Pages, PageSource } from '../type';
import { PageTrees, PageTreesNode } from './pagetrees';
import { PageBuilder } from './pagebuilder';
import { FileInfo } from '../vo/fileinfo';
import { DynaCache } from '../../../../pkg/cahce/cache';
/**
 * Path utility functions - simplified implementations
 */
export declare function addTrailingSlash(path: string): string;
/**
 * Page predicates - exact replica of Go's pagePredicates
 */
export declare const pagePredicates: {
    kindPage: (p: Page) => boolean;
    kindSection: (p: Page) => boolean;
    kindHome: (p: Page) => boolean;
    kindTerm: (p: Page) => boolean;
    shouldListLocal: (p: Page) => boolean;
    shouldListGlobal: (p: Page) => boolean;
    shouldListAny: (p: Page) => boolean;
    shouldLink: (p: Page) => boolean;
};
/**
 * PageMapQueryPagesBelowPath - query for pages below a path
 */
export interface PageMapQueryPagesBelowPath {
    path: string;
    keyPart: string;
    include: (p: Page) => boolean;
    key(): string;
}
/**
 * PageMapQueryPagesInSection - query for pages in a section
 */
export interface PageMapQueryPagesInSection extends PageMapQueryPagesBelowPath {
    recursive: boolean;
    includeSelf: boolean;
    index: number;
    key(): string;
}
/**
 * Implementation of PageMapQueryPagesBelowPath
 */
export declare class PageMapQueryPagesBelowPathImpl implements PageMapQueryPagesBelowPath {
    path: string;
    keyPart: string;
    include: (p: Page) => boolean;
    constructor(path: string, keyPart: string, include?: (p: Page) => boolean);
    key(): string;
}
/**
 * Implementation of PageMapQueryPagesInSection
 */
export declare class PageMapQueryPagesInSectionImpl extends PageMapQueryPagesBelowPathImpl implements PageMapQueryPagesInSection {
    recursive: boolean;
    includeSelf: boolean;
    index: number;
    constructor(path: string, keyPart: string, recursive: boolean, includeSelf: boolean, index: number, include?: (p: Page) => boolean);
    key(): string;
}
export declare class PageMap extends PageTrees {
    private pageReverseIndex;
    pageBuilder: PageBuilder;
    constructor(pageBuilder: PageBuilder);
    /**
     * SetupReverseIndex - exact replica of Go's SetupReverseIndex method
     */
    setupReverseIndex(): void;
    /**
     * InsertResourceNode - exact replica of Go's InsertResourceNode method
     */
    insertResourceNode(key: string, node: PageTreesNode): void;
    addFi(f: FileInfo): Promise<void>;
    /**
     * Assemble - exact replica of Go's Assemble method
     */
    assemble(): Promise<void>;
    /**
     * AssembleTerms - exact replica of Go's assembleTerms method
     */
    private assembleTerms;
    /**
     * CleanPages - exact replica of Go's cleanPages method
     */
    private cleanPages;
    /**
     * ApplyAggregates - exact replica of Go's applyAggregates method
     */
    private applyAggregates;
    /**
     * AssembleStructurePages - exact replica of Go's assembleStructurePages method
     */
    private assembleStructurePages;
    /**
     * AddMissingTaxonomies - exact replica of Go's addMissingTaxonomies method
     */
    private addMissingTaxonomies;
    /**
     * AddMissingStandalone - exact replica of Go's addMissingStandalone method
     */
    private addMissingStandalone;
    /**
     * GetResourcesForPage - exact replica of Go's getResourcesForPage method
     */
    getResourcesForPage(ps: Page): Promise<PageSource[]>;
    /**
     * ForEachResourceInPage - exact replica of Go's forEachResourceInPage method
     */
    private forEachResourceInPage;
    /**
     * GetPagesInSection - exact replica of Go's getPagesInSection method
     */
    getPagesInSection(langIndex: number, q: PageMapQueryPagesInSection): Promise<Pages>;
    /**
     * GetOrCreatePagesFromCache - simplified synchronous version
     */
    getOrCreatePagesFromCacheSync(cache: DynaCache<string, Pages> | null, key: string, create: (key: string) => Promise<Pages>): Promise<Pages>;
    /**
     * GetPagesWithTerm - exact replica of Go's getPagesWithTerm method
     */
    getPagesWithTerm(q: PageMapQueryPagesBelowPath): Promise<Pages>;
    /**
     * GetTermsForPageInTaxonomy - exact replica of Go's getTermsForPageInTaxonomy method
     */
    getTermsForPageInTaxonomy(base: string, taxonomy: string): Promise<Pages>;
    /**
     * GetSections - exact replica of Go's getSections method
     */
    getSections(langIndex: number, prefix: string): Promise<Pages>;
    /**
     * Helper method to get directory from path
     */
    private pathDir;
}
//# sourceMappingURL=pagemap.d.ts.map