import { IgCollection } from "igniteui-react-core/ES2015/IgCollection";
import { SyncableObservableCollection$2 } from "igniteui-react-core/ES2015/SyncableObservableCollection$2";
import { FinancialChartRangeSelectorOption_$type } from './FinancialChartRangeSelectorOption';
import { ensureEnum } from "igniteui-react-core/ES2015/componentUtil";
export class FinancialChartRangeSelectorOptionCollection extends IgCollection {
    constructor(list) {
        super();
        if (list) {
            for (let i = 0; i < list.length; i++) {
                this.add(list[i]);
            }
        }
    }
    _ensureOuter(item) {
        return ensureEnum(FinancialChartRangeSelectorOption_$type, item);
    }
    _createInnerColl() {
        let coll = new SyncableObservableCollection$2(FinancialChartRangeSelectorOption_$type, FinancialChartRangeSelectorOption_$type, 0);
        coll.compare = (ext, int) => {
            let comp = ext;
            if (comp.equals) {
                return comp.equals(int);
            }
            return comp === int;
        };
        coll.createTo = (ext) => {
            return ext;
        };
        coll.createFrom = (int) => {
            return int;
        };
        return coll;
    }
}
