'use strict';

var breakpoints_subject = require('./breakpoints.subject-30mVttSp.js');
var listener = require('./listener-h1eTpBYL.js');
var index = require('./index-TwNDE7ev.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;
