import { AdaptableForm } from '../AdaptableState/Common/AdaptableForm';
import { ExportState, Report, ReportFormatType, ReportNameType, SystemReportFormat, SystemReportName } from '../AdaptableState/ExportState';
import { CustomDestination, CustomExportParams, ExportDestinationType, ExportFormContext, ExportResultData, SystemExportDestination } from '../AdaptableOptions/ExportOptions';
import { AdaptableColumn } from '../types';
/**
 * Provides run-time access to the Export Module and Report state
 */
export interface ExportApi {
    /**
     * Retrieves Export section from Adaptable State
     */
    getExportState(): ExportState;
    /**
     * Retrieves available System Reports (configured in Export Options)
     */
    getAvailableSystemReports(): SystemReportName[];
    /**
     * Retrieves available System Report Formats (configured in Export Options)
     */
    getAvailableSystemFormats(): SystemReportFormat[];
    /**
     * Retrieves available System Export Destinations (configured in Export Options)
     */
    getAvailableSystemDestinations(): SystemExportDestination[];
    /**
     * Retrieves name of currently selected Report
     */
    getCurrentReportName(): ReportNameType | undefined;
    /**
     * Retrieves name of currently selected Report
     */
    getCurrentReportFormat(): ReportFormatType | undefined;
    /**
     * Retrieves currently selected Report in Adaptable State
     * @returns report that is currently selected
     */
    getCurrentReport(): Report | undefined;
    /**
     * Retrieves Report with the given name
     * @param reportName report to retrieve
     * @returns report
     */
    getReportByName(reportName: ReportNameType): Report | undefined;
    /**
     * Retrieves Report by Id
     * @param id report id
     * @returns report
     */
    getReportById(id: Report['Uuid']): Report;
    /**
     * Retrieves all available Reports - System and User-created Reports
     * @returns reports
     */
    getAllReports(): Report[];
    /**
     * Retrieves all Custom Reports that have been created by the User
     */
    getCustomReports(): Report[];
    /**
     * Retrieves all Report Formats that are available
     */
    getAllFormats(): ReportFormatType[];
    /**
     * Retrieves all Custom Destinations from Export Options
     * @returns custom destinations
     */
    getCustomDestinations(): CustomDestination[];
    /**
     * Retrieves Destination with the given name
     * @param destinationName destination to retrieve
     * @returns export destination
     */
    getDestinationByName(destinationName: ExportDestinationType): SystemExportDestination | CustomDestination | undefined;
    /**
     * Retrieves the available export destinations
     * @returns export destinations
     */
    getAllExportDestinations(): ExportDestinationType[];
    /**
     * Selects the Report in the Adaptable State
     *
     * @param reportName name of Report to select
     */
    selectReport(reportName: ReportNameType | null): void;
    /**
     * Sets the Report to null
     */
    clearReport(): void;
    /**
     * Selects the Report Format for Export
     * @param format - format to select
     */
    selectFormat(reportFormat: ReportFormatType | null): void;
    /**
     * Sets the Report Format to null
     */
    clearFormat(): void;
    /**
     * If this AdapTable instance can to export to Excel; if false, the Export to Excel option will not be visible
     */
    canExportToExcel(): boolean;
    /**
     * If this AdapTable instance can to export to CSV; if false, the Export to Csv option will not be visible
     */
    canExportToCsv(): boolean;
    /**
     * Open Settings Panel with Export section selected
     */
    openExportSettingsPanel(): void;
    /**
     * Updates an existing report
     * @param report report to edit
     * @returns report
     */
    updateReport(report: Report): Report;
    /**
     * Updates existing reports
     * @param report reports to edit
     * @returns reports
     */
    updateReports(reports: Report[]): Report[];
    /**
     * If the given destination is a Custom one
     * @param destination destination to check
     */
    isExportDestinationCustom(destinationName: ExportDestinationType): boolean;
    /**
     * Retrieves the Export Destinations that are supported for the given Report Format
     * @param reportFormat - report format to check
     */
    getSupportedExportDestinations(reportFormat: ReportFormatType): ExportDestinationType[];
    /**
     * Form Data entered by the User in the UI for a Custom Destination
     * @param destination Custom Destination for which to get Form Def
     */
    getExportDestinationForm(destinationName: ExportDestinationType): AdaptableForm<ExportFormContext> | undefined;
    /**
     * Returns whether the given column is exportable
     */
    isColumnExportable(adaptablColumn: AdaptableColumn): boolean;
    /**
     * Exports the Report with the given Name and Format to the given Destination
     * @param reportName - name of the report
     * @param format - format of the report
     * @param destination - destination to export to
     * @param config - optional configuration
     * @param config.exportParams - function to modify the default export parameters; it will be called with the default export parameters and should return the modified export parameters
     * @param config.showProgressIndicator - whether to show progress indicator
     */
    exportReport(reportName: ReportNameType, format: ReportFormatType, destination?: ExportDestinationType, config?: {
        exportParams?: (defaultExportParams: CustomExportParams) => CustomExportParams;
        showProgressIndicator?: boolean;
    }): Promise<void>;
    /**
     * Gets the data for the Report with the given Name in the given Format
     * @param reportName - name of the report
     * @param format - format of the report
     * @param config - optional configuration
     * @param config.exportParams - function to modify the default export parameters; it will be called with the default export parameters and should return the modified export parameters
     * @param config.showProgressIndicator - whether to show progress indicator
     */
    getReportData(reportName: ReportNameType, format: ReportFormatType, config?: {
        exportParams?: (defaultExportParams: CustomExportParams) => CustomExportParams;
        showProgressIndicator?: boolean;
    }): Promise<ExportResultData>;
}
