"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class PageLifecycleHandlerImpl {
    constructor(observers = []) {
        this.observers = observers;
    }
    async onPageCreated(page, pageId) {
        const onCreatePromises = this.observers.map((observer) => observer.onPageCreated(page, pageId));
        await Promise.allSettled(onCreatePromises);
    }
    async onPageDestroyed(page, pageId) {
        const onDestroyPromises = this.observers.map((observer) => observer.onPageDestroyed(page, pageId));
        await Promise.allSettled(onDestroyPromises);
    }
}
exports.default = PageLifecycleHandlerImpl;
