import { HttpErrorResponse, HttpClient } from '@angular/common/http';
import { Observable, Subscription, Subject } from 'rxjs';
import { Injector, Type } from '@angular/core';
import { Selector } from 'reselect';

declare const isObject: <T>(item: T) => boolean;
declare function merge<T>(target: T): T;
declare function merge<T, A>(target: T, a: A): T & A;
declare function merge<T, A, B>(target: T, a: A, b: B): T & A & B;
declare function merge<T, A, B, C>(target: T, a: A, b: B, c: C): T & A & B & C;
declare function merge<T, A, B, C, D>(target: T, a: A, b: B, c: C, d: D): T & A & B & C & D;
declare function merge<T, A, B, C, D, E>(target: T, a: A, b: B, c: C, d: D, e: E): T & A & B & C & D & E;
declare function merge<T, A, B, C, D, E, F>(target: T, a: A, b: B, c: C, d: D, e: E, f: F): T & A & B & C & D & E & F;
/**
 * deep merge of two or more objects
 *
 * @param target immutable target
 * @param sources immutable sources to apply to target
 * @returns a new merged object
 */
declare const mergeDeep: <T extends object, S>(target: T, ...sources: S[]) => any;
declare const mergeAll: <T>(array: Array<T>) => T;

/**
 * XMLHttpRequest configuration having the following parameters
 * url: the path to the request, mandatory
 * method: possible http methods: GET, POST, PUT, PATCH, DELETE, etc
 * responseType: arraybuffer, blob, document, json, text or empty string
 * headers: object containing headers as name: value pairs
 * body: request body
 * withCredentials: True when credentials are to be included in a cross-origin request. False otherwise.
 * timeout - time in milliseconds. A non-zero value will terminate the execution after the given time has passed
 */
interface XHRConfig {
    url: string;
    method?: string;
    responseType?: XMLHttpRequestResponseType;
    headers?: {
        [key: string]: string;
    };
    body?: Document | XMLHttpRequestBodyInit;
    withCredentials?: boolean;
    timeout?: number;
}
/**
 * Default xhr configuration
 */
declare const DEFAULT_XHR_CONFIG: XHRConfig;
/**
 * Utility function to call a XMLHttpRequest and send the response as a Promise. The response can be parameterized
 *
 * @param config xhr configuration
 */
declare function xhr<T>(urlOrConfig: string | XHRConfig): Promise<T>;

declare class UxErrorOutput<DETAILS = unknown> implements UxErrorInfo, UxHttpErrorInfo, UxErrorFeedback {
    code?: string;
    requestId?: string;
    doc?: string;
    details?: DETAILS;
    severity: UxMessageSeverity;
    msgId: string;
    description: string;
    errGroupMap?: Array<UxErrorGroupMap>;
    subErrors?: SubErrors;
    constructor(info: UxErrorInfo & UxHttpErrorInfo, errorFeedback: UxErrorFeedback, subErrors?: SubErrors, errGroupMap?: Array<UxErrorGroupMap>);
    getFeedBacks(byKey?: string): Array<UxErrorFeedback>;
    private checkAttribute;
}
declare class UxErrorGroupOnClickEvent {
    groupId: string;
    err?: UxErrorFeedback;
    constructor(groupId: string, err?: UxErrorFeedback);
}
interface UxErrorFollowMap {
    [groupId: string]: boolean;
}
type UxErrorGroupMap = {
    id: string;
    description: string;
    severity: UxMessageSeverity;
};
type UxErrorGroupItem = {
    groupId: string;
    description: string;
    severity: UxMessageSeverity;
    errors: Array<UxErrorFeedback>;
};
interface UxErrorInfo<DETAILS = unknown> {
    code?: string;
    doc?: string;
    details?: DETAILS;
}
interface UxHttpErrorInfo {
    requestId?: string;
}
interface UxErrorFeedback extends UxErrorMessage {
    severity?: UxMessageSeverity;
    attributes?: UxValidationErrorAttributes;
    errGroupId?: string;
    br?: string;
    doc?: string;
}
interface UxErrorMessage {
    msgId: string;
    description?: string;
}
type UxValidationErrorAttributes = Array<UxValidationErrorAttribute>;
interface UxValidationErrorAttribute {
    key: string | Array<string>;
    value: string;
}
declare enum UxMessageSeverity {
    info = "info",
    warning = "warning",
    danger = "danger",
    success = "success"
}
declare enum UxMessageSeverityMetrics {
    info = 0,
    warning = 1,
    danger = 2,
    success = 3
}
type SubErrors = Array<UxValidationErrorClass>;
declare class UxValidationErrorClass<Details = object> implements UxErrorInfo<Details>, UxErrorFeedback {
    msgId: string;
    description?: string;
    severity: UxMessageSeverity;
    attributes: UxValidationErrorAttributes;
    br?: string;
    doc?: string;
    details?: Details;
    errGroupId?: string;
    constructor(data: UxValidationErrorClass);
}
type ErrorMappingHandler<Error = object> = (err: Error) => UxErrorOutput;
interface UxHttpErrorResponse extends HttpErrorResponse {
    uxHttpErrorOutput: UxErrorOutput;
}
declare const transformToUxHttpResponse: (resp: HttpErrorResponse, mapper: ErrorMappingHandler) => UxHttpErrorResponse;
type UxErrorFeedbackEventType = UxPublishErrorFeedbackEvent | UxClearErrorFeedbackEvent;
declare class UxPublishErrorFeedbackEvent {
    err: UxErrorOutput;
    id?: string;
    groupId?: string;
    accumulate?: boolean;
    constructor(err: UxErrorOutput, id?: string, groupId?: string, accumulate?: boolean);
}
declare class UxClearErrorFeedbackEvent {
    id?: string;
    groupId?: string;
    constructor(id?: string, groupId?: string);
}

declare class UxBadgeLegacy {
    label: string;
    typeClass: string;
    constructor(values?: object);
}
declare class UxLinkLegacy<METADATA = unknown> {
    id: string;
    label: string;
    ariaIconLabel: string;
    subLabel: string;
    typeLabel: string;
    typeLabelClass: string;
    url: string;
    urlExternal: string;
    urlExternalTarget: string;
    disabled: boolean;
    children: UxLinkLegacy<METADATA>[];
    parent: UxLinkLegacy<METADATA>;
    iconClass: string;
    iconTypeClass: string;
    hasIconBg: boolean;
    active: boolean;
    metadata: METADATA;
    visible: boolean;
    expanded: boolean;
    command: () => void;
    hasMarker: boolean;
    markerTypeClass: string;
    hasTag: boolean;
    tagTypeClass: string;
    tagLabel: string;
    tagCount: string;
    badgeTypeClass: string;
    badgeLabel: string;
    badges: UxBadgeLegacy[];
    tooltipLabel: string;
    typeClass: string;
    isHome: boolean;
    isSeparator: boolean;
    isScreenReaderClickable: boolean;
    allowedRightId: string;
    allowedRightIds: string[];
    deniedRightId: string;
    deniedRightIds: string[];
    selected: boolean;
    indeterminate: boolean;
    e2eAttr: string;
    category: string;
    constructor(values?: object);
    get hasChildren(): boolean;
}

interface UxFormValidationError {
    uxValidationError: UxValidationErrorFeedback;
}
interface UxValidationErrorFeedback {
    message: string | UxValidationErrorI18nMessage;
    /**
     * danger, warning, info
     */
    type: string;
}
interface UxValidationErrorI18nMessage {
    id: string;
    params?: object;
}

interface UxModalLegacy {
    id: string;
    isOpen: boolean;
    isFullHeight?: boolean;
}

interface HttpErrorHandlerConfig {
    /**
     * The list of routes, from specific to generic. The first matching one is handled.
     */
    routes: HttpErrorRouteConfig[];
}
interface HttpErrorRouteConfig {
    /**
     * The path to match against, a URL string that uses router matching notation. Can include wildcard characters (*).
     */
    path: string;
    /**
     * Default behaviour, if error status code does not match
     */
    default?: HttpErrorCallbackFn | string | null;
    /**
     * What to do in case of an error status code.
     * if callback function, call it
     * if it's string, redirect the router to it
     * if null, do nothing
     */
    [key: number]: HttpErrorCallbackFn | string | null;
}
type HttpErrorCallbackFn = (error: HttpErrorResponse, injector: Injector) => void;

interface EuiStoreServiceModel<T> {
    select<K>(mapFn: (state: T) => K): Observable<K | Partial<K>>;
}

type HTTPMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'TRACE' | 'PATCH';
interface ApiQueueItem<PAYLOAD = unknown> {
    uri: string;
    method: HTTPMethod | string;
    payload?: PAYLOAD;
    timestamp?: number;
}
interface ApiQueue {
    [id: string]: ApiQueueItem;
}

interface UserDetails {
    userId: string;
    firstName?: string;
    lastName?: string;
    fullName?: string;
}
interface UserPreferences<DASHBOARD = any, T = any> {
    dashboard?: DASHBOARD;
    lang?: string;
    [key: string]: string | DASHBOARD | T;
}
declare const initialUserPreferences: UserPreferences;

/**
 * The EuiEnvConfig is the environment specific configuration object for the EUI library.
 */
interface EuiEnvConfig<T = unknown> {
    /**
     * The envAppHandlersConfig contains the environment specific handlers' configuration.
     */
    envAppHandlersConfig?: EuiAppHandlersConfig;
    /**
     * The envDynamicConfig contains the environment specific dynamic configuration.
     */
    envDynamicConfig?: EnvDynamicConfig;
    /**
     * The loadedEnvDynamicConfig contains the loaded environment specific dynamic configuration.
     */
    loadedEnvDynamicConfig?: EuiAppJsonConfig;
    [key: string]: EuiAppHandlersConfig | EnvDynamicConfig | EuiAppJsonConfig | T;
}
/**
 * The EnvDynamicConfig is the dynamic configuration object for the EUI library that uses the dynamic configuration to
 * update the configuration at runtime.
 * The dynamic configuration can be fetched from a local path or a web service, can be merged or deep merged with the
 * default configuration at runtime and can be awaited for a specific duration to resolve the request.
 */
interface EnvDynamicConfig {
    /** uri which can be local path or webservice, should store/return json-config which implements EuiAppJsonConfig*/
    uri: string;
    /**
     * Dynamic config will be awaiting 2000ms(default) to resolve the request,
     * to change this duration you can use this parameter
     */
    configTimeout?: number;
    /**
     * Dynamic configuration overwrites to the config properties of EuiAppJsonConfig
     * in the default configuration (global, modules, versions, [key: string]: any; )
     * To merge the data for specific config property/ies you can define them as array, e.g.['modules','global']
     * Note: When deepMerge:true is not provided, If there is common sub property for the merged object,
     * dynamic fetched config will be overwriting it, otherwise It will be merged deeply.
     */
    merge?: Array<string>;
    /**
     * If merge array is provided, the way of merging will be one-level merge as default.
     * To have deep merge functionality, you have to define deepMerge:true
     */
    deepMerge?: boolean;
}

/**
 * EuiConfig is the main configuration object for the EUI library. It is used to provide the configuration to the EUI library.
 * The EUI library uses the configuration to initialize the services and components.
 */
interface EuiConfig {
    /**
     * The appConfig contains the global configuration and the modules' configuration.
     */
    appConfig: EuiAppConfig;
    /**
     * The environment contains the environment specific configuration.
     */
    environment: EuiEnvConfig;
}

interface EuiLanguage {
    /** the ISO language code e.g. en or fr */
    code: string;
    /** the label of the language translated in that language */
    label: string;
    /** languages with rght to left writing */
    isRtl?: boolean;
}

interface I18nResource {
    /** prefix of the resource could be like the 2 char language code e.g. /en */
    prefix: string;
    /** suffix can be either .json or anything related of the resource HTTP call */
    suffix?: string;
    /**
     It is an ID of the function which should be defined into the customHandlers with the interface TranslationsCompiler
     */
    compileTranslations?: string;
}
/**
 * a factory to compile translations into the main object holding them all
 *
 * @param translations the object to be pre-processed
 * @param lang the translations language
 * @returns the pre-processed translations
 */
type TranslationsCompiler<T = unknown, C = unknown> = (translations: T, lang: string) => C;
interface I18nConfig {
    i18nService: I18nServiceConfig;
    i18nLoader: I18nLoaderConfig;
}
interface I18nServiceConfig {
    /** an ISO 2 char code array of available languages */
    languages?: (string | EuiLanguage)[];
    /** default language to be used in case of not any has been set */
    defaultLanguage?: string;
}
interface I18nLoaderConfig {
    /**
     * Those folders will be used to load the translations files from {@link https://angular.io/guide/workspace-config#extra-build-and-test-options assets}.
     * e.g [`${environment.apiBaseUrl}translations/`, `${environment.apiBaseUrl}translations?lang=`]
     * Important! the language code will be added automatically to the end of the url except if the url ends with a slash.
     */
    i18nFolders?: string | string[];
    /**
     * Array of service urls to translation, don't add the language it will be added e.g. http://net1/trans/en
     * Keep in mind that the url should be the prefix and not contain any suffix.
     */
    i18nServices?: string | string[];
    /**
     * It is a set of more customized resources to be loaded. You can provide a function to compile the translations or simply
     * provide the prefix and suffix of the resource, or both.
     *
     * @example
     * ```typescript
     * export function CompileTranslations(translations: any): any {
     *     const result = {};
     *     translations.forEach((translation: any) => {
     *         // extract the key and value from the translation object
     *         const key = translation['key'];
     *         const value = translation['value'];
     *         if (key && value) {
     *             result[key] = value;
     *         }
     *     });
     *     return result;
     * }
     * export const appConfig: EuiAppConfig = {
     *     ...,
     *     customHandler: {
     *         'CompileTranslations_ID': CompileTranslations
     *     }
     * };
     * export const GLOBAL: GlobalConfig = {
     *     ...,
     *     i18n: {
     *       i18nLoader: {
     *         i18nFolders: ['i18n-eui'],
     *         i18nResources: [{
     *             prefix: 'api/translations/',
     *             compileTranslations: 'CompileTranslations_ID',
     *         }]
     *       }
     *     }
     * };
     *
     */
    i18nResources?: I18nResource | I18nResource[];
}
declare const getI18nServiceConfigFromBase: (baseGlobalConfig: GlobalConfig) => I18nServiceConfig;
declare const getI18nServiceConfig: (config: I18nServiceConfig) => I18nServiceConfig;
declare const getI18nLoaderConfig: (config: I18nLoaderConfig) => I18nLoaderConfig;
/**
 * returns a language code based on https://tools.ietf.org/rfc/bcp/bcp47.txt specification. To get the Browser's
 * it's using the navigator.language, splits by hyphen and get the first part.
 */
declare const getBrowserDefaultLanguage: () => string;
/**
 * returns an array of DOMStrings representing the user's preferred languages. The language is described using BCP 47
 * language tags. In the returned array they are ordered by preference with the most preferred language first.
 * The array languages will be lower cased 2 char code.
 */
declare const getBrowserPreferredLanguages: () => string[];

/** Log level */
declare enum LogLevel {
    OFF = 0,
    FATAL = 1,
    ERROR = 2,
    WARN = 3,
    INFO = 4,
    DEBUG = 5,
    TRACE = 6,
    ALL = 7
}
/** Associated log level names */
declare enum LogLevelName {
    FATAL = "FATAL",
    ERROR = "ERROR",
    WARN = "WARNING",
    INFO = "INFO",
    DEBUG = "DEBUG",
    TRACE = "TRACE"
}
/** The code position from where the log has been triggered */
interface LogPosition {
    file: string;
    line: number;
    column: number;
}
/** The log event sent to the log appenders */
interface LogEvent<MESSAGES = unknown> {
    /** event's log level */
    level: LogLevel;
    /** event's log level name */
    levelName: string;
    /** the name of the logger who triggered the event */
    loggerName: string;
    /** event's timestamp */
    timestamp: Date;
    /** log messages */
    messages: MESSAGES[];
}

/**
 * Abstract Log Appender
 */
declare abstract class LogAppender<CFG extends LogAppenderConfig = LogAppenderConfig> {
    protected config: CFG;
    protected injector: Injector;
    constructor(config: CFG, injector?: Injector);
    /**
     * Gets the config
     *
     * @returns the config
     */
    getConfig(): CFG;
    /**
     * Logs a Log Event
     *
     * @param event log event
     */
    abstract append(event: LogEvent): void;
}

/**
 * Url Appender
 */
declare class UrlAppender extends LogAppender<UrlAppenderConfig> {
    config: UrlAppenderConfig;
    protected injector: Injector;
    protected http: HttpClient;
    constructor(config: UrlAppenderConfig, injector: Injector);
    /**
     * Logs an event to a server
     */
    append(event: LogEvent): void;
    /**
     * Maps a LogEvent into a UrlLogEvent
     */
    protected toUrlEvent(event: LogEvent): UrlLogEvent;
    /**
     * returns the code position from where the log has been triggered
     */
    protected getPosition(): LogPosition;
    /**
     * returns the url of the current page
     */
    protected getLocation(): string;
    /**
     * check messages if object type is Error and make its properties enumerable
     */
    protected filterErrorType(event: LogEvent): LogEvent;
}

/** Default console prefix converters */
declare const DEFAULT_CONSOLE_APPENDER_PREFIX_CONVERTERS: ConsoleAppenderPrefixConverters;
/**
 * Console Appender
 */
declare class ConsoleAppender extends LogAppender<ConsoleAppenderConfig> {
    config: ConsoleAppenderConfig;
    constructor(config?: ConsoleAppenderConfig);
    /**
     * Logs an event in the console
     */
    append(event: LogEvent): void;
    /**
     * Returns the prefix to be added to the messages
     *
     * @param event the log event
     * @returns the formatted prefix, as string
     */
    protected getPrefix(event: LogEvent): string;
    /**
     * Utility method to replace a placeholder
     *
     * @param str the string with placeholders
     * @param find the placeholder
     * @param replace the string to replace the placeholder
     * @returns the converted string
     */
    protected convert(str: string, find: string, replace: string): string;
}

/**
 * Logger
 */
declare class Logger {
    protected name: string;
    protected level: LogLevel;
    protected appenders: LogAppender[];
    constructor(name: string, level: LogLevel, appenders: LogAppender[]);
    static isEnabledFor(enabledFromLevel: LogLevel, level: LogLevel): boolean;
    /**
     * Gets the logger name
     *
     * @returns the logger name
     */
    getName(): string;
    /**
     * Gets the log level
     *
     * @returns the log level
     */
    getLevel(): LogLevel;
    /**
     * Sets the log level
     *
     * @param level log level
     */
    setLevel(level: LogLevel): void;
    /**
     * Fatal log
     *
     * @param message mandatory message
     * @param additionalMessages optional messages
     */
    fatal<T, S>(message: T, ...additionalMessages: S[]): void;
    /**
     * Error log
     *
     * @param message mandatory message
     * @param additionalMessages optional messages
     */
    error<M, A>(message: M, ...additionalMessages: A[]): void;
    /**
     * Warning log
     *
     * @param message mandatory message
     * @param additionalMessages optional messages
     */
    warn<M, A>(message: M, ...additionalMessages: A[]): void;
    /**
     * Info log
     *
     * @param message mandatory message
     * @param additionalMessages optional messages
     */
    info<M, A>(message: M, ...additionalMessages: A[]): void;
    /**
     * Debug log
     *
     * @param message mandatory message
     * @param additionalMessages optional messages
     */
    debug<M, A>(message: M, ...additionalMessages: A[]): void;
    /**
     * Trace log
     *
     * @param message mandatory message
     * @param additionalMessages optional messages
     */
    trace<M, A>(message: M, ...additionalMessages: A[]): void;
    isDisabled: () => boolean;
    isEnabledFor: (level: LogLevel) => boolean;
    isFatalEnabled: () => boolean;
    isErrorEnabled: () => boolean;
    isWarnEnabled: () => boolean;
    isInfoEnabled: () => boolean;
    isDebugEnabled: () => boolean;
    isTraceEnabled: () => boolean;
    isAllEnabled: () => boolean;
    /**
     * Generic log method, checking the log level and calling the specified appenders
     *
     * @param event the log event
     */
    protected log(event: LogEvent): void;
}

declare class LoggerMock extends Logger {
    constructor();
    getLevel(): null;
    setLevel(): void;
    fatal(): void;
    error(): void;
    warn(): void;
    info(): void;
    debug(): void;
    trace(): void;
    isDisabled: () => boolean;
    isEnabledFor: () => boolean;
    isFatalEnabled: () => boolean;
    isErrorEnabled: () => boolean;
    isWarnEnabled: () => boolean;
    isInfoEnabled: () => boolean;
    isDebugEnabled: () => boolean;
    isTraceEnabled: () => boolean;
    isAllEnabled: () => boolean;
}

/** generic log appender configuration */

interface LogAppenderConfig {
    /** appender log level. It overrides the main log level */
    logLevel?: LogLevel;
}
/** console appender configuration */
interface ConsoleAppenderConfig extends LogAppenderConfig {
    /** customizable prefix to be added to the log messages */
    prefixFormat?: string;
    /** pluggable custom prefix converters */
    prefixConverters?: ConsoleAppenderPrefixConverters;
}
/** The type of pluggable console prefix converters */
type ConsoleAppenderPrefixConverters = {
    [key: string]: (event: LogEvent) => string;
};
/** log configuration */
interface LogConfig {
    /** the name of the default logger, if LogService is used directly. Default: root */
    baseLoggerName?: string;
    /** log level. Default: LogLevel.ERROR */
    logLevel?: LogLevel;
    /** a list of log appenders' types. Default: ConsoleAppender with prefixFormat: '[{level}]' */
    logAppenders?: LogAppenderType | LogAppenderType[];
}
/** log appender type, containing also the configuration of the specified appender */
type LogAppenderType = Type<LogAppender> | LogAppenderTypeConfig | ConsoleAppenderTypeConfig | UrlAppenderTypeConfig;
/** log appender configuration including also the type of the appender */
interface LogAppenderTypeConfig extends LogAppenderConfig {
    /** the log appender type */
    type: Type<LogAppender>;
    /** additional configuration specific to the log appender */
    [key: string]: any;
}
/** console appender configuration including also the type of the console appender */
interface ConsoleAppenderTypeConfig extends ConsoleAppenderConfig {
    /** the console appender type */
    type: Type<ConsoleAppender>;
}
/** url appender configuration including also the type of the url appender */
interface UrlAppenderTypeConfig extends UrlAppenderConfig {
    /** the url appender type */
    type: Type<UrlAppender>;
}
/** url appender configuration */
interface UrlAppenderConfig extends LogAppenderConfig {
    /** url to POST the log event to a server */
    url: string;
    /** extended log event triggered after the mentioned level. If missing, the extended log level is not triggered */
    detailedEventFromLevel?: LogLevel;
}
/** url log event */
interface UrlLogEvent extends LogEvent {
    /** the code position from where the log has been triggered */
    position?: LogPosition;
    /** the url of the current page */
    location?: string;
}

/** User API configuration */

interface LocaleServiceConfig {
    /**
     * When enabled changes from I18nService will be reflected to locale state
     */
    bindWithTranslate?: boolean;
}
/**
 * responsible to extract the attributes "available" and "id" from the locale configuration
 */
declare const getLocaleServiceConfigFromBase: (baseGlobalConfig: GlobalConfig) => LocaleServiceConfig;

interface AppState<T = any> {
    version?: string;
    /** flag to indicate if the application is online/offline. Default: true */
    connected?: boolean;
    loadedConfigModules?: LoadedConfigModules;
    status?: string;
    currentModule?: string;
    apiQueue?: ApiQueue;
    [key: string]: string | boolean | LoadedConfigModules | ApiQueue | T;
}
declare const initialAppState: AppState;
/**
 * LoadedConfigModules
 * @property lastAddedModule - the last module added to the store
 * @property modulesConfig - the modules configuration
 */
interface LoadedConfigModules {
    lastAddedModule?: string;
    modulesConfig: ModulesConfig;
}

interface UserState extends UserDetails {
    userId: string;
    firstName?: string;
    lastName?: string;
    fullName?: string;
    preferences?: UserPreferences;
    rights?: EuiUserRight[];
}
declare const initialUserState: UserState;

/**
 * The notifications state.
 * @template LIST The type of the list of notifications.
 */
interface NotificationsState<LIST = unknown> {
    list?: LIST[];
}
/**
 * The initial state of the notifications state.
 */
declare const initialNotificationsState: NotificationsState;

interface I18nState {
    activeLang: string;
}
declare const initialI18nState: I18nState;

/**
 * The locale state is used to store the current locale id and the list of available locales.
 */
interface LocaleState {
    /** The current locale id e.g. 'en-US' */
    id: string;
}
/**
 * The initial state of the locale state. The default locale is English US ('en').
 */
declare const initialLocaleState: LocaleState;

interface CoreState {
    app?: AppState;
    user?: UserState;
    notifications?: NotificationsState;
    i18n?: I18nState;
    locale?: LocaleState;
}
declare const initialCoreState: CoreState;

declare const getAppVersion: Selector<AppState, string>;
declare const getAppConnection: Selector<AppState, boolean>;
/**
 * Returns the loaded config modules from the app state
 * @deprecated It will be removed in the future.
 */
declare const getAppLoadedConfigModules: Selector<AppState, LoadedConfigModules>;
/**
 * Returns the last added module from the app state
 * @deprecated It will be removed in the future.
 */
declare const getLastAddedModule: Selector<AppState, string>;
declare const getAppStatus: Selector<AppState, string>;
declare const getCurrentModule: Selector<AppState, string>;
declare const getApiQueue: Selector<AppState, ApiQueue>;
declare const getApiQueueItem: (itemId: string) => Selector<AppState, ApiQueueItem>;

declare const getAppState: (state: CoreState) => AppState;
declare const getUserState: (state: CoreState) => UserState;
declare const getNotificationsState: (state: CoreState) => NotificationsState;
declare const getI18nState: (state: CoreState) => I18nState;
declare const getLocaleState: (state: CoreState) => LocaleState;

declare const getActiveLang: Selector<CoreState, string>;

declare const getUserDetails: Selector<CoreState, UserDetails>;
declare const getUserPreferences: Selector<CoreState, UserPreferences>;
declare const getUserId: Selector<CoreState, string>;
declare const getUserFirstName: Selector<CoreState, string>;
declare const getUserLastName: Selector<CoreState, string>;
declare const getUserFullName: Selector<CoreState, string>;
declare const getUserLang: Selector<UserPreferences, string>;
declare const getUserRights: Selector<CoreState, EuiUserRight[]>;
declare const getUserRight: (rightId: string) => Selector<CoreState, EuiUserRight>;
declare const getUserRightPermissions: (rightId: string) => Selector<CoreState, string[]>;
declare const getUserDashboard: Selector<UserPreferences<unknown>, unknown>;

declare const getNotificationsList: Selector<AppState, unknown[]>;

/** User API configuration */

interface UserConfig {
    defaultUserPreferences?: UserPreferences;
}

type EuiAppConfig = EuiAppJsonConfig & EuiAppHandlersConfig;
interface EuiAppJsonConfig<T = any> {
    global: GlobalConfig;
    modules?: ModulesConfig;
    versions?: VersionsConfig;
    [key: string]: GlobalConfig | T;
}
interface EuiAppHandlersConfig<T = any> {
    httpErrorHandler?: HttpErrorHandlerConfig;
    errorMappingHandler?: ErrorMappingHandler;
    log?: LogConfig;
    customHandler?: {
        [handlerId: string]: T;
    };
}
interface GlobalConfig<T = any> {
    /** show/hide connection status */
    showConnectionStatus?: ConnectionStatus;
    user?: UserConfig;
    i18n?: I18nConfig;
    locale?: LocaleServiceConfig;
    eui?: EuiGlobalConfig;
    [key: string]: boolean | UserConfig | I18nConfig | LocaleServiceConfig | EuiGlobalConfig | ConnectionStatus | T;
}
interface EuiGlobalConfig {
    assetsBaseUrl?: string;
    theme?: string;
}
interface ConnectionStatus {
    messageBox: {
        lifespan: number;
    };
    enabled: boolean;
}
interface ModulesConfig {
    [module: string]: ModuleConfig;
}
interface ModuleConfig<T = any> extends LogConfig, I18nLoaderConfig {
    [key: string]: string | string[] | I18nResource | I18nResource[] | LogLevel | LogAppenderType | LogAppenderType[] | T;
}
interface VersionsConfig {
    app?: string;
    [module: string]: string;
}

interface EuiServiceModel<T> {
    init(t: T): Observable<EuiServiceStatus>;
    /**
     * retrieves the State of the service. If you don't pass anything it will retrieve the whole State
     * of that service. If you pass a selector or MapFunction it will retrieve a slice of the state. If
     * you pass a string that's a key of the Service State type it will retrieve that slice of the state.
     */
    getState<K = T>(): Observable<T>;
    getState<K>(mapFn: (state: T) => K): Observable<K>;
    getState<A extends keyof T>(key: A): Observable<T[A]>;
    getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;
    updateState(t: T): void;
}
type DeepPartial<T> = {
    [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
};
declare abstract class EuiService<T> implements EuiServiceModel<T> {
    protected stateInstance: T;
    protected prevStateInstance: T;
    protected $stateSubs: Subscription;
    protected $stateLazyLoadSubs: Subscription;
    onStateChange: Subject<T>;
    protected constructor(defaultState: T);
    initEuiService(): void;
    abstract init(t?: T): Observable<EuiServiceStatus>;
    abstract getState<K = T>(): Observable<T>;
    abstract getState<K>(mapFn?: (state: T) => K): Observable<K>;
    abstract getState<A extends keyof T>(key?: A): Observable<T[A]>;
    abstract getState<K>(keyOrMapFn?: ((state: T) => K) | string): Observable<K>;
    abstract updateState(t: DeepPartial<T>): void;
    protected unSubscribe(): void;
    /**
     * deep merge two objects
     * @param target the object that will be merged into
     * @param source the object that will be merged from
     */
    protected deepMerge<T>(target: T, source: DeepPartial<T>): T;
    /**
     * checks if the given item is an object
     * @param item the item that will be checked
     */
    private isObject;
    /**
     * returns a copy of the given value whether this value is object or primitive. For the arrays it will cover
     * multidimensional arrays, but it will not cover an object that contain functions. JSON.parse and JSON.stringify
     * might have performance issues on large scale objects but that's an edge case scenario. In case that happens in
     * the future follow the technique of NGRX with function caching.
     *
     * @param state
     */
    private copy;
}
declare abstract class EuiLazyService<T> extends EuiService<T> {
    protected stateInstance: T;
    protected $stateSubs: Subscription;
    protected $stateLazyLoadSubs: Subscription;
    protected constructor(defaultState: T);
    abstract lazyLoadInit(moduleConfig: ModuleConfig, moduleName?: string): Observable<EuiServiceStatus>;
    initEuiService(storeForLazyLoad?: EuiStoreServiceModel<T>): void;
}
/**
 * EuiServiceStatus is a model that represents the status of the service. It has a boolean property that indicates
 * whether the service was successful or not. If the service was not successful it will have an error property that
 * contains the error message.
 * @param T the type of the error message
 * @property success a boolean property that indicates whether the service was successful or not
 * @property error an optional property that contains the error message
 */
interface EuiServiceStatus<T = unknown> {
    success: boolean;
    error?: T;
}

interface EuiPaginationConfig {
    totalItems?: number;
    pageSize?: number;
    currentPage?: number;
    pageWindowSize?: number;
}
declare const DefaultConfig: EuiPaginationConfig;
declare class EuiPagination {
    private totalItems;
    private pageSize;
    private currentPage;
    private pageWindowSize;
    private constructor();
    static create(config?: EuiPaginationConfig): EuiPagination;
    getFirstPage(): number;
    getLastPage(): number;
    isFirstPageActive(): boolean;
    isLastPageActive(): boolean;
    hasItems(): boolean;
    getPagesCount(): number;
    getPages(): Array<number>;
    goToPage(page: number): void;
    goToFirstPage(): void;
    goToLastPage(): void;
    goToNextPage(): void;
    goToPreviousPage(): void;
    hasPreviousPage(): boolean;
    hasNextPage(): boolean;
    getTotalItems(): number;
    getPageSize(): number;
    setPageSize(size: number): void;
    getCurrentPage(): number;
    getPageWindowSize(): number;
    setPageWindowSize(size: number): void;
    getShowingFrom(): number;
    getShowingTo(): number;
}
declare const range: (start: number, end?: number, step?: number) => Array<number>;

declare const EUI_COLORS: {
    text: string;
    default: string;
    black: string;
    white: string;
    primary: string;
    primaryDark: string;
    primaryDarker: string;
    primaryDarkest: string;
    primaryDarkester: string;
    primaryDarkester2: string;
    primaryLight: string;
    primaryLighter: string;
    primaryLightest: string;
    primaryLightester: string;
    primaryLightester2: string;
    accent: string;
    accentDark: string;
    accentDarker: string;
    accentDarkest: string;
    accentDarkester: string;
    accentDarkester2: string;
    accentLight: string;
    accentLighter: string;
    accentLightest: string;
    accentLightester: string;
    accentLightester2: string;
    info: string;
    infoDark: string;
    infoDarker: string;
    infoDarkest: string;
    infoDarkester: string;
    infoDarkester2: string;
    infoLight: string;
    infoLighter: string;
    infoLightest: string;
    infoLightester: string;
    infoLightester2: string;
    success: string;
    successDark: string;
    successDarker: string;
    successDarkest: string;
    successDarkester: string;
    successDarkester2: string;
    successLight: string;
    successLighter: string;
    successLightest: string;
    successLightester: string;
    successLightester2: string;
    warning: string;
    warningDark: string;
    warningDarker: string;
    warningDarkest: string;
    warningDarkester: string;
    warningDarkester2: string;
    warningLight: string;
    warningLighter: string;
    warningLightest: string;
    warningLightester: string;
    warningLightester2: string;
    danger: string;
    dangerDark: string;
    dangerDarker: string;
    dangerDarkest: string;
    dangerDarkester: string;
    dangerDarkester2: string;
    dangerLight: string;
    dangerLighter: string;
    dangerLightest: string;
    dangerLightester: string;
    dangerLightester2: string;
    grey: string;
    greyDark: string;
    greyDarker: string;
    greyDarkest: string;
    greyDarkester: string;
    greyDarkester2: string;
    greyLight: string;
    greyLighter: string;
    greyLightest: string;
    greyLightester: string;
    greyLightester2: string;
};

interface EuiAuthConfig {
    isLoggedIn?: boolean;
    redirectUrl?: string;
    loginPageUrl?: string;
}
declare const EUI_DEFAULT_AUTH_CONFIG: EuiAuthConfig;

type EuiLanguageCode = string | EuiLanguage;
declare class EuiEuLanguages {
    private static languages;
    private static allLanguages;
    /**
     * Matches the given string array to the EU languages and returns a EuiLanguage array.
     * In case that no codes provided it returns the EU Languages array.
     *
     * @param codes A string array of 2 char codes
     */
    static getLanguages(codes?: EuiLanguageCode[]): EuiLanguage[];
    /**
     * filters and removes language codes that are not part of the EULanguage
     * e.g. 'ko' does not map to any EULanguage code on the array.
     *      { code: 'ko', label: 'whatever' } is valid though
     *
     * @param codes codes A string array of 2 char codescodes A string array of 2 char codes
     */
    static filterInvalidLanguageCodes(codes: EuiLanguageCode[]): EuiLanguageCode[];
    /**
     * return the given list ordered based on the EULanguage order
     *
     * @param codes codes A string array of 2 char codes
     */
    static getOrderedLanguages(codes?: EuiLanguageCode[]): EuiLanguage[];
    /**
     * retrieve language codes (string array) from a given array of string and EuiLanguage items
     *
     * @param array It can be an mixed array of string and EuiLanguage items
     */
    static getLanguageCodes(array: EuiLanguageCode[]): string[];
    /**
     * filter non EU languages from given array
     *
     * @param array An array of EuiLanguage items
     */
    static filterNonEULanguages(array: EuiLanguage[]): EuiLanguage[];
    /**
     * filter EU Languages from given array
     *
     * @param array An array of EuiLanguage items
     */
    static filterEULanguages(array: EuiLanguage[]): EuiLanguage[];
    /**
     * @param code language code, ex. 'lu'
     */
    static getLanguageByCode(code: string): EuiLanguage;
    /**
     * @param code language code, ex. 'lu'
     */
    static isEuLanguage(code: string): boolean;
    /**
     * Returns array of EuiLanguage that match the given codes. If codes array is empty, returns all languages.
     * @param codes A string array of 2 char codes, ex. ['en', 'de']
     */
    static getAllLanguagesByCodes(codes: string[]): EuiLanguage[];
}

interface EuiUserRight {
    id: string;
    permissions?: string[];
}

interface EuiMenuItem<METADATA = unknown> {
    id?: string;
    e2eAttr?: string;
    label?: string;
    initials?: string;
    url?: string;
    queryParams?: any;
    urlExternal?: string;
    urlExternalTarget?: string;
    link?: boolean;
    iconClass?: string;
    iconTypeClass?: string;
    iconSvgName?: string;
    iconSvgUrl?: string;
    iconLabel?: string;
    expanded?: boolean;
    active?: boolean;
    children?: EuiMenuItem[];
    parent?: EuiMenuItem;
    visible?: boolean;
    tagLabel?: string;
    tagTypeClass?: string;
    tooltip?: string;
    hasMarker?: boolean;
    markerTypeClass?: string;
    category?: string;
    disabled?: boolean;
    filtered?: boolean;
    actionIcon?: {
        /** icon can also include the set in the format of `icon:set` */
        icon: string;
        color?: string;
        label?: string;
        action?: (event: unknown) => void;
    };
    command?: (...params: any[]) => void;
    allowedRightId?: string;
    allowedRightIds?: string[];
    deniedRightId?: string;
    deniedRightIds?: string[];
    metadata?: METADATA;
    isMegaMenu?: boolean;
    megaMenuColIndex?: number;
    megaMenuColLabel?: string;
}

/**
 * Is used to define the structure of objects used for handling messages or notifications in a user interface. It allows
 * for flexibility by allowing additional custom properties while also providing a set of predefined properties like
 * severity, summary, detail, life, and sticky for common message attributes.
 */
interface EuiGrowlMessage {
    severity?: 'success' | 'warning' | 'info' | 'danger' | string;
    summary?: string;
    detail?: string;
    life?: number;
    sticky?: boolean;
    filled?: boolean;
    /**
     * The timeout property is used to define the time in milliseconds before the message is automatically removed from the
     * user interface. This property is only used when the sticky property is set to false.
     */
    timeout?: number;
}

/**
 * polyfill for usage of crypto.randomUUID() on non HTTPS environments EUI-10272
 * Please remove in the future when EC Policy for HTTPS is enforced.
 */
type UUID = `${string}-${string}-${string}-${string}-${string}`;

export { ConsoleAppender, DEFAULT_CONSOLE_APPENDER_PREFIX_CONVERTERS, DEFAULT_XHR_CONFIG, DefaultConfig, EUI_COLORS, EUI_DEFAULT_AUTH_CONFIG, EuiEuLanguages, EuiLazyService, EuiPagination, EuiService, LogAppender, LogLevel, LogLevelName, Logger, LoggerMock, UrlAppender, UxBadgeLegacy, UxClearErrorFeedbackEvent, UxErrorGroupOnClickEvent, UxErrorOutput, UxLinkLegacy, UxMessageSeverity, UxMessageSeverityMetrics, UxPublishErrorFeedbackEvent, UxValidationErrorClass, getActiveLang, getApiQueue, getApiQueueItem, getAppConnection, getAppLoadedConfigModules, getAppState, getAppStatus, getAppVersion, getBrowserDefaultLanguage, getBrowserPreferredLanguages, getCurrentModule, getI18nLoaderConfig, getI18nServiceConfig, getI18nServiceConfigFromBase, getI18nState, getLastAddedModule, getLocaleServiceConfigFromBase, getLocaleState, getNotificationsList, getNotificationsState, getUserDashboard, getUserDetails, getUserFirstName, getUserFullName, getUserId, getUserLang, getUserLastName, getUserPreferences, getUserRight, getUserRightPermissions, getUserRights, getUserState, initialAppState, initialCoreState, initialI18nState, initialLocaleState, initialNotificationsState, initialUserPreferences, initialUserState, isObject, merge, mergeAll, mergeDeep, range, transformToUxHttpResponse, xhr };
export type { ApiQueue, ApiQueueItem, AppState, ConnectionStatus, ConsoleAppenderConfig, ConsoleAppenderPrefixConverters, ConsoleAppenderTypeConfig, CoreState, DeepPartial, EnvDynamicConfig, ErrorMappingHandler, EuiAppConfig, EuiAppHandlersConfig, EuiAppJsonConfig, EuiAuthConfig, EuiConfig, EuiEnvConfig, EuiGlobalConfig, EuiGrowlMessage, EuiLanguage, EuiLanguageCode, EuiMenuItem, EuiPaginationConfig, EuiServiceModel, EuiServiceStatus, EuiStoreServiceModel, EuiUserRight, GlobalConfig, HttpErrorCallbackFn, HttpErrorHandlerConfig, HttpErrorRouteConfig, I18nConfig, I18nLoaderConfig, I18nResource, I18nServiceConfig, I18nState, LoadedConfigModules, LocaleServiceConfig, LocaleState, LogAppenderConfig, LogAppenderType, LogAppenderTypeConfig, LogConfig, LogEvent, LogPosition, ModuleConfig, ModulesConfig, NotificationsState, SubErrors, TranslationsCompiler, UUID, UrlAppenderConfig, UrlAppenderTypeConfig, UrlLogEvent, UserConfig, UserDetails, UserPreferences, UserState, UxErrorFeedback, UxErrorFeedbackEventType, UxErrorFollowMap, UxErrorGroupItem, UxErrorGroupMap, UxErrorInfo, UxErrorMessage, UxFormValidationError, UxHttpErrorInfo, UxHttpErrorResponse, UxModalLegacy, UxValidationErrorAttribute, UxValidationErrorAttributes, UxValidationErrorFeedback, UxValidationErrorI18nMessage, VersionsConfig, XHRConfig };
//# sourceMappingURL=eui-base.d.ts.map
