import React from 'react';
import { AdditionalFilter } from '../../../../shared-logic/src/AdditionalFilter/types';
import { programmaticDashboardCallback } from '../../../../shared-logic/src/Callbacks/types';
import { Component, ComponentType } from '../../../../shared-logic/src/Component/types';
import { CustomField } from '../../../../shared-logic/src/CustomField/types';
import { CustomView } from '../../../../shared-logic/src/CustomView/types';
import { Dashboard } from '../../../../shared-logic/src/Dashboard/types';
import { DataPanelConfig, DataPanelSection } from '../../../../shared-logic/src/DataPanelConfig/types';
import { DataSet } from '../../../../shared-logic/src/DataSet/types';
import { DateTimeFilterOptions } from '../../../../shared-logic/src/DateTime/types';
import { FeatureToggles } from '../../../../shared-logic/src/FeatureToggle/types';
import { FormatPanelConfig, FormatPanelSection } from '../../../../shared-logic/src/FormatPanelConfig/types';
import { PDFSettings } from '../../../../shared-logic/src/PDFGenerator/types';
import { Query } from '../../../../shared-logic/src/Query/types';
import { QueryEngineConfig } from '../../../../shared-logic/src/QueryEngineConfig/types';
import { VizzlyTranslations } from '../../../../shared-logic/src/Translations/translation.types';
import { ValueAlias as ValueAliasType } from '../../../../shared-logic/src/ValueAlias/types';
import { VariablesCallback } from '../../../../shared-logic/src/Variables/types';
import { ClickSettingTypes } from '../../hooks/types';
import { VizzlyComponents } from '../../types';
import { UseVariableState } from '../Variables/types';
import { UseCopyAndPasteComponentResult } from './useCopyAndPasteComponent';
import { FieldUsage } from '@vizzly/api-client';
declare type OverrideDeveloperInfo = {
    overrideKey: string;
    componentProps: any;
};
export declare type IdPrefix = 'dashboard' | 'library' | 'editor';
export declare type Mode = 'endUser' | 'admin';
export declare type DateTimeFormatter = {
    formatter: (date: Date) => string;
    description: string;
};
export declare type NumberFormatter = {
    formatter: (number: number | undefined | null, noValueReplacement?: string, total?: number) => string;
    description: string;
};
export declare type Variables = VariablesCallback;
export declare type ValueAlias = ValueAliasType;
export declare type DeveloperTools = {
    theme?: boolean;
    componentOverride?: boolean;
    translationKeys?: boolean;
    viewRawResults?: boolean;
    viewRawAttributes?: boolean;
};
export declare type Scope = 'read' | 'read_write';
export declare type DashboardFilter = Omit<AdditionalFilter, 'managedByConfiguration'>;
export declare type DashboardFilters = Array<DashboardFilter>;
export declare type DashboardCallback = {
    id: string;
    metadata: Dashboard.ExternalMetadata;
    scope: Scope;
    dataSets: DataSet[];
};
export declare type DashboardBehaviour = {
    mode: Mode;
    scope: Scope;
    isProgrammaticParent: boolean;
    id?: string;
    featureToggles: FeatureToggles;
    developerTools: boolean | (DeveloperTools & {
        viewClickSettingsInput?: ClickSettingTypes & {
            viewId: string;
        };
    });
    componentOverrides: Partial<VizzlyComponents.ComponentOverrides>;
    customViews: CustomView[];
    onlyViewTypes: (dataSet: DataSet) => ComponentType[];
    reportScheduleOptions: Array<{
        cron: string;
        description: string;
    }>;
    scheduledReports: {
        id: string;
        schedule: string;
    }[];
    numberFormatOptions: {
        [id: string]: NumberFormatter;
    };
    valueAlias?: ValueAlias;
    variables?: UseVariableState;
    dateTimeFormatOptions: {
        [id: string]: DateTimeFormatter;
    };
    defaultFormats: () => {
        [functionId: string]: string;
    };
    datePickerFormat: 'DD/MM/YYYY' | 'MM/DD/YYYY' | 'YYYY/MM/DD';
    /**
     * This property has replaced dateTimeFilterOptions.
     */
    dateFilterOptions: DateTimeFilterOptions;
    overrideDeveloperInfo: OverrideDeveloperInfo | null;
    maxCSVDownloadLimit: number;
    textOverrides: Partial<VizzlyTranslations & {
        'view.data-set-changed': string;
        'view.resizing': string;
        'view.failed-to-fetch-results': string;
        'dashboard-filters.custom-range': string;
        'editor.tab.heading.data': string;
        'editor.tab.heading.format': string;
        'editor.tab.heading.controls': string;
        'view.empty-results': string;
    }>;
    queryEngineConfig: QueryEngineConfig;
    organizationName?: string;
    dataPanel: (dataPanelConfig: DataPanelConfig, context: {
        type: ComponentType;
    }) => Array<DataPanelSection | ((sectionProps: Omit<VizzlyComponents.ComponentOverrides.Props.SectionProps, 'section'>) => JSX.Element)>;
    formatPanel: (formatPanelConfig: FormatPanelConfig, context: {
        type: ComponentType;
    }) => Array<FormatPanelSection | ((sectionProps: VizzlyComponents.EditorSectionProps<Component.Attributes>) => JSX.Element)>;
    onError?: VizzlyComponents.OnError;
    parentDashboard?: programmaticDashboardCallback;
    onReset: () => Promise<Dashboard | null>;
    onScheduledReportChange: (reportId: string, newCron: string | null) => Promise<void>;
    onEditorUpdate: (newAttributes: Component.Attributes, dataSet: DataSet, reason: 'initial' | 'edit') => Partial<Component.Attributes>;
    onSave: (dashboard: Dashboard, abortSignal?: AbortSignal) => void;
    onOpenConfigManagerUi: undefined | (() => void);
    dashboardFilters: (dataSets: Array<DataSet>, userDefinedDashboardFilters: DashboardFilters) => DashboardFilters;
    hiddenDashboardFilters: (dataSet: DataSet) => Query['filter'];
    onDashboardFilterChange: (additionalFilters: AdditionalFilter[]) => void;
    onDashboardLoad?: (dashboard: DashboardCallback) => void;
    onViewClick?: (data: Component.OnViewClick, loadUnderlyingData?: Component.OnViewClickQuery) => void;
    renderTableCell?: (data: Component.RenderTableCell) => React.ReactNode | string | undefined;
    disableToolbar?: boolean;
    cascadeFilterSelection?: boolean;
    textOverride: TextOverride;
    filterLibrary?: FilterLibrary;
    pdfSettings?: PDFSettings;
    labelFormat: LabelFormat;
    timeZone?: string;
    onDashboardUpdate?: (dashboard: Dashboard, meta: {
        hasUnsavedChanges: boolean;
    }) => void;
    updateDashboardHash?: (dashboard: Dashboard) => void;
    customFields?: (dataSet: DataSet) => Array<CustomField>;
    copyAndPasteComponent: UseCopyAndPasteComponentResult;
    checkSharedFieldUsageAcrossDashboards?: (currentDashboard: Dashboard, dataSetId: string, fieldId: string) => Array<{
        id: string;
        name: string | null;
        foundFieldUsages: FieldUsage['fields'];
    }>;
};
export declare type TextOverride = (key: string, defaultValue: string, options?: TranslationOptions) => string;
export declare type FilterLibrary = (data: Component[]) => Component[];
export declare type LabelFormat = (options: Component.LabelFormatOptions) => string | undefined;
export declare type TranslationOptions = {
    [key: string]: string | number | Pluralised;
};
export declare type Pluralised = {
    count: number;
    singular: string;
    plural: string;
};
export {};
