/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { __extends } from "tslib";
import { Base, PropertyChangedEventArgs, runOn, delegateRemove, delegateCombine, enumGetBox, markType } from "./type";
import { IDataSource_$type } from "./IDataSource";
import { IDataSourceDataProviderUpdateNotifier_$type } from "./IDataSourceDataProviderUpdateNotifier";
import { SortDescriptionCollection } from "./SortDescriptionCollection";
import { FilterExpressionCollection } from "./FilterExpressionCollection";
import { SummaryDescriptionCollection } from "./SummaryDescriptionCollection";
import { DataSourceSummaryScope_$type } from "./DataSourceSummaryScope";
import { DataSourceSectionHeaderDisplayMode_$type } from "./DataSourceSectionHeaderDisplayMode";
import { DataSourceSchemaChangedEventArgs } from "./DataSourceSchemaChangedEventArgs";
/**
 * @hidden
 */
var BaseDataSource = /** @class */ (function (_super) {
    __extends(BaseDataSource, _super);
    function BaseDataSource() {
        var _this = _super.call(this) || this;
        _this.af = false;
        _this.am = null;
        _this.o = null;
        _this.q = null;
        _this.p = null;
        _this.g = null;
        _this.r = null;
        _this.h = null;
        _this.m = null;
        _this.ai = 0;
        _this.aj = 0;
        _this.ak = 0;
        _this.n = null;
        _this.propertyChanged = null;
        _this.j = null;
        _this.l = null;
        _this.schemaChanged = null;
        _this.v = false;
        _this.f = 0;
        _this.u = false;
        _this.b = null;
        _this.a = null;
        _this.c = null;
        _this.y = false;
        _this.z = false;
        _this.s = false;
        _this.e = 0;
        _this.w = false;
        _this.x = true;
        _this.ab = true;
        _this.aa = false;
        _this.ac = true;
        _this.t = false;
        _this.d = null;
        _this.j = new DefaultDataSourceDataProviderUpdateNotifier(_this);
        _this.q = new SortDescriptionCollection();
        _this.p = new SortDescriptionCollection();
        _this.r = new SummaryDescriptionCollection();
        _this.q.n(runOn(_this, _this.b2));
        _this.p.n(runOn(_this, _this.bb));
        _this.r.n(runOn(_this, _this.b3));
        _this.g = new FilterExpressionCollection();
        _this.g.m(runOn(_this, _this.a9));
        return _this;
    }
    BaseDataSource.prototype.b2 = function (a, b) {
        this.onSortDescriptionsChanged(b);
    };
    BaseDataSource.prototype.bb = function (a, b) {
        this.onGroupDescriptionsChanged(b);
    };
    BaseDataSource.prototype.b3 = function (a, b) {
        this.onSummaryDescriptionsChanged(b);
    };
    BaseDataSource.prototype.a9 = function (a, b) {
        this.onFilterExpressionsChanged(b);
    };
    BaseDataSource.prototype.onSortDescriptionsChanged = function (a) {
        this.queueAutoRefresh();
    };
    BaseDataSource.prototype.onGroupDescriptionsChanged = function (a) {
        if (this.isGroupingSupported) {
            if (this.groupDescriptions != null && this.groupDescriptions.k.count > 0) {
                this.af = true;
            }
            else {
                this.af = false;
            }
            this.queueAutoRefresh();
        }
    };
    BaseDataSource.prototype.onSummaryDescriptionsChanged = function (a) {
        this.queueAutoRefresh();
    };
    BaseDataSource.prototype.onFilterExpressionsChanged = function (a) {
        this.queueAutoRefresh();
    };
    BaseDataSource.prototype.isPlaceholderItem = function (a) {
        return false;
    };
    Object.defineProperty(BaseDataSource.prototype, "actualSchema", {
        get: function () {
            return this.m;
        },
        set: function (a) {
            var b = this.m;
            this.m = a;
            if (b != this.m) {
                this.onPropertyUpdated("ActualSchema", b, this.m);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseDataSource.prototype, "actualCount", {
        get: function () {
            return this.ai;
        },
        set: function (a) {
            var b = this.ai;
            this.ai = a;
            if (b != this.ai) {
                this.onPropertyUpdated("ActualCount", b, this.ai);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseDataSource.prototype, "firstVisibleIndexRequested", {
        get: function () {
            return this.aj;
        },
        set: function (a) {
            var b = this.aj;
            this.aj = a;
            if (b != this.aj) {
                this.onPropertyUpdated("FirstVisibleIndexRequested", b, this.aj);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseDataSource.prototype, "lastVisibleIndexRequested", {
        get: function () {
            return this.ak;
        },
        set: function (a) {
            var b = this.ak;
            this.ak = a;
            if (b != this.ak) {
                this.onPropertyUpdated("LastVisibleIndexRequested", b, this.ak);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseDataSource.prototype, "updateNotifier", {
        get: function () {
            return this.n;
        },
        set: function (a) {
            var b = this.n;
            this.n = a;
            if (b != this.n) {
                this.onPropertyUpdated("UpdateNotifier", b, this.n);
            }
        },
        enumerable: true,
        configurable: true
    });
    BaseDataSource.prototype.getItemAtIndex = function (a) {
        return null;
    };
    BaseDataSource.prototype.getItemProperty = function (a, b) {
        if (this.actualBaseDataProvider != null) {
            var item_ = a;
            if ((item_ != null && item_.$$isSpecialRow !== undefined)) {
                return this.getSpecialRowItemValue(a, b);
            }
            return this.actualBaseDataProvider.getItemValue(a, b);
        }
        return null;
    };
    BaseDataSource.prototype.getSpecialRowItemValue = function (a, b) {
        if (a.rowType == 3) {
            return this.getItemProperty(a.targetRow, b);
        }
        return a.getValue(b);
    };
    BaseDataSource.prototype.getItemPropertyAtIndex = function (a, b) {
        return null;
    };
    BaseDataSource.prototype.get_fullSectionInformationWillForceLoad = function () {
        return false;
    };
    Object.defineProperty(BaseDataSource.prototype, "fullSectionInformationWillForceLoad", {
        get: function () {
            return this.get_fullSectionInformationWillForceLoad();
        },
        enumerable: true,
        configurable: true
    });
    BaseDataSource.prototype.onPropertyUpdated = function (a, b, c) {
        if (this.propertyChanged != null) {
            this.propertyChanged(this, new PropertyChangedEventArgs(a));
        }
        this.propertyUpdatedOverride(a, b, c);
    };
    BaseDataSource.prototype.propertyUpdatedOverride = function (a, b, c) {
        switch (a) {
            case "PrimaryKey":
                this.actualPrimaryKey = this.primaryKey;
                break;
            case "ActualPrimaryKey":
                this.onActualPrimaryKeyChanged(b, c);
                break;
            case "ExecutionContext":
                if (this.actualBaseDataProvider != null) {
                    this.actualBaseDataProvider.executionContext = this.executionContext;
                }
                this.queueAutoRefresh();
                break;
            case "LastVisibleIndexRequested":
            case "FirstVisibleIndexRequested":
                this.onRequestedVisibleRangeChanged();
                break;
            case "ActualDataProvider":
                this.onActualDataProviderChanged(b, c);
                break;
            case "DeferAutoRefresh":
                if (this.actualBaseDataProvider != null) {
                    this.actualBaseDataProvider.deferAutoRefresh = this.deferAutoRefresh;
                }
                if (!c) {
                    this.queueAutoRefresh();
                }
                break;
            case "PropertiesRequested":
                if (this.actualBaseDataProvider != null) {
                    this.actualBaseDataProvider.propertiesRequested = this.propertiesRequested;
                }
                break;
            case "ShouldEmitSectionFooters":
            case "ShouldEmitSectionHeaders":
            case "ShouldEmitShiftedRows":
            case "SectionHeaderDisplayMode":
            case "IsSectionCollapsable":
                this.queueAutoRefresh();
                break;
            case "SummaryScope":
                if (this.actualBaseDataProvider != null) {
                    this.actualBaseDataProvider.summaryScope = this.summaryScope;
                }
                this.queueAutoRefresh();
                break;
        }
    };
    BaseDataSource.prototype.onActualPrimaryKeyChanged = function (a, b) {
        this.onActualPrimaryKeyChangedOverrride(a, b);
    };
    BaseDataSource.prototype.onActualPrimaryKeyChangedOverrride = function (a, b) {
    };
    BaseDataSource.prototype.get_isVirtual = function () {
        return false;
    };
    Object.defineProperty(BaseDataSource.prototype, "isVirtual", {
        get: function () {
            return this.get_isVirtual();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseDataSource.prototype, "dataProviderUpdateNotifier", {
        get: function () {
            return this.j;
        },
        enumerable: true,
        configurable: true
    });
    BaseDataSource.prototype.onActualDataProviderChanged = function (a, b) {
        var c = a;
        var d = b;
        if (c != null) {
            c.updateNotifier = null;
        }
        if (d != null) {
            d.updateNotifier = this.j;
        }
        if (c != null) {
            c.schemaChanged = delegateRemove(c.schemaChanged, runOn(this, this.a6));
        }
        if (d != null) {
            d.schemaChanged = delegateCombine(d.schemaChanged, runOn(this, this.a6));
            d.executionContext = this.executionContext;
            this.notifyUsingSourceIndexes = this.actualBaseDataProvider.notifyUsingSourceIndexes;
        }
        else {
            this.notifyUsingSourceIndexes = false;
        }
        if (c != null) {
            this.sortDescriptions.syncTarget = null;
            this.groupDescriptions.syncTarget = null;
            this.filterExpressions.syncTarget = null;
            this.summaryDescriptions.syncTarget = null;
        }
        if (d != null) {
            this.sortDescriptions.syncTarget = d.sortDescriptions;
            this.groupDescriptions.syncTarget = d.groupDescriptions;
            this.filterExpressions.syncTarget = d.filterExpressions;
            this.summaryDescriptions.syncTarget = d.summaryDescriptions;
            if (this.propertiesRequested != null) {
                d.propertiesRequested = this.propertiesRequested;
            }
            d.summaryScope = this.summaryScope;
        }
        this.queueAutoRefresh();
    };
    BaseDataSource.prototype.onRequestedVisibleRangeChanged = function () {
    };
    Object.defineProperty(BaseDataSource.prototype, "executionContext", {
        get: function () {
            return this.l;
        },
        set: function (a) {
            var b = this.l;
            this.l = a;
            if (this.l != b) {
                this.onPropertyUpdated("ExecutionContext", b, this.l);
            }
        },
        enumerable: true,
        configurable: true
    });
    BaseDataSource.prototype.canInitialize = function () {
        if (this.l != null && this.actualBaseDataProvider != null) {
            return true;
        }
        return false;
    };
    Object.defineProperty(BaseDataSource.prototype, "isInitializing", {
        get: function () {
            return this.v;
        },
        enumerable: true,
        configurable: true
    });
    BaseDataSource.prototype.get_isSortingSupported = function () {
        return false;
    };
    Object.defineProperty(BaseDataSource.prototype, "isSortingSupported", {
        get: function () {
            return this.get_isSortingSupported();
        },
        enumerable: true,
        configurable: true
    });
    BaseDataSource.prototype.get_isFilteringSupported = function () {
        return false;
    };
    Object.defineProperty(BaseDataSource.prototype, "isFilteringSupported", {
        get: function () {
            return this.get_isFilteringSupported();
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseDataSource.prototype, "sortDescriptions", {
        get: function () {
            return this.q;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseDataSource.prototype, "groupDescriptions", {
        get: function () {
            return this.p;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseDataSource.prototype, "filterExpressions", {
        get: function () {
            return this.g;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseDataSource.prototype, "summaryDescriptions", {
        get: function () {
            return this.r;
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseDataSource.prototype, "summaryScope", {
        get: function () {
            return this.f;
        },
        set: function (a) {
            var b = this.f;
            this.f = a;
            if (this.f != b) {
                this.onPropertyUpdated("SummaryScope", enumGetBox(DataSourceSummaryScope_$type, b), enumGetBox(DataSourceSummaryScope_$type, this.f));
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseDataSource.prototype, "deferAutoRefresh", {
        get: function () {
            return this.u;
        },
        set: function (a) {
            var b = this.u;
            this.u = a;
            if (this.u != b) {
                this.onPropertyUpdated("DeferAutoRefresh", b, this.u);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseDataSource.prototype, "primaryKey", {
        get: function () {
            return this.b;
        },
        set: function (a) {
            var b = this.b;
            this.b = a;
            if (this.b != b) {
                this.onPropertyUpdated("PrimaryKey", b, this.b);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseDataSource.prototype, "actualPrimaryKey", {
        get: function () {
            return this.a;
        },
        set: function (a) {
            var b = this.a;
            this.a = a;
            if (this.a != b) {
                this.onPropertyUpdated("ActualPrimaryKey", b, this.a);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseDataSource.prototype, "propertiesRequested", {
        get: function () {
            return this.c;
        },
        set: function (a) {
            var b = this.c;
            this.c = a;
            if (this.c != b) {
                this.onPropertyUpdated("PropertiesRequested", b, this.c);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseDataSource.prototype, "notifyUsingSourceIndexes", {
        get: function () {
            return this.y;
        },
        set: function (a) {
            var b = this.y;
            this.y = a;
            if (this.y != b) {
                this.onPropertyUpdated("NotifyUsingSourceIndexes", b, this.y);
            }
        },
        enumerable: true,
        configurable: true
    });
    BaseDataSource.prototype.get_isItemIndexLookupSupported = function () {
        return false;
    };
    Object.defineProperty(BaseDataSource.prototype, "isItemIndexLookupSupported", {
        get: function () {
            return this.get_isItemIndexLookupSupported();
        },
        enumerable: true,
        configurable: true
    });
    BaseDataSource.prototype.get_isKeyIndexLookupSupported = function () {
        return false;
    };
    Object.defineProperty(BaseDataSource.prototype, "isKeyIndexLookupSupported", {
        get: function () {
            return this.get_isKeyIndexLookupSupported();
        },
        enumerable: true,
        configurable: true
    });
    BaseDataSource.prototype.initializeOverride = function () {
    };
    BaseDataSource.prototype.resolveFullCount = function (a) {
        return a;
    };
    BaseDataSource.prototype.a6 = function (a, b) {
        var _this = this;
        var c = this.executionContext;
        c.execute(function () {
            _this.z = true;
            _this.t = true;
            _this.queueAutoRefresh();
            if (_this.deferAutoRefresh) {
                _this.actualSchema = b.schema;
                _this.actualCount = _this.resolveFullCount(b.count);
                _this.bd();
            }
        });
    };
    BaseDataSource.prototype.bd = function () {
        if (this.schemaChanged != null) {
            this.schemaChanged(this, new DataSourceSchemaChangedEventArgs(this.actualSchema, this.actualCount));
        }
    };
    BaseDataSource.prototype.onSetItem = function (a, b, c) {
        this.onSetItemOverride(a, b, c);
    };
    BaseDataSource.prototype.onBroadcastSetItem = function (a, b, c) {
        if (this.updateNotifier != null) {
            this.updateNotifier.notifySetItem(a, b, c);
        }
    };
    BaseDataSource.prototype.onSetItemOverride = function (a, b, c) {
        if (this.actualBaseDataProvider != null) {
            this.actualCount = this.resolveFullCount(this.actualBaseDataProvider.actualCount);
        }
        this.onBroadcastSetItem(a, b, c);
    };
    BaseDataSource.prototype.onClearItems = function () {
        this.onClearItemsOverride();
    };
    BaseDataSource.prototype.onBroadcastClearItems = function () {
        if (this.updateNotifier != null) {
            this.updateNotifier.notifyClearItems();
        }
    };
    BaseDataSource.prototype.onClearItemsOverride = function () {
        if (this.actualBaseDataProvider != null) {
            this.actualCount = this.resolveFullCount(this.actualBaseDataProvider.actualCount);
        }
        this.onBroadcastClearItems();
    };
    BaseDataSource.prototype.onInsertItem = function (a, b) {
        this.onInsertItemOverride(a, b);
    };
    BaseDataSource.prototype.onBroadcastInsertItem = function (a, b) {
        if (this.updateNotifier != null) {
            this.updateNotifier.notifyInsertItem(a, b);
        }
    };
    BaseDataSource.prototype.onInsertItemOverride = function (a, b) {
        if (this.actualBaseDataProvider != null) {
            this.actualCount = this.resolveFullCount(this.actualBaseDataProvider.actualCount);
        }
        this.onBroadcastInsertItem(a, b);
    };
    BaseDataSource.prototype.onRemoveItem = function (a, b) {
        this.onRemoveItemOverride(a, b);
    };
    BaseDataSource.prototype.onBroadcastRemoveItem = function (a, b) {
        if (this.updateNotifier != null) {
            this.updateNotifier.notifyRemoveItem(a, b);
        }
    };
    BaseDataSource.prototype.onRemoveItemOverride = function (a, b) {
        if (this.actualBaseDataProvider != null) {
            this.actualCount = this.resolveFullCount(this.actualBaseDataProvider.actualCount);
        }
        this.onBroadcastRemoveItem(a, b);
    };
    BaseDataSource.prototype.notifySetItem = function (a, b, c) {
        if (this.actualBaseDataProvider != null) {
            this.actualBaseDataProvider.notifySetItem(a, b, c);
        }
    };
    BaseDataSource.prototype.notifyClearItems = function () {
        if (this.actualBaseDataProvider != null) {
            this.actualBaseDataProvider.notifyClearItems();
        }
    };
    BaseDataSource.prototype.notifyInsertItem = function (a, b) {
        if (this.actualBaseDataProvider != null) {
            this.actualBaseDataProvider.notifyInsertItem(a, b);
        }
        ;
    };
    BaseDataSource.prototype.notifyRemoveItem = function (a, b) {
        if (this.actualBaseDataProvider != null) {
            this.actualBaseDataProvider.notifyRemoveItem(a, b);
        }
        ;
    };
    BaseDataSource.prototype.queueAutoRefresh = function () {
        if (this.deferAutoRefresh) {
            return;
        }
        if (this.actualBaseDataProvider != null) {
            this.actualBaseDataProvider.queueAutoRefresh();
        }
        if (this.s) {
            return;
        }
        if (this.executionContext != null) {
            this.s = true;
            this.executionContext.enqueueAction(runOn(this, this.a7));
        }
    };
    BaseDataSource.prototype.a7 = function () {
        if (this.deferAutoRefresh) {
            this.s = false;
            return;
        }
        if (this.actualBaseDataProvider != null) {
            this.actualBaseDataProvider.flushAutoRefresh();
        }
        if (!this.s) {
            return;
        }
        this.s = false;
        this.b0();
    };
    BaseDataSource.prototype.b0 = function () {
        if (this.actualBaseDataProvider != null) {
            this.actualSchema = this.actualBaseDataProvider.actualSchema;
            this.actualCount = this.resolveFullCount(this.actualBaseDataProvider.actualCount);
        }
        if (this.actualSchema != null && this.primaryKey == null) {
            this.actualPrimaryKey = this.actualSchema.primaryKey;
        }
        this.refreshInternalOverride();
        if (this.z) {
            this.z = false;
            this.bd();
        }
    };
    BaseDataSource.prototype.refreshInternalOverride = function () {
    };
    BaseDataSource.prototype.flushAutoRefresh = function () {
        this.a7();
    };
    BaseDataSource.prototype.refresh = function () {
        if (this.actualBaseDataProvider != null) {
            this.actualBaseDataProvider.refresh();
        }
        this.b0();
    };
    BaseDataSource.prototype.indexOfItem = function (a) {
        return -1;
    };
    BaseDataSource.prototype.indexOfKey = function (a) {
        return -1;
    };
    BaseDataSource.prototype.getPrimaryKeyValue = function (a, b) {
        var c = this.actualPrimaryKey;
        if (c == null || c.length < 1 || this.actualBaseDataProvider == null) {
            return;
        }
        for (var d = 0; d < c.length; d++) {
            b[d] = this.actualBaseDataProvider.getItemValue(a, c[d]);
        }
    };
    BaseDataSource.prototype.getRowType = function (a) {
        return 0;
    };
    BaseDataSource.prototype.getMainValuePath = function (a) {
        return "SectionInformation";
    };
    BaseDataSource.prototype.getStickyRows = function () {
        return this.getStickyRowsInRange(this.firstVisibleIndexRequested, this.lastVisibleIndexRequested);
    };
    BaseDataSource.prototype.getStickyRowsInRange = function (a, b) {
        return null;
    };
    BaseDataSource.prototype.isRowSpanning = function (a) {
        return a == 1 || a == 2;
    };
    BaseDataSource.prototype.getStickyRowPriority = function (a) {
        return -1;
    };
    BaseDataSource.prototype.isExclusivelySticky = function (a) {
        return false;
    };
    BaseDataSource.prototype.pinRow = function (a) {
    };
    BaseDataSource.prototype.unpinRow = function (a) {
    };
    BaseDataSource.prototype.clearPinnedRows = function () {
    };
    BaseDataSource.prototype.isRowPinned = function (a) {
        return false;
    };
    BaseDataSource.prototype.get_isGroupingSupported = function () {
        return false;
    };
    Object.defineProperty(BaseDataSource.prototype, "isGroupingSupported", {
        get: function () {
            return this.get_isGroupingSupported();
        },
        enumerable: true,
        configurable: true
    });
    BaseDataSource.prototype.get_sectionHeaderDisplayMode = function () {
        return this.e;
    };
    BaseDataSource.prototype.set_sectionHeaderDisplayMode = function (a) {
        var b = this.e;
        this.e = a;
        if (b != this.e) {
            this.onPropertyUpdated("SectionHeaderDisplayMode", enumGetBox(DataSourceSectionHeaderDisplayMode_$type, b), enumGetBox(DataSourceSectionHeaderDisplayMode_$type, this.e));
        }
    };
    Object.defineProperty(BaseDataSource.prototype, "sectionHeaderDisplayMode", {
        get: function () {
            return this.get_sectionHeaderDisplayMode();
        },
        set: function (a) {
            this.set_sectionHeaderDisplayMode(a);
        },
        enumerable: true,
        configurable: true
    });
    BaseDataSource.prototype.get_isSectionCollapsable = function () {
        return this.w;
    };
    BaseDataSource.prototype.set_isSectionCollapsable = function (a) {
        var b = this.w;
        this.w = a;
        if (this.w != b) {
            this.onPropertyUpdated("IsSectionCollapsable", b, this.w);
        }
    };
    Object.defineProperty(BaseDataSource.prototype, "isSectionCollapsable", {
        get: function () {
            return this.get_isSectionCollapsable();
        },
        set: function (a) {
            this.set_isSectionCollapsable(a);
        },
        enumerable: true,
        configurable: true
    });
    BaseDataSource.prototype.get_isSectionExpandedDefault = function () {
        return this.x;
    };
    BaseDataSource.prototype.set_isSectionExpandedDefault = function (a) {
        this.x = a;
    };
    Object.defineProperty(BaseDataSource.prototype, "isSectionExpandedDefault", {
        get: function () {
            return this.get_isSectionExpandedDefault();
        },
        set: function (a) {
            this.set_isSectionExpandedDefault(a);
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseDataSource.prototype, "shouldEmitSectionHeaders", {
        get: function () {
            return this.ab;
        },
        set: function (a) {
            var b = this.ab;
            this.ab = a;
            if (this.ab != b) {
                this.onPropertyUpdated("ShouldEmitSectionHeaders", b, this.ab);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseDataSource.prototype, "shouldEmitSectionFooters", {
        get: function () {
            return this.aa;
        },
        set: function (a) {
            var b = this.aa;
            this.aa = a;
            if (this.aa != b) {
                this.onPropertyUpdated("ShouldEmitSectionFooters", b, this.aa);
            }
        },
        enumerable: true,
        configurable: true
    });
    Object.defineProperty(BaseDataSource.prototype, "shouldEmitShiftedRows", {
        get: function () {
            return this.ac;
        },
        set: function (a) {
            var b = this.ac;
            this.ac = a;
            if (this.ac != b) {
                this.onPropertyUpdated("ShouldEmitShiftedRows", b, this.ac);
            }
        },
        enumerable: true,
        configurable: true
    });
    BaseDataSource.prototype.ensureComparables = function (a) {
        if (this.t && this.actualCount > 0) {
            this.d = new Array(a.propertyNames.length);
            this.t = false;
        }
    };
    BaseDataSource.prototype.resolveSchemaPropertyType = function (a) {
        return this.actualBaseDataProvider.resolveSchemaPropertyType(a);
    };
    BaseDataSource.prototype.setIsRowExpandedAtIndex = function (a, b) {
    };
    BaseDataSource.prototype.getIsRowExpandedAtIndex = function (a) {
        return true;
    };
    BaseDataSource.prototype.getRowLevel = function (a) {
        return 0;
    };
    BaseDataSource.$t = markType(BaseDataSource, 'BaseDataSource', Base.$, [IDataSource_$type]);
    return BaseDataSource;
}(Base));
export { BaseDataSource };
/**
 * @hidden
 */
var DefaultDataSourceDataProviderUpdateNotifier = /** @class */ (function (_super) {
    __extends(DefaultDataSourceDataProviderUpdateNotifier, _super);
    function DefaultDataSourceDataProviderUpdateNotifier(a) {
        var _this = _super.call(this) || this;
        _this.a = null;
        _this.a = a;
        return _this;
    }
    DefaultDataSourceDataProviderUpdateNotifier.prototype.notifySetItem = function (a, b, c) {
        this.a.onSetItem(a, b, c);
    };
    DefaultDataSourceDataProviderUpdateNotifier.prototype.notifyClearItems = function () {
        this.a.onClearItems();
    };
    DefaultDataSourceDataProviderUpdateNotifier.prototype.notifyInsertItem = function (a, b) {
        this.a.onInsertItem(a, b);
    };
    DefaultDataSourceDataProviderUpdateNotifier.prototype.notifyRemoveItem = function (a, b) {
        this.a.onRemoveItem(a, b);
    };
    DefaultDataSourceDataProviderUpdateNotifier.$t = markType(DefaultDataSourceDataProviderUpdateNotifier, 'DefaultDataSourceDataProviderUpdateNotifier', Base.$, [IDataSourceDataProviderUpdateNotifier_$type]);
    return DefaultDataSourceDataProviderUpdateNotifier;
}(Base));
export { DefaultDataSourceDataProviderUpdateNotifier };
