/// <reference types="react" />
import { K8sModel } from '../api/common-types';
import { Extension, ExtensionDeclaration, CodeRef, ResolvedExtension } from '../types';
import { K8sResourceCommon, PrometheusResponse, ResourcesObject, StatusGroupMapper, WatchK8sResources, WatchK8sResults, FirehoseResource, FirehoseResult } from './console-types';
import { CardSpan, GetOperatorsWithStatuses, K8sActivityProps, OperatorRowProps, PrometheusActivityProps, PrometheusHealthHandler, PrometheusHealthPopupProps, ResourceHealthHandler, URLHealthHandler } from './dashboard-types';
/** Adds a new dashboard tab, placed after the Overview tab. */
export declare type DashboardsTab = ExtensionDeclaration<'console.dashboards/tab', {
    /** A unique tab identifier, used as tab link `href` and when adding cards to this tab. */
    id: string;
    /** NavSection to which the tab belongs to */
    navSection: 'home' | 'storage';
    /** The title of the tab. */
    title: string;
}>;
/** Adds a new dashboard card. */
export declare type DashboardsCard = ExtensionDeclaration<'console.dashboards/card', {
    /** The id of the dashboard tab to which the card will be added. */
    tab: string;
    /** The grid position of the card on the dashboard. */
    position: 'LEFT' | 'RIGHT' | 'MAIN';
    /** Dashboard card component. */
    component: CodeRef<React.ComponentType>;
    /** Card's vertical span in the column. Ignored for small screens, defaults to 12. */
    span?: CardSpan;
}>;
/** Adds a health subsystem to the status card of Overview dashboard where the source of status is Prometheus. */
export declare type DashboardsOverviewHealthPrometheusSubsystem = ExtensionDeclaration<'console.dashboards/overview/health/prometheus', {
    /** The display name of the subsystem. */
    title: string;
    /** The Prometheus queries */
    queries: string[];
    /** Resolve the subsystem's health. */
    healthHandler: CodeRef<PrometheusHealthHandler>;
    /** Additional resource which will be fetched and passed to `healthHandler`. */
    additionalResource?: CodeRef<FirehoseResource>;
    /** Loader for popup content. If defined, a health item will be represented as a link which opens popup with given content. */
    popupComponent?: CodeRef<React.ComponentType<PrometheusHealthPopupProps>>;
    /** The title of the popover. */
    popupTitle?: string;
    /** Optional classname for the popup top-level component. */
    popupClassname?: string;
    /** If true, the popup will stay open when clicked outside of its boundary. Default: false */
    popupKeepOnOutsideClick?: boolean;
    /** Control plane topology for which the subsystem should be hidden. */
    disallowedControlPlaneTopology?: string[];
}>;
/** Adds a health subsystem to the status card of Overview dashboard where the source of status is a K8s REST API. */
export declare type DashboardsOverviewHealthURLSubsystem<T = any, R extends K8sResourceCommon | K8sResourceCommon[] = K8sResourceCommon | K8sResourceCommon[]> = ExtensionDeclaration<'console.dashboards/overview/health/url', {
    /** The display name of the subsystem. */
    title: string;
    /** The URL to fetch data from. It will be prefixed with base k8s URL. */
    url: string;
    /** Resolve the subsystem's health. */
    healthHandler: CodeRef<URLHealthHandler<T>>;
    /** Additional resource which will be fetched and passed to `healthHandler`. */
    additionalResource?: CodeRef<FirehoseResource>;
    /** Loader for popup content. If defined, a health item will be represented as a link which opens popup with given content. */
    popupComponent?: CodeRef<React.ComponentType<{
        healthResult?: T;
        healthResultError?: any;
        k8sResult?: FirehoseResult<R>;
    }>>;
    /** The title of the popover. */
    popupTitle?: string;
}>;
/** Adds a health subsystem to the status card of Overview dashboard where the source of status is a K8s Resource. */
export declare type DashboardsOverviewHealthResourceSubsystem<T extends ResourcesObject = ResourcesObject> = ExtensionDeclaration<'console.dashboards/overview/health/resource', {
    /** The display name of the subsystem. */
    title: string;
    /** Kubernetes resources which will be fetched and passed to `healthHandler`. */
    resources: CodeRef<WatchK8sResources<T>>;
    /** Resolve the subsystem's health. */
    healthHandler: CodeRef<ResourceHealthHandler<T>>;
    /** Loader for popup content. If defined, a health item will be represented as a link which opens popup with given content. */
    popupComponent?: CodeRef<WatchK8sResults<T>>;
    /** The title of the popover. */
    popupTitle?: string;
}>;
/** Adds a health subsystem to the status card of Overview dashboard where the source of status is a K8s REST API. */
export declare type DashboardsOverviewHealthOperator<T extends K8sResourceCommon = K8sResourceCommon> = ExtensionDeclaration<'console.dashboards/overview/health/operator', {
    /** Title of operators section in the popup. */
    title: string;
    /** Kubernetes resources which will be fetched and passed to `healthHandler`. */
    resources: CodeRef<FirehoseResource[]>;
    /** Resolves status for the operators. */
    getOperatorsWithStatuses?: CodeRef<GetOperatorsWithStatuses<T>>;
    /** Loader for popup row component. */
    operatorRowLoader?: CodeRef<React.ComponentType<OperatorRowProps<T>>>;
    /** Links to all resources page. If not provided then a list page of the first resource from resources prop is used. */
    viewAllLink?: string;
}>;
/** Adds an inventory status group. */
export declare type DashboardsInventoryItemGroup = ExtensionDeclaration<'console.dashboards/overview/inventory/item/group', {
    /** The id of the status group. */
    id: string;
    /** React component representing the status group icon. */
    icon: CodeRef<React.ReactElement>;
}>;
/** Adds a resource tile to the overview inventory card. */
export declare type DashboardsOverviewInventoryItem<T extends K8sModel = K8sModel, R extends {
    [key: string]: K8sResourceCommon[];
} = {
    [key: string]: K8sResourceCommon[];
}> = ExtensionDeclaration<'console.dashboards/overview/inventory/item', DashboardsOverviewInventoryItemProperties<T, R> & {}>;
/** Replaces an overview inventory card. */
export declare type DashboardsOverviewInventoryItemReplacement<T extends K8sModel = K8sModel, R extends {
    [key: string]: K8sResourceCommon[];
} = {
    [key: string]: K8sResourceCommon[];
}> = ExtensionDeclaration<'console.dashboards/overview/inventory/item/replacement', DashboardsOverviewInventoryItemProperties<T, R> & {}>;
/** Adds a resource tile to the project overview inventory card. */
export declare type DashboardsProjectOverviewInventoryItem<T extends K8sModel = K8sModel, R extends {
    [key: string]: K8sResourceCommon[];
} = {
    [key: string]: K8sResourceCommon[];
}> = ExtensionDeclaration<'console.dashboards/project/overview/item', DashboardsOverviewInventoryItemProperties<T, R> & {}>;
/** Adds an activity to the Activity Card of Overview Dashboard where the triggering of activity is based on watching a K8s resource. */
export declare type DashboardsOverviewResourceActivity<T extends K8sResourceCommon = K8sResourceCommon> = ExtensionDeclaration<'console.dashboards/overview/activity/resource', {
    /** The utilization item to be replaced. */
    k8sResource: CodeRef<FirehoseResource & {
        isList: true;
    }>;
    /** Function which determines if the given resource represents the action. If not defined, every resource represents activity. */
    isActivity?: CodeRef<(resource: T) => boolean>;
    /** Timestamp for the given action, which will be used for ordering. */
    getTimestamp?: CodeRef<(resource: T) => Date>;
    /** The action component. */
    component: CodeRef<React.ComponentType<K8sActivityProps<T>>>;
}>;
/** Adds an activity to the Activity Card of Prometheus Overview Dashboard where the triggering of activity is based on watching a K8s resource. */
export declare type DashboardsOverviewPrometheusActivity = ExtensionDeclaration<'console.dashboards/overview/prometheus/activity/resource', {
    /** Queries to watch */
    queries: string[];
    /** Function which determines if the given resource represents the action. If not defined, every resource represents activity. */
    isActivity?: CodeRef<(results: PrometheusResponse[]) => boolean>;
    /** The action component. */
    component: CodeRef<React.ComponentType<PrometheusActivityProps>>;
}>;
export declare const isDashboardsTab: (e: Extension) => e is DashboardsTab;
export declare const isDashboardsCard: (e: Extension) => e is DashboardsCard;
export declare const isDashboardsOverviewHealthPrometheusSubsystem: (e: Extension) => e is DashboardsOverviewHealthPrometheusSubsystem;
export declare const isResolvedDashboardsOverviewHealthPrometheusSubsystem: (e: Extension) => e is ResolvedExtension<DashboardsOverviewHealthPrometheusSubsystem, {
    /** The display name of the subsystem. */
    title: string;
    /** The Prometheus queries */
    queries: string[];
    /** Resolve the subsystem's health. */
    healthHandler: CodeRef<PrometheusHealthHandler>;
    /** Additional resource which will be fetched and passed to `healthHandler`. */
    additionalResource?: CodeRef<FirehoseResource>;
    /** Loader for popup content. If defined, a health item will be represented as a link which opens popup with given content. */
    popupComponent?: CodeRef<React.ComponentType<PrometheusHealthPopupProps>>;
    /** The title of the popover. */
    popupTitle?: string;
    /** Optional classname for the popup top-level component. */
    popupClassname?: string;
    /** If true, the popup will stay open when clicked outside of its boundary. Default: false */
    popupKeepOnOutsideClick?: boolean;
    /** Control plane topology for which the subsystem should be hidden. */
    disallowedControlPlaneTopology?: string[];
}>;
export declare const isDashboardsOverviewHealthURLSubsystem: (e: Extension) => e is DashboardsOverviewHealthURLSubsystem<any, K8sResourceCommon | K8sResourceCommon[]>;
export declare const isResolvedDashboardsOverviewHealthURLSubsystem: (e: Extension) => e is ResolvedExtension<DashboardsOverviewHealthURLSubsystem<any, K8sResourceCommon | K8sResourceCommon[]>, {
    /** The display name of the subsystem. */
    title: string;
    /** The URL to fetch data from. It will be prefixed with base k8s URL. */
    url: string;
    /** Resolve the subsystem's health. */
    healthHandler: CodeRef<URLHealthHandler<any, K8sResourceCommon | K8sResourceCommon[]>>;
    /** Additional resource which will be fetched and passed to `healthHandler`. */
    additionalResource?: CodeRef<FirehoseResource>;
    /** Loader for popup content. If defined, a health item will be represented as a link which opens popup with given content. */
    popupComponent?: CodeRef<import("react").ComponentType<{
        healthResult?: any;
        healthResultError?: any;
        k8sResult?: FirehoseResult<K8sResourceCommon | K8sResourceCommon[]>;
    }>>;
    /** The title of the popover. */
    popupTitle?: string;
}>;
export declare const isDashboardsOverviewHealthResourceSubsystem: (e: Extension) => e is DashboardsOverviewHealthResourceSubsystem<ResourcesObject>;
export declare const isResolvedDashboardsOverviewHealthResourceSubsystem: (e: Extension) => e is ResolvedExtension<DashboardsOverviewHealthResourceSubsystem<ResourcesObject>, {
    /** The display name of the subsystem. */
    title: string;
    /** Kubernetes resources which will be fetched and passed to `healthHandler`. */
    resources: CodeRef<WatchK8sResources<ResourcesObject>>;
    /** Resolve the subsystem's health. */
    healthHandler: CodeRef<ResourceHealthHandler<ResourcesObject>>;
    /** Loader for popup content. If defined, a health item will be represented as a link which opens popup with given content. */
    popupComponent?: CodeRef<WatchK8sResults<ResourcesObject>>;
    /** The title of the popover. */
    popupTitle?: string;
}>;
export declare const isDashboardsOverviewHealthOperator: (e: Extension) => e is DashboardsOverviewHealthOperator<K8sResourceCommon>;
export declare const isResolvedDashboardsOverviewHealthOperator: (e: Extension) => e is ResolvedExtension<DashboardsOverviewHealthOperator<K8sResourceCommon>, {
    /** Title of operators section in the popup. */
    title: string;
    /** Kubernetes resources which will be fetched and passed to `healthHandler`. */
    resources: CodeRef<FirehoseResource[]>;
    /** Resolves status for the operators. */
    getOperatorsWithStatuses?: CodeRef<GetOperatorsWithStatuses<K8sResourceCommon>>;
    /** Loader for popup row component. */
    operatorRowLoader?: CodeRef<import("react").ComponentType<OperatorRowProps<K8sResourceCommon>>>;
    /** Links to all resources page. If not provided then a list page of the first resource from resources prop is used. */
    viewAllLink?: string;
}>;
export declare const isDashboardsInventoryItemGroup: (e: Extension) => e is DashboardsInventoryItemGroup;
export declare const isDashboardsOverviewInventoryItem: (e: Extension) => e is DashboardsOverviewInventoryItem<K8sModel, {
    [key: string]: K8sResourceCommon[];
}>;
export declare const isDashboardsOverviewInventoryItemReplacement: (e: Extension) => e is DashboardsOverviewInventoryItemReplacement<K8sModel, {
    [key: string]: K8sResourceCommon[];
}>;
export declare const isDashboardsProjectOverviewInventoryItem: (e: Extension) => e is DashboardsProjectOverviewInventoryItem<K8sModel, {
    [key: string]: K8sResourceCommon[];
}>;
export declare const isDashboardsOverviewResourceActivity: (e: Extension) => e is DashboardsOverviewResourceActivity<K8sResourceCommon>;
export declare const isDashboardsOverviewPrometheusActivity: (e: Extension) => e is DashboardsOverviewPrometheusActivity;
export declare type DashboardsOverviewHealthSubsystem = DashboardsOverviewHealthURLSubsystem | DashboardsOverviewHealthPrometheusSubsystem | DashboardsOverviewHealthResourceSubsystem | DashboardsOverviewHealthOperator;
export declare const isDashboardsOverviewHealthSubsystem: (e: Extension) => e is DashboardsOverviewHealthSubsystem;
declare type DashboardsOverviewInventoryItemProperties<T extends K8sModel = K8sModel, R extends {
    [key: string]: K8sResourceCommon[];
} = {
    [key: string]: K8sResourceCommon[];
}> = {
    /** The model for `resource` which will be fetched. Used to get the model's `label` or `abbr`. */
    model: CodeRef<T>;
    /** Function which maps various statuses to groups. */
    mapper?: CodeRef<StatusGroupMapper<T, R>>;
    /** Additional resources which will be fetched and passed to the `mapper` function. */
    additionalResources?: CodeRef<WatchK8sResources<R>>;
};
export {};
