/*
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 { Base, Delegate_$type, runOn, markType } from "./type";
import { INativeUIWindowBridge_$type } from "./INativeUIWindowBridge";
import { List$1 } from "./List$1";
/**
 * @hidden
 */
export let DOMWindowBridge = /*@__PURE__*/ (() => {
    class DOMWindowBridge extends Base {
        constructor() {
            super(...arguments);
            this.a = new List$1(Delegate_$type, 0);
        }
        addEventListener(a, b) {
            switch (a) {
                case 14:
                    if (this.a.count == 0) {
                        window.addEventListener("resize", runOn(this, this.b), false);
                    }
                    this.a.add(b);
                    break;
            }
        }
        removeEventListener(a, b) {
            switch (a) {
                case 14:
                    this.a.remove(b);
                    if (this.a.count == 0) {
                        window.removeEventListener("resize", runOn(this, this.b), false);
                    }
                    break;
            }
        }
        b(a) {
            for (let b = 0; b < this.a.count; b++) {
                this.a._inner[b]();
            }
        }
    }
    DOMWindowBridge.$t = markType(DOMWindowBridge, 'DOMWindowBridge', Base.$, [INativeUIWindowBridge_$type]);
    return DOMWindowBridge;
})();
