import type { ComponentUI, ComponentModel } from '@teambit/component';
import { SlotRegistry } from '@teambit/harmony';
import type { RouteSlot } from '@teambit/ui-foundation.ui.react-router.slot-router';
import { SidebarUI, SidebarItem, SidebarItemSlot } from '@teambit/sidebar';
import { ComponentTreeNode } from '@teambit/component-tree';
import { UIRootUI as UIRoot, UiUI } from '@teambit/ui';
import React, { ComponentType, ReactNode } from 'react';
import { MenuItemSlot, MenuItem } from '@teambit/ui-foundation.ui.main-dropdown';
import { RouteProps } from 'react-router-dom';
import { MenuWidget, MenuWidgetSlot } from '@teambit/ui-foundation.ui.menu';
import { CommandBarUI } from '@teambit/command-bar';
import { ScopeModel } from '@teambit/scope.models.scope-model';
import { DrawerType } from '@teambit/ui-foundation.ui.tree.drawer';
import { LanesModel } from '@teambit/lanes.ui.models.lanes-model';
import { DrawerWidgetSlot, ComponentFiltersSlot } from '@teambit/component.ui.component-drawer';
import { ComponentFilters } from '@teambit/component.ui.component-filters.component-filter-context';
import { ComponentUrlResolver } from '@teambit/component.modules.component-url';
import { GetScopeOptions } from './get-scope-options';
export type ScopeBadge = ComponentType;
export type ScopeBadgeSlot = SlotRegistry<ScopeBadge[]>;
export type ContextSlot = SlotRegistry<ScopeContextType[]>;
export type ScopeContextType = ComponentType<{
    scope: ScopeModel;
    children: ReactNode;
}>;
export type SidebarSlot = SlotRegistry<ComponentTreeNode>;
export type ScopeOverview = ComponentType;
export type ScopeOverviewSlot = SlotRegistry<ScopeOverview>;
export type Corner = ComponentType;
export type CornerSlot = SlotRegistry<Corner>;
export type OverviewLine = ComponentType;
export type OverviewLineSlot = SlotRegistry<OverviewLine[]>;
export type ScopeUIConfig = {
    showGallery: boolean;
    useBoxAction?: string;
    useBoxIcon?: string;
};
export declare class ScopeUI {
    /**
     * route slot.
     */
    private routeSlot;
    /**
     * component ui extension.
     */
    private componentUi;
    /**
     * menu slot
     */
    private menuSlot;
    private sidebar;
    private sidebarSlot;
    private commandBarUI;
    private scopeBadgeSlot;
    private menuWidgetSlot;
    /**
     * sidebar link slot
     */
    private sidebarItemSlot;
    /**
     * main dropdown item slot
     */
    private menuItemSlot;
    /**
     * corner slot
     */
    private cornerSlot;
    /**
     * overview line slot to add new lines beneath the overview section
     */
    private overviewSlot;
    /**
     * add a new context to ui
     */
    private contextSlot;
    private drawerWidgetSlot;
    private drawerComponentsFiltersSlot;
    constructor(
    /**
     * route slot.
     */
    routeSlot: RouteSlot, 
    /**
     * component ui extension.
     */
    componentUi: ComponentUI, 
    /**
     * menu slot
     */
    menuSlot: RouteSlot, sidebar: SidebarUI, sidebarSlot: SidebarSlot, commandBarUI: CommandBarUI, scopeBadgeSlot: ScopeBadgeSlot, menuWidgetSlot: MenuWidgetSlot, 
    /**
     * sidebar link slot
     */
    sidebarItemSlot: SidebarItemSlot, 
    /**
     * main dropdown item slot
     */
    menuItemSlot: MenuItemSlot, 
    /**
     * corner slot
     */
    cornerSlot: CornerSlot, 
    /**
     * overview line slot to add new lines beneath the overview section
     */
    overviewSlot: OverviewLineSlot, 
    /**
     * add a new context to ui
     */
    contextSlot: ContextSlot, drawerWidgetSlot: DrawerWidgetSlot, drawerComponentsFiltersSlot: ComponentFiltersSlot);
    private setSidebarToggle;
    /**
     * register a new badge into the scope overview.
     */
    registerBadge(...badges: ScopeBadge[]): this;
    getScope(options: GetScopeOptions): import("react/jsx-runtime").JSX.Element;
    /**
     * register a new line beneath the scope overview section.
     */
    registerOverviewLine(...lines: OverviewLine[]): this;
    /**
     * register a route to the scope.
     */
    registerRoutes(routes: RouteProps[]): this;
    registerMenuRoutes: (routes: RouteProps[]) => this;
    private applyMenuRoutes;
    getScopeMenu(): import("react/jsx-runtime").JSX.Element;
    private registerExplicitRoutes;
    registerMenuWidget(...menuItems: MenuWidget[]): void;
    registerCorner(corner: Corner): void;
    private componentUrlFunc;
    registerComponentUrl(func: ComponentUrlResolver): void;
    /**
     * register a scope overview.
     */
    replaceOverview(): void;
    /**
     * register description.
     */
    replaceDescription(): void;
    /**
     * register metadata section.
     */
    replaceMetadataSection(): void;
    /**
     * register a metadata item.
     */
    registerMetadataItem(): void;
    replaceComponentGrid(): void;
    /**
     * register metadata.
     */
    registerMetadata(): void;
    /**
     * add a new context to the scope.
     */
    addContext(...context: ScopeContextType[]): this;
    private getContext;
    registerMenuItem: (menuItems: MenuItem[]) => void;
    /**
     * register a sidebar Widget for the scope
     */
    registerSidebarWidget: (componentTreeNodes: ComponentTreeNode[]) => this;
    /**
     * register a sidebar link to the section above the drawers
     */
    registerSidebarLink: (...links: SidebarItem[]) => void;
    registerDrawers: (...drawer: DrawerType[]) => this;
    /**
     * register component filters
     */
    registerDrawerComponentFilters: (filters: ComponentFilters) => void;
    registerDrawerWidgets: (widgets: ReactNode[]) => void;
    registerDefaultDrawers(assumeScopeInUrl?: boolean, overrideUseComponents?: () => {
        components: ComponentModel[];
    }, overrideUseLanes?: () => {
        lanesModel: LanesModel;
    }): void;
    getDefaultDrawer(assumeScopeInUrl?: boolean, overrideUseComponents?: () => {
        components: ComponentModel[];
    }, overrideUseLanes?: () => {
        lanesModel: LanesModel;
    }): import("@teambit/component.ui.component-drawer").ComponentsDrawer;
    uiRoot(): UIRoot;
    listSidebarLinks(): (React.ComponentClass<{}, any> | React.FunctionComponent<{}>)[];
    /** registers available components */
    setComponents: (components: ComponentModel[]) => void;
    private menuItems;
    static dependencies: import("@teambit/harmony").Aspect[];
    static runtime: import("@teambit/harmony").RuntimeDefinition;
    static slots: (((registerFn: () => string) => SlotRegistry<RouteProps>) | ((registerFn: () => string) => SlotRegistry<ComponentTreeNode>) | ((registerFn: () => string) => SlotRegistry<ScopeBadge>) | ((registerFn: () => string) => SlotRegistry<MenuWidget[]>) | ((registerFn: () => string) => SlotRegistry<CornerSlot>) | ((registerFn: () => string) => SlotRegistry<DrawerWidgetSlot>))[];
    static defaultConfig: {
        showGallery: boolean;
    };
    static provider([ui, componentUi, sidebar, commandBarUI]: [UiUI, ComponentUI, SidebarUI, CommandBarUI], config: ScopeUIConfig, [routeSlot, menuSlot, sidebarSlot, scopeBadgeSlot, menuWidgetSlot, menuItemSlot, sidebarItemSlot, cornerSlot, overviewSlot, contextSlot, drawerWidgetSlot, componentFiltersSlot,]: [
        RouteSlot,
        RouteSlot,
        SidebarSlot,
        ScopeBadgeSlot,
        MenuWidgetSlot,
        MenuItemSlot,
        SidebarItemSlot,
        CornerSlot,
        OverviewLineSlot,
        ContextSlot,
        DrawerWidgetSlot,
        ComponentFiltersSlot
    ]): Promise<ScopeUI>;
}
export default ScopeUI;
