import { AdaptableForm } from '../AdaptableState/Common/AdaptableForm';
import { ExportState, Report, ReportFormatType, ReportNameType, ReportSchedule, SystemReportFormat, SystemReportName } from '../AdaptableState/ExportState';
import { LayoutExtendedConfig } from '../types';
import { CustomDestination, CustomExportParams, ExportConfig, 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 available Custom Destinations (configured in Export Options)
     */
    getAvailableCustomDestinations(): CustomDestination[];
    /**
     * 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 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 System one
     * @param destination destination to check
     */
    isExportDestinationSystem(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 exportConfig - optional export configuration
     */
    exportReport(reportName: ReportNameType, format: ReportFormatType, destination?: ExportDestinationType, exportConfig?: ExportConfig): 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>;
    /**
     * All scheduled reports (custom reports and system reports)
     */
    getScheduledReports(config?: LayoutExtendedConfig): ReportSchedule[];
    /**
     * All active scheduled reports (custom reports and system reports)
     */
    getActiveScheduledReports(config?: LayoutExtendedConfig): ReportSchedule[];
    /**
     * Retrieves a scheduled report by its Uuid
     */
    getScheduledReportById(reportScheduleId: ReportSchedule['Uuid'], config?: LayoutExtendedConfig): ReportSchedule | undefined;
    /**
     * Adds a scheduled report
     */
    addScheduledReport(reportSchedule: ReportSchedule): void;
    /**
     * Edits a scheduled report
     */
    editScheduledReport(reportSchedule: ReportSchedule): void;
    /**
     * Deletes a scheduled report
     */
    deleteScheduledReport(reportSchedule: ReportSchedule): void;
    /**
     * Suspends a scheduled report
     */
    suspendScheduledReport(reportSchedule: ReportSchedule): void;
    /**
     * Unsuspends a scheduled report
     */
    unSuspendScheduledReport(reportSchedule: ReportSchedule): void;
    /**
     * Runs a scheduled export and records the job-run action
     */
    applyScheduledReport(reportSchedule: ReportSchedule): void;
    /**
     * Ensures every scheduled report has a unique Uuid (legacy state may omit them).
     */
    ensureScheduledReportUuids(): void;
}
