import { B as BalWindowResizeListener } from './window-resize.listener.js';
import { a as SingleSubject } from './listener.js';
import { b as balBrowser } from './browser.js';

class BalWindowResizeSubject extends SingleSubject {
    constructor() {
        super((observer, _data) => {
            observer.windowResizeListener();
        });
        this.listener = new BalWindowResizeListener();
    }
    attach(observer) {
        super.attach(observer);
        if (balBrowser.hasWindow) {
            this.listener.connect(window);
            this.listener.add(() => super.notify());
        }
    }
    detach() {
        super.detach();
        this.listener.disconnect();
    }
}
new BalWindowResizeSubject();

export { BalWindowResizeSubject as B };
