import { Dispatch } from 'react';
import { AdditionalFilter } from '../../../../shared-logic/src/AdditionalFilter/types';
import { CustomField } from '../../../../shared-logic/src/CustomField/types';
import { DataSet } from '../../../../shared-logic/src/DataSet/types';
import { HeaderComponent } from '../../../../shared-logic/src/Header/types';
import { Report } from '../../../../shared-logic/src/Report/types';
import { StoredTheme } from '../../../../shared-logic/src/Theme/types';
import { SavingState } from '../../../../shared-logic/src/VizzlyState';
import { Component } from '../../../../shared-logic/src/Component/types';
import { Dashboard } from '../../../../shared-logic/src/Dashboard/types';
import { ItemPickerProps } from '../../components/ItemPicker/ItemPicker';
import { DeleteModalProps } from '../../components/Modals/DeleteModal';
import { PrefixModalProps } from '../../components/Table/PrefixModal';
import { AdvancedFilterModalProps } from '../../library/DataPanel/AdvancedFilter/types';
import { BaseCustomMetricModals } from '../../library/DataPanel/CustomFieldInput/types';
import { DrilldownModalProps } from '../../library/DataPanel/DrilldownInput/DrilldownModal';
import { TableDrilldownModalProps } from '../../library/DataPanel/DrilldownInput/TableDrilldownModal';
import { ProgressModalProps } from '../../library/DataPanel/Progress/types';
import { TrendLinesModalProps } from '../../library/DataPanel/Trends/types';
import { ConditionalFormattingModalProps } from '../../library/StylePanel/ConditionalFormatting/types';
import { GoalLineModalProps } from '../../library/StylePanel/GoalLine/types';
import { VizzlyComponents, trackEventCallback } from '../../types';
import { DashboardBehaviour } from '../DashboardBehaviour/types';
import { SetDataSetsAction } from './logic/types';
import { PreventDeleteCustomMetricProps } from '../../components/Modals/PreventDeleteCustomMetricModal';
export declare enum ModalType {
    Drilldown = "drilldown",
    AdvancedFilter = "advancedFilter",
    Prefix = "prefix",
    ConditionalCustomMetric = "conditionalCustomMetric",
    PercentageCustomMetric = "percentageCustomMetric",
    MathCustomMetric = "mathCustomMetric",
    RulesCustomMetric = "rulesCustomMetric",
    RoundedNumberCustomMetric = "roundedNumberCustomMetric",
    DateCalculationCustomMetric = "dateCalculationCustomMetric",
    DeleteCustomMetric = "deleteCustomMetric",
    PreventDeleteCustomMetric = "preventDeleteCustomMetric",
    TableDrilldown = "tableDrilldown",
    Progress = "progress",
    ConditionalFormatting = "conditionalFormatting",
    TrendLines = "trendLines",
    GoalLines = "goalLines",
    ItemPicker = "itemPicker",
    CustomMetricBuilder = "customMetricBuilder",
    DateComparison = "dateComparison"
}
export declare type EditorModalPropsMap = {
    [ModalType.AdvancedFilter]: AdvancedFilterModalProps;
    [ModalType.ConditionalCustomMetric]: BaseCustomMetricModals<CustomField>;
    [ModalType.ConditionalFormatting]: ConditionalFormattingModalProps;
    [ModalType.CustomMetricBuilder]: BaseCustomMetricModals<CustomField>;
    [ModalType.DateCalculationCustomMetric]: BaseCustomMetricModals<CustomField>;
    [ModalType.DateComparison]: BaseCustomMetricModals<CustomField>;
    [ModalType.DeleteCustomMetric]: DeleteModalProps;
    [ModalType.PreventDeleteCustomMetric]: PreventDeleteCustomMetricProps;
    [ModalType.Drilldown]: DrilldownModalProps;
    [ModalType.GoalLines]: GoalLineModalProps;
    [ModalType.ItemPicker]: ItemPickerProps;
    [ModalType.MathCustomMetric]: BaseCustomMetricModals<CustomField>;
    [ModalType.PercentageCustomMetric]: BaseCustomMetricModals<CustomField>;
    [ModalType.Prefix]: PrefixModalProps;
    [ModalType.Progress]: ProgressModalProps;
    [ModalType.RoundedNumberCustomMetric]: BaseCustomMetricModals<CustomField>;
    [ModalType.RulesCustomMetric]: BaseCustomMetricModals<CustomField>;
    [ModalType.TableDrilldown]: TableDrilldownModalProps;
    [ModalType.TrendLines]: TrendLinesModalProps;
};
declare type ModalChanges<T extends ModalType> = {
    modal: T;
    attributes?: T extends keyof EditorModalPropsMap ? EditorModalPropsMap[T] : undefined;
};
export declare type SetActiveModalAction = {
    type: 'setActiveModal';
    payload: ModalChanges<ModalType>;
};
export declare type SetGeneratingPDFAction = {
    type: 'setGeneratingPDF';
    payload: boolean;
};
export declare type DisplayTarget = {
    rowIndex: number;
    cellIndex: number;
};
export declare type Target = {
    libraryIndex: number | null;
    displayTarget: DisplayTarget | null;
};
declare type ComponentEditor = {
    target: Target;
    component: Component | null;
};
export declare type ActiveModals = {
    [key in ModalType]?: ModalChanges<key>;
};
export declare type StudioState = {
    componentEditor: ComponentEditor | null;
    pickFromComponentLibrary: DisplayTarget | null;
    dashboard: Dashboard;
    inPreviewMode: boolean;
    organizationName?: string;
    activeModal?: ActiveModals;
    generatingPDF?: boolean;
};
export declare type ProvidedValues = StudioState & {
    dispatch: Dispatch<StudioAction>;
    runQueriesCallback: VizzlyComponents.runQueriesCallbackInternal;
    trackEvent: trackEventCallback;
    saving: SavingState;
};
export declare type MoveRowAction = {
    type: 'moveRow';
    position: {
        movingIndex: number;
        destinationIndex: number;
    };
};
export declare type SaveComponentAction = {
    type: 'saveComponent';
    protectedComponent: boolean;
};
export declare type SwapComponentsAction = {
    type: 'swapComponents';
    positionA: DisplayTarget;
    positionB: DisplayTarget;
};
export declare type AddCustomComponentAction = {
    type: 'addCustomComponent';
    target: Target;
    component: Component<Component.CustomViewAttributes>;
};
export declare type SetDashboardAction = {
    type: 'setDashboard';
    dashboard: Dashboard;
};
export declare type ImportDashboardAction = {
    type: 'importDashboard';
    dashboardToImport: Dashboard;
};
export declare type SetThemeAction = {
    type: 'setTheme';
    theme: StoredTheme;
};
export declare type PasteComponentToEmptyCellAction = {
    type: 'pasteComponentToEmptyCell';
    component: Component;
    target: DisplayTarget;
};
export declare type ClearModalAction = {
    type: 'clearModal';
};
export declare type ChangePreviewModeAction = {
    type: 'changePreviewMode';
    inPreviewMode: boolean;
};
export declare type InsertRowAction = {
    type: 'insertRow';
    rowIndex: number;
};
export declare type RemoveRowAction = {
    type: 'removeRow';
    rowIndex: number;
};
export declare type AppendCellAction = {
    type: 'appendCell';
    rowIndex: number;
};
export declare type AddHeaderRowAction = {
    type: 'addHeaderRow';
    rowIndex: number;
    initialTitle: string;
};
export declare type RemoveCellAction = {
    type: 'removeCell';
    rowIndex: number;
    cellIndex: number;
};
export declare type ClearCellAction = {
    type: 'clearCell';
    rowIndex: number;
    cellIndex: number;
};
export declare type AddDataSetAction = {
    type: 'addDataSet';
    dataSet: DataSet;
};
export declare type RemoveDataSetAction = {
    type: 'removeDataSet';
    dataSetId: string;
};
export declare type SetColSpansAction = {
    type: 'setColSpans';
    rowIndex: number;
    colSpans: Array<{
        colSpan: number;
    }>;
};
export declare type SetRowHeightAction = {
    type: 'setRowHeight';
    rowIndex: number;
    height: number;
};
export declare type UpdateEditorComponentAction = {
    type: 'updateEditorComponent';
    component: Component;
};
export declare type UpdateDisplayComponentAttributesAction = {
    type: 'updateDisplayComponentAttributes';
    attributes: Component.Attributes;
    rowIndex: number;
    cellIndex: number;
};
export declare type UpdateComponentLibraryAttributesAction = {
    type: 'updateComponentLibraryAttributes';
    attributes: Component.Attributes;
    libraryIndex: number;
};
export declare type RemoveComponentFromLibraryAction = {
    type: 'removeComponentFromLibrary';
    libraryIndex: number;
};
export declare type SetLocalFiltersAction = {
    type: 'setLocalFilters';
    localFilters: AdditionalFilter[];
    rowIndex?: number;
    cellIndex?: number;
    libraryIndex?: number;
};
export declare type SetAttributesAction = {
    type: 'setAttributes';
    attributes: Component.Attributes;
    rowIndex: number;
    cellIndex: number;
};
export declare type AddComponentToLibrary = {
    type: 'addComponentToLibrary';
    component: Component;
    protectedComponent: boolean;
};
export declare type SetHeaderComponentAction = {
    type: 'setHeaderComponent';
    component: HeaderComponent;
    rowIndex: number;
    cellIndex: number;
};
export declare type SetComponentReportsAction = {
    type: 'setComponentReports';
    reports: Array<Report>;
    cellIndex: number;
    rowIndex: number;
};
export declare type SetGlobalFiltersAction = {
    type: 'setGlobalFilters';
    globalFilters: AdditionalFilter[];
};
export declare type StartEditingComponentAction = {
    type: 'startEditingComponent';
    libraryIndex: number | null;
    displayTarget: {
        rowIndex: number;
        cellIndex: number;
    } | null;
    component: Component | null;
};
export declare type StartPickingComponentFromLibraryForDisplayAction = {
    type: 'startPickingComponentFromLibraryForDisplay';
    rowIndex: number;
    cellIndex: number;
};
export declare type PickComponentFromLibraryForDisplayAction = {
    type: 'pickComponentFromLibraryForDisplay';
    libraryIndex: number;
};
export declare type InitAction = {
    type: 'init';
};
export declare type StartEditorAction = {
    type: 'startEditor';
    libraryIndex: number | null;
    component: Component | null;
};
export declare type StudioAction = InitAction | SetDashboardAction | ImportDashboardAction | SaveComponentAction | ClearModalAction | InsertRowAction | AppendCellAction | AddHeaderRowAction | SetHeaderComponentAction | RemoveCellAction | ClearCellAction | RemoveRowAction | AddDataSetAction | RemoveDataSetAction | SetDataSetsAction | SetLocalFiltersAction | SetAttributesAction | UpdateEditorComponentAction | StartEditingComponentAction | StartPickingComponentFromLibraryForDisplayAction | PickComponentFromLibraryForDisplayAction | SetThemeAction | SetGlobalFiltersAction | ChangePreviewModeAction | UpdateDisplayComponentAttributesAction | UpdateComponentLibraryAttributesAction | RemoveComponentFromLibraryAction | AddCustomComponentAction | SetColSpansAction | SetRowHeightAction | SetComponentReportsAction | SwapComponentsAction | AddComponentToLibrary | StartEditorAction | MoveRowAction | SetActiveModalAction | SetGeneratingPDFAction | PasteComponentToEmptyCellAction;
export declare type PipelineTransformationOptions = {
    dashboardFilters: DashboardBehaviour['dashboardFilters'];
    onDashboardFilterChange: DashboardBehaviour['onDashboardFilterChange'];
};
export {};
