"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdaptableApiImpl = void 0;
const AlertApiImpl_1 = require("./AlertApiImpl");
const StatusBarApiImpl_1 = require("./StatusBarApiImpl");
const PredicateApiImpl_1 = require("./PredicateApiImpl");
const PluginsApiImpl_1 = require("./PluginsApiImpl");
const BulkUpdateApiImpl_1 = require("./BulkUpdateApiImpl");
const CalculatedColumnApiImpl_1 = require("./CalculatedColumnApiImpl");
const CellSummaryApiImpl_1 = require("./CellSummaryApiImpl");
const StateApiImpl_1 = require("./StateApiImpl");
const CustomSortApiImpl_1 = require("./CustomSortApiImpl");
const DashboardApiImpl_1 = require("./DashboardApiImpl");
const ToolPanelApiImpl_1 = require("./ToolPanelApiImpl");
const DataSetApiImpl_1 = require("./DataSetApiImpl");
const EventApiImpl_1 = require("./EventApiImpl");
const ExportApiImpl_1 = require("./ExportApiImpl");
const FormatColumnApiImpl_1 = require("./FormatColumnApiImpl");
const FreeTextColumnApiImpl_1 = require("./FreeTextColumnApiImpl");
const GridApiImpl_1 = require("./GridApiImpl");
const LayoutApiImpl_1 = require("./LayoutApiImpl");
const PlusMinusApiImpl_1 = require("./PlusMinusApiImpl");
const QuickSearchApiImpl_1 = require("./QuickSearchApiImpl");
const ShortcutApiImpl_1 = require("./ShortcutApiImpl");
const SmartEditApiImpl_1 = require("./SmartEditApiImpl");
const SystemStatusApiImpl_1 = require("./SystemStatusApiImpl");
const ThemeApiImpl_1 = require("./ThemeApiImpl");
const UserInterfaceApiImpl_1 = require("./UserInterfaceApiImpl");
const AdaptableInternalApi_1 = require("../Internal/AdaptableInternalApi");
const ScheduleApiImpl_1 = require("./ScheduleApiImpl");
const TeamSharingApiImpl_1 = require("./TeamSharingApiImpl");
const ColumnApiImpl_1 = require("./ColumnApiImpl");
const ApplicationApiImpl_1 = require("./ApplicationApiImpl");
const ColumnScopeApiImpl_1 = require("./ColumnScopeApiImpl");
const DataChangeHistoryApiImpl_1 = require("./DataChangeHistoryApiImpl");
const ExpressionApiImpl_1 = require("./ExpressionApiImpl");
const FlashingCellApiImpl_1 = require("./FlashingCellApiImpl");
const ChartingApiImpl_1 = require("./ChartingApiImpl");
const SettingsPanelApiImpl_1 = require("./SettingsPanelApiImpl");
const ActionColumnApiImpl_1 = require("./ActionColumnApiImpl");
const StyledColumnApiImpl_1 = require("./StyledColumnApiImpl");
const CalendarApiImpl_1 = require("./CalendarApiImpl");
const EntitlementApiImpl_1 = require("./EntitlementApiImpl");
const OptionsApiImpl_1 = require("./OptionsApiImpl");
const NoteApiImpl_1 = require("./NoteApiImpl");
const Fdc3ApiImpl_1 = require("./Fdc3ApiImpl");
const DataImportApiImpl_1 = require("./DataImportApiImpl");
const NamedQueryApiImpl_1 = require("./NamedQueryApiImpl");
const CommentsApiImpl_1 = require("./CommentsApiImpl");
const ColumnMenuApiImpl_1 = require("./ColumnMenuApiImpl");
const ContextMenuApiImpl_1 = require("./ContextMenuApiImpl");
const FilterApiImpl_1 = require("./FilterApiImpl");
const RowFormApiImpl_1 = require("./RowFormApiImpl");
class AdaptableApiImpl {
    constructor(adaptable) {
        this.adaptable = adaptable;
        this.destroyed = false;
        this.adaptable = adaptable;
        this.optionsApi = new OptionsApiImpl_1.OptionsApiImpl(adaptable);
        this.actionColumnApi = new ActionColumnApiImpl_1.ActionColumnApiImpl(adaptable);
        this.applicationApi = new ApplicationApiImpl_1.ApplicationApiImpl(adaptable);
        this.alertApi = new AlertApiImpl_1.AlertApiImpl(adaptable);
        this.flashingCellApi = new FlashingCellApiImpl_1.FlashingCellApiImpl(adaptable);
        this.predicateApi = new PredicateApiImpl_1.PredicateApiImpl(adaptable);
        this.pluginsApi = new PluginsApiImpl_1.PluginsApiImpl(adaptable);
        this.bulkUpdateApi = new BulkUpdateApiImpl_1.BulkUpdateApiImpl(adaptable);
        this.calendarApi = new CalendarApiImpl_1.CalendarApiImpl(adaptable);
        this.calculatedColumnApi = new CalculatedColumnApiImpl_1.CalculatedColumnApiImpl(adaptable);
        this.cellSummaryApi = new CellSummaryApiImpl_1.CellSummaryApiImpl(adaptable);
        this.columnApi = new ColumnApiImpl_1.ColumnApiImpl(adaptable);
        this.columnMenuApi = new ColumnMenuApiImpl_1.ColumnMenuApiImpl(adaptable);
        this.contextMenuApi = new ContextMenuApiImpl_1.ContextMenuApiImpl(adaptable);
        this.stateApi = new StateApiImpl_1.StateApiImpl(adaptable);
        this.customSortApi = new CustomSortApiImpl_1.CustomSortApiImpl(adaptable);
        this.dashboardApi = new DashboardApiImpl_1.DashboardApiImpl(adaptable);
        this.dataSetApi = new DataSetApiImpl_1.DataSetApiImpl(adaptable);
        this.entitlementApi = new EntitlementApiImpl_1.EntitlementApiImpl(adaptable);
        this.eventApi = new EventApiImpl_1.EventApiImpl(adaptable);
        this.exportApi = new ExportApiImpl_1.ExportApiImpl(adaptable);
        this.formatColumnApi = new FormatColumnApiImpl_1.FormatColumnApiImpl(adaptable);
        this.freeTextColumnApi = new FreeTextColumnApiImpl_1.FreeTextColumnApiImpl(adaptable);
        this.gridApi = new GridApiImpl_1.GridApiImpl(adaptable);
        this.layoutApi = new LayoutApiImpl_1.LayoutApiImpl(adaptable);
        this.plusMinusApi = new PlusMinusApiImpl_1.PlusMinusApiImpl(adaptable);
        this.quickSearchApi = new QuickSearchApiImpl_1.QuickSearchApiImpl(adaptable);
        this.rowFormApi = new RowFormApiImpl_1.RowFormApiImpl(adaptable);
        this.scheduleApi = new ScheduleApiImpl_1.ScheduleApiImpl(adaptable);
        this.shortcutApi = new ShortcutApiImpl_1.ShortcutApiImpl(adaptable);
        this.smartEditApi = new SmartEditApiImpl_1.SmartEditApiImpl(adaptable);
        this.systemStatusApi = new SystemStatusApiImpl_1.SystemStatusApiImpl(adaptable);
        this.settingsPanelApi = new SettingsPanelApiImpl_1.SettingsPanelApiImpl(adaptable);
        this.themeApi = new ThemeApiImpl_1.ThemeApiImpl(adaptable);
        this.userInterfaceApi = new UserInterfaceApiImpl_1.UserInterfaceApiImpl(adaptable);
        this.namedQueryApi = new NamedQueryApiImpl_1.NamedQueryApiImpl(adaptable);
        this.expressionApi = new ExpressionApiImpl_1.ExpressionApiImpl(adaptable);
        this.styledColumnApi = new StyledColumnApiImpl_1.StyledColumnApiImpl(adaptable);
        this.toolPanelApi = new ToolPanelApiImpl_1.ToolPanelApiImpl(adaptable);
        this.teamSharingApi = new TeamSharingApiImpl_1.TeamSharingApiImpl(adaptable);
        this.columnScopeApi = new ColumnScopeApiImpl_1.ColumnScopeApiImpl(adaptable);
        this.dataChangeHistoryApi = new DataChangeHistoryApiImpl_1.DataChangeHistoryApiImpl(adaptable);
        this.chartingApi = new ChartingApiImpl_1.ChartingApiImpl(adaptable);
        this.statusBarApi = new StatusBarApiImpl_1.StatusBarApiImpl(adaptable);
        this.noteApi = new NoteApiImpl_1.NoteApiImpl(adaptable);
        this.fdc3Api = new Fdc3ApiImpl_1.Fdc3ApiImpl(adaptable);
        this.dataImportApi = new DataImportApiImpl_1.DataImportApiImpl(adaptable);
        this.filterApi = new FilterApiImpl_1.FilterApiImpl(adaptable);
        this.commentApi = new CommentsApiImpl_1.CommentsApiImpl(adaptable);
        // adaptable internal api
        this.internalApi = new AdaptableInternalApi_1.AdaptableInternalApi(adaptable);
    }
    get agGridApi() {
        return this.adaptable?.agGridAdapter?.getAgGridApi();
    }
    /**
     * This is only meant to be called by the Adaptable instance.
     */
    _internalDestroySelf() {
        if (this.destroyed) {
            return;
        }
        this.destroyed = true;
        this.eventApi.destroy();
        this.exportApi.internalApi.destroy();
        this.internalApi = null;
        this.adaptable = null;
        this.optionsApi = null;
        this.alertApi = null;
        this.applicationApi = null;
        this.bulkUpdateApi = null;
        this.calculatedColumnApi = null;
        this.cellSummaryApi = null;
        this.chartingApi = null;
        this.columnApi = null;
        this.stateApi = null;
        this.customSortApi = null;
        this.dashboardApi = null;
        this.dataChangeHistoryApi = null;
        this.dataSetApi = null;
        this.eventApi = null;
        this.exportApi = null;
        this.columnApi = null;
        this.namedQueryApi = null;
        this.flashingCellApi = null;
        this.formatColumnApi = null;
        this.freeTextColumnApi = null;
        this.gridApi = null;
        this.rowFormApi = null;
        this.internalApi = null;
        this.layoutApi = null;
        this.pluginsApi = null;
        this.plusMinusApi = null;
        this.predicateApi = null;
        this.expressionApi = null;
        this.quickSearchApi = null;
        this.scheduleApi = null;
        this.columnScopeApi = null;
        this.settingsPanelApi = null;
        this.shortcutApi = null;
        this.smartEditApi = null;
        this.statusBarApi = null;
        this.systemStatusApi = null;
        this.teamSharingApi = null;
        this.themeApi = null;
        this.toolPanelApi = null;
        this.userInterfaceApi = null;
        this.fdc3Api = null;
        this.actionColumnApi = null;
        this.calendarApi = null;
        this.filterApi = null;
        this.columnMenuApi = null;
        this.commentApi = null;
        this.contextMenuApi = null;
        this.dataImportApi = null;
        this.entitlementApi = null;
        this.noteApi = null;
        this.styledColumnApi = null;
    }
    destroy(config) {
        this.adaptable.destroy(config);
    }
    isDestroyed() {
        return this.destroyed;
    }
    logConsoleMessage(message, ...optionalParams) {
        this.adaptable.logger.consoleLog(message, optionalParams);
    }
    logInfo(message, ...optionalParams) {
        this.adaptable.logger.info(message, optionalParams);
    }
    logSuccess(message, ...optionalParams) {
        this.adaptable.logger.success(message, optionalParams);
    }
    logWarn(message, ...optionalParams) {
        this.adaptable.logger.warn(message, optionalParams);
    }
    logError(message, ...optionalParams) {
        this.adaptable.logger.error(message, optionalParams);
    }
    consoleLog(message, ...optionalParams) {
        this.adaptable.logger.consoleLog(message, optionalParams);
    }
    consoleError(message, ...optionalParams) {
        this.adaptable.logger.consoleError(message, optionalParams);
    }
    consoleWarn(message, ...optionalParams) {
        this.adaptable.logger.consoleWarn(message, optionalParams);
    }
}
exports.AdaptableApiImpl = AdaptableApiImpl;
