import { ChangeDetectorRef, EventEmitter, InjectionToken, Injector, StaticProvider } from "@angular/core";
import { AbstractControl, FormGroup } from "@angular/forms";
import { EventBus, IEvent } from "@nova-ui/bits";
/**
 * Same as Partial<T> but goes deeper and makes all of its properties and sub-properties Parti al<T>.
 */
export type DeepPartial<T> = T extends object ? {
    [K in keyof T]?: DeepPartial<T[K]>;
} : T;
export declare const PIZZAGNA_EVENT_BUS: InjectionToken<EventBus<IEvent<any>>>;
export declare const DASHBOARD_EVENT_BUS: InjectionToken<EventBus<IEvent<any>>>;
export declare const DATA_SOURCE: InjectionToken<EventBus<IEvent<any>>>;
export declare const FORMATTERS_REGISTRY: InjectionToken<EventBus<IEvent<any>>>;
export declare const TEST_REGISTRY: InjectionToken<EventBus<IEvent<any>>>;
export declare const HEADER_LINK_PROVIDER: InjectionToken<EventBus<IEvent<any>>>;
export declare enum WellKnownProviders {
    DataSource = "dataSource",
    Adapter = "adapter",
    Converter = "converter",
    Broadcaster = "broadcaster",
    Refresher = "refresher",
    EventProxy = "eventProxy",
    LoadingAdapter = "loadingAdapter",
    ContentFallbackAdapter = "contentFallbackAdapter",
    InteractionHandler = "interactionHandler",
    EventBusDebugger = "eventBusDebugger",
    KpiColorPrioritizer = "kpiColorPrioritizer",
    FormattersRegistry = "formattersRegistry",
    DataSourceManager = "dataSourceManager"
}
export declare enum WellKnownPathKey {
    Root = "root",
    DataSourceConfigComponentType = "dataSourceConfigComponentType",
    TileDescriptionConfigComponentType = "tileDescriptionConfigComponentType",
    DataSourceProviders = "dataSourceProviders",
    Formatters = "formatters",
    TileDescriptionBackgroundColors = "tileDescriptionBackgroundColors",
    TileBackgroundColorRulesBackgroundColors = "tileBackgroundColorRulesBackgroundColors"
}
export declare enum WellKnownDataSourceFeatures {
    Interactivity = "interactivity",
    DisableTableColumnGeneration = "disableTableColumnGeneration"
}
export type IProperties = Record<string, any>;
export interface IProviderProperties extends IProperties {
    /** This is property is set by the component portal directive to give providers self-awareness they need to update properties in pizzagna. */
    providerKey?: string;
}
export interface ISerializableTimeframe {
    startDatetime: string;
    endDatetime: string;
    selectedPresetId?: string;
    title?: string;
}
export interface IComponentConfiguration {
    id: string;
    componentType: string;
    providers?: Record<string, IProviderConfiguration>;
    properties?: IProperties;
}
export interface IProviderConfiguration {
    providerId: string;
    properties?: IProviderProperties;
}
export interface IProviderConfigurationForDisplay extends IProviderConfiguration {
    label: string;
}
export interface IPortalEnvironment {
    providers?: StaticProvider[];
    injector?: Injector;
}
export type IPizzagnaLayer = Record<string, DeepPartial<IComponentConfiguration>>;
export type IPizzagna = Record<string, IPizzagnaLayer>;
export type IPizza = Record<string, IComponentConfiguration>;
/**
 * Interface for components that can be dynamically refreshed from the outside using the changeDetector
 */
export interface IHasChangeDetector {
    changeDetector: ChangeDetectorRef;
}
/**
 * Interface for components that expose a form
 */
export interface IHasForm<T extends AbstractControl = FormGroup> {
    form: T;
    formReady: EventEmitter<T>;
}
/**
 * Interface for providers that require the related component info
 */
export interface IHasComponent<T = any> {
    setComponent(component: T, componentId: string): void;
}
/**
 * Interface for configurable providers
 */
export interface IConfigurable {
    providerKey?: string;
    setComponent?: (component: any, componentId: string) => void;
    updateConfiguration(properties: IProperties): void;
}
export declare enum PizzagnaLayer {
    Structure = "structure",
    Configuration = "configuration",
    Data = "data"
}
export declare enum AccordionState {
    CRITICAL = "critical",
    WARNING = "warning",
    DEFAULT = "default"
}
export declare enum HttpStatusCode {
    Unknown = "0",
    Ok = "200",
    Forbidden = "403",
    NotFound = "404"
}
export interface IPaletteColor {
    color: string;
    label: string;
}
export type ComparatorFn = (a: any, b: any) => boolean;
export type ComparatorTypes = ">" | ">=" | "==" | "<" | "<=";
export interface IBackgroundColorComparator {
    comparatorFn: ComparatorFn;
    label?: string;
}
export type IComparatorsDict = Partial<Record<ComparatorTypes | string, IBackgroundColorComparator>>;
