/// <reference types="chart.js" />
import { TemplateRef } from '@angular/core';
import { Params } from '@angular/router';
import { DataSet } from './DisplayInterfaces';
import { ChartConfiguration, ChartType } from 'chart.js';
import { IMultiSelectOption } from '../components/platform-multiselect';
export interface WidgetConfiguration {
    name: string;
    displayName?: string;
    adminRequired?: boolean;
    description: string;
    area?: string;
    supportMessage: string;
    componentType: string;
    config?: any;
    dataConsumerConfiguration: DataConsumerConfiguration;
    dataConsumerConfigurations?: DataConsumerConfiguration[];
    contextMatchingRules: ContextMatchingRule[];
    modified?: boolean;
    unSavedData?: boolean;
    dateModified?: string;
    widgetAsApp?: boolean;
    internalSideNavLabel?: string;
    internalSideNavComponentType?: string;
    showSideNav?: boolean;
    showContextSortBreadcrumbs?: boolean;
    tags?: string[];
    accessGroups?: string;
    writeAccessGroups?: string;
    userCanWrite?: boolean;
}
export interface ContextMatchingRule {
    contextName: string;
    valueMatch?: string;
    optional: boolean;
    historyItemsToKeep?: number;
}
export interface DataConsumerConfiguration {
    name?: string;
    dataPolicy: string;
    fixedData?: DataSet;
    fixedParameters?: NameValue[];
    sortColumns?: NameValue[];
    contextParameters?: NameValue[];
    filterConfiguration?: FilterRule[];
    overrideCacheRules?: CacheRules;
    dataGrouping?: DataGrouping;
    pivot?: Pivot;
    columns?: string[];
    overrideCustomHeaders?: NameValue[];
    directUri?: string;
    apiStoreAppKey?: string;
    httpMethod?: string;
    apiStoreSendMtAdfsOpenId?: boolean;
}
export interface DataPolicy {
    name: string;
    supportMessage: string;
    supportGroup: string;
    supportNameList: string;
    sourceURL: string;
    CacheRules: CacheRules;
    DesignIdColumn?: string;
    fixedParameters?: NameValue[];
    columnRenameMap?: NameValue[];
    customHeaders?: NameValue[];
    securableColumns?: NameValue[];
    dateModified?: string;
    useMiddleLayer?: boolean;
    dataFormat?: string;
    isAWebSocket?: boolean;
    httpMethod?: string;
    useAPIStore?: boolean;
    apiStoreAppKey?: string;
    apiStoreSendMtAdfsOpenId?: boolean;
    webSocketRegistrationMessage?: string;
}
export interface APIStoreTokenInfo {
    appKey: string;
    token: string;
    expiration: Date;
}
export interface FilterRule {
    column: string;
    value?: string;
    contextValueName?: string;
    serverSide: boolean;
    operator?: string;
}
export interface CacheRules {
    period: string;
    frequency?: number;
    targetMinute?: number;
    targetHour?: number;
    targetDay?: number;
    targetWorkWeekDay?: number;
}
export interface DataTableValueInfo {
    colIdx: number;
    rowIdx: number;
    column: string;
    row?: string[];
    value: string;
    event?: Event;
}
export interface TableButtonInfo {
    name: string;
    class: string;
    iconClass: string;
    text: string;
    toolTip?: string;
}
export interface TableRowSelectionButton {
    buttonName: string;
    row: string[];
    column: string[];
}
export declare type ActionButtonsPosition = 'start' | 'end';
export interface GenericTableConfiguration {
    hideHeaderRow?: boolean;
    hideFilterTooltip?: boolean;
    showHeaderRow?: boolean;
    showFilterTooltip?: boolean;
    showFilterSortRow?: boolean;
    showCaseButton?: boolean;
    showGlobalFilter?: boolean;
    showPaginate?: boolean;
    showColumnDropdowns?: boolean;
    showExportToCsv?: boolean;
    showPageSizeSelector?: boolean;
    showPageRecordsCount?: boolean;
    showFirstLastPageSelector?: boolean;
    showPageInput?: boolean;
    showFilterToggleButton?: boolean;
    showGlobalFilterLabel?: boolean;
    sortAndfilterLocally?: boolean;
    pageSize?: number;
    buttonNames?: string[];
    buttonConfig?: ActionButtonConfig;
    buttonInfoList?: TableButtonInfo[];
    selectMode?: string;
    tableColumnRules?: TableColumnRules[];
    csvExportOptions?: CsvExportOptions;
    columnConfig?: ColumnConfig[];
    columnHeaderConfigs?: ColumnHeaderConfigs[][];
    rowColorProp?: string;
    currentPage?: number;
    tableTitle?: string;
    tdClass?: string;
    trClass?: string;
    thClass?: string;
    outerTrClass?: string;
    TableClasses?: string[];
}
export declare class ActionButtonConfig {
    buttonColumnName?: string;
    buttonPosition?: ActionButtonsPosition;
}
export declare class Feedback {
    type: string;
    title: string;
    desc: string;
    userName: string;
    underConsideration: boolean;
    comment: Comment[];
    context: any;
    metaData: Map<string, string>;
}
export interface TableColumnRules {
    columnName: string;
    hideColumn?: boolean;
    alternateColorOnValueChange?: boolean;
    heatmapRules?: HeatmapRules;
    redmapRules?: HeatmapRules;
    greenmapRules?: HeatmapRules;
    showDropdown?: boolean;
    filterTemplateRef?: TemplateRef<any>;
    valueLink?: boolean;
    rowChangeBehavior?: RowChangeBehavior;
    maxTextLength?: number;
    showPareto?: boolean;
    paretoRules?: ParetoRules;
    isDate?: boolean;
    textAlign?: string;
    classNames?: string[];
    styleProps?: any;
    barChart?: boolean;
}
export interface ColumnConfig {
    columnLabel: string;
    columnLabelBgColor?: string;
    columnLabelColor?: string;
    columnProp: string;
    sortClass?: string;
    columnShowIcon?: boolean;
    columnFixedWidth?: string;
    columnSortByProp?: string;
    columnHeaderFilterType?: string;
    dropdownsVals?: string[];
    multiSelectVals?: IMultiSelectOption[];
    selectedValues?: string[];
}
export interface ColumnHeaderConfigs {
    headercolumnLabel: string;
    headercolumnFixedWidth?: string;
    headercolumnColSpan?: string;
    headercolumnLabelAlign?: string;
    headercolumnLabelBgColor?: string;
    headercolumnLabelColor?: string;
}
export interface RowChangeBehavior {
    hideDuplicates?: boolean;
    addDividor?: boolean;
    whiteGray?: boolean;
    randomColor?: boolean;
    colorStringPallete?: string[];
}
export interface HeatmapRules {
    low: string;
    high: string;
    columnsToInclude?: string[];
}
export interface ParetoRules {
    min: number;
    max: number;
}
export interface CsvExportOptions {
    separator?: string;
    fileName?: string;
}
export interface GenericFullChartConfiguration {
    xTickLabels?: string[];
    yTickLabels?: string[];
    xAxisLabelColumns: string[];
    pointLabelColumns: string[];
    filterColumns: string[];
    seriesGroups: SeriesGroupConfig[];
    chartConfig: ChartConfiguration;
}
export interface GenericChartConfiguration {
    labelSources?: NameValue[];
    seriesGroups: SeriesGroupConfig[];
    clickMap?: NameValue[];
}
export interface SeriesGroupConfig {
    scalePosition: string;
    id: string;
    series: SeriesConfig[];
}
export interface SeriesConfig {
    name: string;
    sourceColumn: string;
    sourceColumnY?: string;
    type: ChartType;
}
export interface NameValue {
    name: string;
    value: string;
}
export interface NameIndex {
    name: string;
    index: number;
}
export interface DataGrouping {
    serverSide?: boolean;
    groupBy: string[];
    aggregations: Aggregation[];
}
export interface Aggregation {
    name: string;
    operation: string;
    rename: string;
    separator?: string;
}
export interface Pivot {
    name: string;
    operation: string;
    rename: string;
}
export interface ManagedDataReply {
    CacheData: CacheDataInfo;
    AppliedDataPolicy: DataPolicy;
}
export interface CacheDataInfo {
    MinutesRemaining: number;
    RetrievedFromCache: boolean;
    key: string;
    Payload: any;
    CacheDate: string;
}
export interface LandingPageConfig {
    ShowFilterByTags: boolean;
    ShowQuickSearch: boolean;
    ShowViewsSelector: boolean;
    ExternalWidgetsConfigUrls: {
        instanceName: string;
        url: string;
    }[];
    Views: LandingPageView[];
    ExternalLinks: {
        title: string;
        desc: string;
        url: string;
        groupLabel: string;
        include_in_views?: string[];
    }[];
}
export interface LandingPageView {
    name: string;
    default: boolean;
    defaultForGroups?: string[];
    rank?: number;
    included: {
        context?: {};
        tags?: string[];
        externalInstanceNames?: string[];
    };
    group_by_type: 'tags' | 'context';
    group_by_context_names?: string[];
    layout_style?: 'wide' | 'tall';
    layout_cols?: number;
    tile_style?: 'card' | 'list';
}
export interface LandingPageLayoutGroup {
    groupLabel: string;
    tiles: LandingPageTile[];
}
export interface LandingPageTile {
    title: string;
    desc: string;
    url?: string;
    context?: Params;
    external: boolean;
}
