import { D as DefaultApplication$1, P as PathGroup, a as ChildApplication$1, A as Application$1, C as Config } from './types-c9f15465.js';
import { C as ClientConfig } from './types-b970b583.js';
import { H as HostConfig, L as LocalHostConfig, A as ApplicationOverrideConfig, O as OverridesConfig } from './types-bee19651.js';

interface MicrofrontendConfigClientOptions {
    removeFlaggedPaths?: boolean;
}
declare class MicrofrontendConfigClient {
    applications: ClientConfig['applications'];
    pathCache: Record<string, string>;
    private readonly serialized;
    constructor(config: ClientConfig, opts?: MicrofrontendConfigClientOptions);
    /**
     * Create a new `MicrofrontendConfigClient` from a JSON string.
     * Config must be passed in to remain framework agnostic
     */
    static fromEnv(config: string | undefined, opts?: MicrofrontendConfigClientOptions): MicrofrontendConfigClient;
    isEqual(other: MicrofrontendConfigClient): boolean;
    getApplicationNameForPath(path: string): string | null;
    serialize(): ClientConfig;
}

interface HostOptions {
    isLocal?: boolean;
}
declare class Host {
    protocol: 'http' | 'https';
    host: string;
    port?: number;
    local: boolean | undefined;
    constructor(hostConfig: HostConfig | string, options?: HostOptions);
    protected static parseUrl(url: string, defaultProtocol?: string): {
        protocol: Host['protocol'];
        host: string;
        port?: number;
    };
    private static getMicrofrontendsError;
    isLocal(): boolean;
    toString(): string;
    toUrl(): URL;
}
/**
 * A Host subclass with defaults for locally running applications
 */
declare class LocalHost extends Host {
    constructor({ appName, localPort, local, }: {
        appName: string;
        localPort?: number;
        local?: string | number | LocalHostConfig;
    });
}

declare class Application {
    readonly default: boolean;
    name: string;
    development: {
        local: LocalHost;
        fallback?: Host;
    };
    fallback?: Host;
    projectId?: string;
    packageName?: string;
    overrides?: {
        environment?: Host;
    };
    readonly serialized: Application$1;
    constructor(name: string, { app, overrides, isDefault, }: {
        app: Application$1;
        overrides?: ApplicationOverrideConfig;
        isDefault?: boolean;
    });
    isDefault(): boolean;
    getAssetPrefix(): string;
    getAutomationBypassEnvVarName(): string;
    serialize(): Application$1;
}
declare class DefaultApplication extends Application {
    readonly default = true;
    fallback: Host;
    constructor(name: string, { app, overrides, }: {
        app: DefaultApplication$1;
        overrides?: ApplicationOverrideConfig;
    });
    getAssetPrefix(): string;
}
declare class ChildApplication extends Application {
    readonly default = false;
    routing: PathGroup[];
    constructor(name: string, { app, overrides, }: {
        app: ChildApplication$1;
        overrides?: ApplicationOverrideConfig;
    });
    static validate(name: string, app: ChildApplication$1): void;
}

interface ValidationOptions {
    skipValidation?: 'deprecatedFields'[];
}
/**
 * A class to manage the microfrontends configuration.
 */
declare class MicrofrontendConfigIsomorphic {
    config: Config;
    defaultApplication: DefaultApplication;
    childApplications: Record<string, ChildApplication>;
    overrides?: OverridesConfig;
    options?: Config['options'];
    private readonly serialized;
    constructor({ config, overrides, opts, }: {
        config: Config;
        overrides?: OverridesConfig;
        opts?: ValidationOptions;
    });
    static validate(config: string | Config, opts?: ValidationOptions): Config;
    static fromEnv({ cookies, }: {
        cookies?: {
            name: string;
            value: string;
        }[];
    }): MicrofrontendConfigIsomorphic;
    isOverridesDisabled(): boolean;
    getConfig(): Config;
    getApplicationsByType(): {
        defaultApplication?: DefaultApplication;
        applications: ChildApplication[];
    };
    getChildApplications(): ChildApplication[];
    getAllApplications(): (DefaultApplication | ChildApplication)[];
    getApplication(name: string): DefaultApplication | ChildApplication;
    hasApplication(name: string): boolean;
    getApplicationByProjectId(projectId: string): DefaultApplication | ChildApplication | undefined;
    /**
     * Returns the default application.
     */
    getDefaultApplication(): DefaultApplication;
    /**
     * Returns the configured port for the local proxy
     */
    getLocalProxyPort(): number;
    /**
     * Serializes the class back to the Schema type.
     *
     * NOTE: This is used when writing the config to disk and must always match the input Schema
     */
    toSchemaJson(): Config;
    toClientConfig(): MicrofrontendConfigClient;
    serialize(): {
        config: Config;
        overrides?: OverridesConfig;
    };
}

export { MicrofrontendConfigIsomorphic };
