"use strict";
/**
 * Copyright: (c) Myia SAS 2026.
 * This file and its contents are licensed under the AGPLv3 License.
 * Please see the LICENSE file at the root of this repository
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.CompositeHealTraceExporter = void 0;
class CompositeHealTraceExporter {
    constructor(children) {
        this.children = children;
    }
    write(record) {
        for (const child of this.children) {
            try {
                child.write(record);
            }
            catch (err) {
                console.warn('[heal-playwright-tracer] composite-exporter child write failed:', err);
            }
        }
    }
    async close() {
        const results = await Promise.allSettled(this.children.map((c) => c.close()));
        for (const r of results) {
            if (r.status === 'rejected') {
                console.warn('[heal-playwright-tracer] composite-exporter child close failed:', r.reason);
            }
        }
    }
}
exports.CompositeHealTraceExporter = CompositeHealTraceExporter;
