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