import * as tslib_1 from "tslib";
import { IgCollection } from "igniteui-react-core/ES5/IgCollection";
import { SyncableObservableCollection$2 } from "igniteui-react-core/ES5/SyncableObservableCollection$2";
import { FinancialChartRangeSelectorOption_$type } from './FinancialChartRangeSelectorOption';
import { ensureEnum } from "igniteui-react-core/ES5/componentUtil";
var FinancialChartRangeSelectorOptionCollection = /** @class */ (function (_super) {
    tslib_1.__extends(FinancialChartRangeSelectorOptionCollection, _super);
    function FinancialChartRangeSelectorOptionCollection(list) {
        var _this = _super.call(this) || this;
        if (list) {
            for (var i = 0; i < list.length; i++) {
                _this.add(list[i]);
            }
        }
        return _this;
    }
    FinancialChartRangeSelectorOptionCollection.prototype._ensureOuter = function (item) {
        return ensureEnum(FinancialChartRangeSelectorOption_$type, item);
    };
    FinancialChartRangeSelectorOptionCollection.prototype._createInnerColl = function () {
        var coll = new SyncableObservableCollection$2(FinancialChartRangeSelectorOption_$type, FinancialChartRangeSelectorOption_$type, 0);
        coll.compare = function (ext, int) {
            var comp = ext;
            if (comp.equals) {
                return comp.equals(int);
            }
            return comp === int;
        };
        coll.createTo = function (ext) {
            return ext;
        };
        coll.createFrom = function (int) {
            return int;
        };
        return coll;
    };
    return FinancialChartRangeSelectorOptionCollection;
}(IgCollection));
export { FinancialChartRangeSelectorOptionCollection };
