'use strict';

var breakpoints_subject = require('./breakpoints.subject-BgiK6gXq.js');
var listener = require('./listener-BHmwpN04.js');
var index = require('./index-CJK1u2Q5.js');

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

exports.BalWindowResizeSubject = BalWindowResizeSubject;
