import { BalAnimationListener } from "./animation.listener";
import { SingleSubject } from "../types/signal";
export class BalAnimationSubject extends SingleSubject {
    constructor() {
        super((observer, data) => {
            observer.animationListener(data);
        });
        this.listener = new BalAnimationListener();
    }
    attach(observer) {
        super.attach(observer);
        this.listener.connect(observer.el);
        this.listener.add(info => super.notify(info));
    }
    detach() {
        super.detach();
        this.listener.disconnect();
    }
}
export const balAnimationSubject = new BalAnimationSubject();
