import { ExpressMain } from '@teambit/express';
import { GraphqlMain } from '@teambit/graphql';
import { Logger } from '@teambit/logger';
import WebpackDevServer from 'webpack-dev-server';
import { StartPlugin } from './start-plugin';
import { UIRoot } from './ui-root';
import { UiMain } from './ui.main.runtime';
export type UIServerProps = {
    graphql: GraphqlMain;
    express: ExpressMain;
    ui: UiMain;
    uiRoot: UIRoot;
    uiRootExtension: string;
    logger: Logger;
    publicDir: string;
    startPlugins: StartPlugin[];
};
export type StartOptions = {
    /**
     * Absolute path to the ui bundle (generated during the bit build).
     */
    bundleUiRoot?: string;
    /**
     * port range for the UI server to bind. default is a port range of 4000-4200.
     */
    portRange?: number[] | number;
};
export declare class UIServer {
    private graphql;
    private expressExtension;
    private ui;
    private uiRoot;
    private uiRootExtension;
    private logger;
    private publicDir;
    private plugins;
    constructor(graphql: GraphqlMain, expressExtension: ExpressMain, ui: UiMain, uiRoot: UIRoot, uiRootExtension: string, logger: Logger, publicDir: string, plugins: StartPlugin[]);
    getName(): string;
    private _port;
    get port(): number;
    /** the hostname for the server to listen at. Currently statically 'localhost' */
    get host(): string;
    /** the server listens at this url */
    get fullUrl(): string;
    get buildOptions(): {
        ssr?: boolean | undefined;
        launchBrowserOnStart?: boolean | undefined;
        prebundle?: boolean | undefined;
    } | undefined;
    /**
     * get the webpack configuration of the UI server.
     */
    getDevConfig(): Promise<import("@teambit/webpack").WebpackConfigWithDevServer>;
    private setReady;
    private startPromise;
    get whenReady(): Promise<[void, ...void[]]>;
    /**
     * start a UI server.
     */
    start({ bundleUiRoot, portRange }?: StartOptions): Promise<void>;
    private setupServerSideRendering;
    private configureProxy;
    /**
     * start a UI dev server.
     */
    dev({ portRange }?: StartOptions): Promise<WebpackDevServer>;
    private selectPort;
    private getProxyFromPlugins;
    private getProxy;
    private getDevServerConfig;
    static create(props: UIServerProps): UIServer;
}
