import { IgCollection } from "igniteui-webcomponents-core";
import { markType } from "igniteui-webcomponents-core";
import { SyncableObservableCollection$2 } from "igniteui-webcomponents-core";
import { ResponsivePhase as ResponsivePhase_internal } from './ResponsivePhase';
import { IgcResponsivePhase as IgcResponsivePhase } from './igc-responsive-phase';
export class IgcResponsivePhasesCollection extends IgCollection {
    constructor(list) {
        super();
        if (!IgcResponsivePhase.$type) {
            IgcResponsivePhase.$type = markType(IgcResponsivePhase, "IgcResponsivePhase");
        }
        if (list) {
            for (let i = 0; i < list.length; i++) {
                this.add(list[i]);
            }
        }
    }
    _createInnerColl() {
        if (!IgcResponsivePhase.$type) {
            IgcResponsivePhase.$type = markType(IgcResponsivePhase, "IgcResponsivePhase");
        }
        let coll = new SyncableObservableCollection$2(IgcResponsivePhase.$type, ResponsivePhase_internal.$type, 0);
        coll.compare = (ext, int) => {
            let comp = ext;
            if (comp._implementation) {
                comp = comp._implementation;
            }
            if (comp.equals) {
                return comp.equals(int);
            }
            return comp === int;
        };
        coll.createTo = (ext) => {
            return ext._implementation;
        };
        coll.createFrom = (int) => {
            let ext = int.externalObject;
            if (!ext) {
                ext = new IgcResponsivePhase();
                if (ext) {
                    ext._implementation = int;
                }
            }
            return ext;
        };
        return coll;
    }
}
//# sourceMappingURL=igc-responsive-phases-collection.js.map
