import type { RouteProps } from 'react-router-dom';
import type { LinkProps } from '@teambit/base-react.navigation.link';
import { CommandBarUI } from '@teambit/command-bar';
import { SlotRegistry } from '@teambit/harmony';
import { PubsubUI } from '@teambit/pubsub';
import { ReactRouterUI } from '@teambit/react-router';
import { MenuItem, MenuItemSlot } from '@teambit/ui-foundation.ui.main-dropdown';
import type { NavigationSlot, RouteSlot } from '@teambit/ui-foundation.ui.react-router.slot-router';
import { ComponentModel } from './ui';
import { ComponentPageElement, ComponentPageSlot } from './ui/component';
import { ComponentResultPlugin } from './ui/component-searcher';
import { ConsumeMethodSlot, ConsumePlugin, NavPlugin, OrderedNavigationSlot, RightSideMenuItem, RightSideMenuSlot } from './ui/menu';
import { GetComponentsOptions } from './get-component-opts';
export type ComponentSearchResultSlot = SlotRegistry<ComponentResultPlugin[]>;
export type ComponentUIConfig = {
    commandBar: boolean;
};
export type Server = {
    env: string;
    url: string;
};
export type ComponentMeta = {
    id: string;
};
export declare class ComponentUI {
    /**
     * Pubsub aspects
     */
    private pubsub;
    private routeSlot;
    private navSlot;
    readonly consumeMethodSlot: ConsumeMethodSlot;
    /**
     * slot for registering a new widget to the menu.
     */
    private widgetSlot;
    /**
     * slot for registering the right section of the menu
     */
    private rightSideMenuSlot;
    private menuItemSlot;
    private pageItemSlot;
    private componentSearchResultSlot;
    private commandBarUI;
    readonly routePath = "/*";
    private componentSearcher;
    constructor(
    /**
     * Pubsub aspects
     */
    pubsub: PubsubUI, routeSlot: RouteSlot, navSlot: OrderedNavigationSlot, consumeMethodSlot: ConsumeMethodSlot, 
    /**
     * slot for registering a new widget to the menu.
     */
    widgetSlot: OrderedNavigationSlot, 
    /**
     * slot for registering the right section of the menu
     */
    rightSideMenuSlot: RightSideMenuSlot, menuItemSlot: MenuItemSlot, pageItemSlot: ComponentPageSlot, componentSearchResultSlot: ComponentSearchResultSlot, commandBarUI: CommandBarUI, reactRouterUi: ReactRouterUI);
    get routes(): [string, RouteProps[]][];
    /**
     * the current visible component
     */
    private activeComponent?;
    formatToInstallableVersion(version: string): string;
    private copyNpmId;
    /**
     * key bindings used by component aspect
     */
    private keyBindings;
    private menuItems;
    private bitMethod;
    registerPubSub(): void;
    handleComponentChange: (activeComponent?: ComponentModel) => void;
    getComponentUI(host: string, options?: GetComponentsOptions): import("react/jsx-runtime").JSX.Element;
    getMenu(host: string, options?: GetComponentsOptions): import("react/jsx-runtime").JSX.Element;
    listMenuItems(): import("lodash").Dictionary<MenuItem[]>;
    registerRoute(routes: RouteProps[] | RouteProps): this;
    registerNavigation(nav: LinkProps, order?: number): void;
    registerConsumeMethod(...consumeMethods: ConsumePlugin[]): void;
    registerWidget(widget: LinkProps, order?: number): void;
    registerRightSideMenuItem(...rightSideMenuItem: RightSideMenuItem[]): void;
    registerMenuItem: (menuItems: MenuItem[]) => void;
    registerPageItem: (...items: ComponentPageElement[]) => void;
    /** register widgets to the components listed in the command bar */
    registerSearchResultWidget: (...items: ComponentResultPlugin[]) => void;
    updateComponents: (components: ComponentModel[]) => void;
    static dependencies: import("@teambit/harmony").Aspect[];
    static runtime: import("@teambit/harmony").RuntimeDefinition;
    static slots: (((registerFn: () => string) => SlotRegistry<RouteProps>) | ((registerFn: () => string) => SlotRegistry<MenuItemSlot>) | ((registerFn: () => string) => SlotRegistry<NavigationSlot>) | ((registerFn: () => string) => SlotRegistry<NavPlugin>) | ((registerFn: () => string) => SlotRegistry<ConsumeMethodSlot>) | ((registerFn: () => string) => SlotRegistry<ComponentPageSlot>) | ((registerFn: () => string) => SlotRegistry<ComponentSearchResultSlot>) | ((registerFn: () => string) => SlotRegistry<RightSideMenuSlot>))[];
    static defaultConfig: ComponentUIConfig;
    static provider([pubsub, commandBarUI, reactRouterUI]: [PubsubUI, CommandBarUI, ReactRouterUI], config: ComponentUIConfig, [routeSlot, navSlot, consumeMethodSlot, widgetSlot, menuItemSlot, pageSlot, componentSearchResultSlot, rightSideMenuSlot,]: [
        RouteSlot,
        OrderedNavigationSlot,
        ConsumeMethodSlot,
        OrderedNavigationSlot,
        MenuItemSlot,
        ComponentPageSlot,
        ComponentSearchResultSlot,
        RightSideMenuSlot
    ]): Promise<ComponentUI>;
}
export default ComponentUI;
