import type { CollectionAfterChangeHook, CollectionBeforeReadHook } from 'payload'; import type { PageCollectionConfig } from '../types/PageCollectionConfig.js'; /** * Returns the fields that the setVirtualFields hook depends on to correctly generate the virtual fields. */ export declare function dependentFields(collectionConfig: PageCollectionConfig): string[]; /** * A [CollectionBeforeReadHook] that sets the values for all virtual fields (path, breadcrumbs, alternatePaths) before a document is read. * * A "before read" hook is used, because it is fired before localized fields are flattened which is necessary for generating the alternate paths. */ export declare const setVirtualFieldsBeforeRead: CollectionBeforeReadHook; /** * A `CollectionAfterChangeHook` that sets the values for all virtual fields. * * This hook is NOT redundant with `setVirtualFieldsBeforeRead` — Payload does not call * `beforeRead` hooks during create/update operations (only `afterRead` hooks fire). * Therefore this `afterChange` hook is the only way to compute virtual fields on `doc` * and `previousDoc` after a document is created or updated. */ export declare const setVirtualFieldsAfterChange: CollectionAfterChangeHook;