/*
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, markType } from "igniteui-angular-core";
import { SyncableObservableCollection$2 } from "igniteui-angular-core";
import { ChartSortDescription } from "./ChartSortDescription";
import { SortDescription } from "igniteui-angular-core";
/**
 * @hidden
 */
var ChartSortDescriptionCollection = /** @class */ /*@__PURE__*/ (function (_super) {
    __extends(ChartSortDescriptionCollection, _super);
    function ChartSortDescriptionCollection() {
        var _this = _super.call(this) || this;
        _this.f = new SyncableObservableCollection$2(ChartSortDescription.$, SortDescription.$, 0);
        _this.d = null;
        var a = _this.f;
        a.compare = function (b, c) {
            if (b.f == c.propertyName) {
                return true;
            }
            return false;
        };
        a.createFrom = function (b) { return new ChartSortDescription(2, b.propertyName, b.direction); };
        a.createTo = function (b) {
            var c = b.c;
            return SortDescription.create(b.f, c);
        };
        return _this;
    }
    Object.defineProperty(ChartSortDescriptionCollection.prototype, "i", {
        get: function () {
            return this.f.shouldDetachOnTargetChange;
        },
        set: function (a) {
            this.f.shouldDetachOnTargetChange = a;
        },
        enumerable: false,
        configurable: true
    });
    Object.defineProperty(ChartSortDescriptionCollection.prototype, "e", {
        get: function () {
            return this.d;
        },
        set: function (a) {
            if (a == null) {
                this.f.syncTarget = null;
                this.d = null;
                return;
            }
            this.d = a;
            this.f.syncTarget = this.d.getInner();
        },
        enumerable: false,
        configurable: true
    });
    ChartSortDescriptionCollection.prototype.g = function (a) {
        return this.f.add(a);
    };
    ChartSortDescriptionCollection.prototype.o = function (a, b) {
        this.f.add1(a, b);
    };
    ChartSortDescriptionCollection.prototype.n = function () {
        this.f.clear();
    };
    ChartSortDescriptionCollection.prototype.get = function (a) {
        return this.f.get(a);
    };
    ChartSortDescriptionCollection.prototype.k = function (a) {
        return this.f.indexOf(a);
    };
    ChartSortDescriptionCollection.prototype.h = function (a) {
        return this.f.remove1(a);
    };
    ChartSortDescriptionCollection.prototype.b = function (a) {
        return this.f.remove(a);
    };
    ChartSortDescriptionCollection.prototype.set = function (a, b) {
        return this.f.set(a, b);
    };
    ChartSortDescriptionCollection.prototype.size = function () {
        return this.f.size();
    };
    ChartSortDescriptionCollection.prototype.m = function (a) {
        this.f.addListener(a);
    };
    ChartSortDescriptionCollection.prototype.p = function (a) {
        this.f.removeListener(a);
    };
    Object.defineProperty(ChartSortDescriptionCollection.prototype, "j", {
        get: function () {
            return this.f.all;
        },
        enumerable: false,
        configurable: true
    });
    ChartSortDescriptionCollection.$t = markType(ChartSortDescriptionCollection, 'ChartSortDescriptionCollection');
    return ChartSortDescriptionCollection;
}(Base));
export { ChartSortDescriptionCollection };
