import { Menu, MenuOwner, ObjectWithType, Page, Widget } from '../../../index';
/**
 * A page detail menu contributor can adapt the {@link Menu}s of a {@link Page.detailTable} or {@link Page.detailForm}.
 *
 * The contributor is called when:
 * - a detail table or form is initialized. Typically, this happens when a page is selected the first time.
 * - the detail form or table change dynamically (using {@link Page.setDetailForm} or {@link Page.setDetailTable}).
 * - the menus of the detail form or detail table change.
 *
 * It is guaranteed that a menu added by a contributor is added only once even if a contributor is called multiple times.
 */
export declare abstract class PageDetailMenuContributor implements ObjectWithType {
    page: Page;
    objectType: string;
    setPage(page: Page): void;
    /**
     * Creates a list of menus that will be set to the detail content.
     *
     * - The original menus are completely replaced. If you would like to keep them, add the {@link originalMenus} to the resulting array.
     * - If you create new menus you likely want to use {@link detailContent} as parent.
     * - If you want to copy existing menus (e.g. from the parent page), consider using {@link _cloneMenus}.
     *
     * @param originalMenus the current menus of the detail content.
     *        Menus that are added by a contributor are excluded to ensure they won't be contributed multiple times if the contributor is called more than once.
     * @param detailContent the detail form or table that should receive the new menus.
     * @returns the menus that should be set to the detail content
     */
    abstract contribute(originalMenus: Menu[], detailContent: MenuOwner): Menu[];
    /**
     * Clones the given menus including their children and attaches the clones to the given parent.
     */
    protected _cloneMenus(menus: Menu[], parent: Widget): Menu[];
    protected _cloneMenu(menu: Menu, parent: Widget): Menu;
}
//# sourceMappingURL=PageDetailMenuContributor.d.ts.map