export class FedopsReporter {
    constructor(params) {
        this.componentName = params.componentName;
        this.collection = params.collection;
        this.internalMonitor = params.internalMonitor;
        const { internalMonitor, componentName, collection } = this;
        internalMonitor.reportInteractionStart(componentName, 'initial-load');
        internalMonitor.reportInteractionStart(componentName, 'e2e');
        collection.hooks.once('beforeInitialFetch', ({ isStale }) => {
            const customProps = { cached: !isStale };
            internalMonitor.reportInteractionEnd(componentName, 'initial-load');
            internalMonitor.reportInteractionStart(componentName, 'initial-fetch-data', customProps);
            collection.emitter.once('ready', () => {
                internalMonitor.reportInteractionEnd(componentName, 'initial-fetch-data', customProps);
            });
        });
    }
    onFullRenderStart() {
        const { internalMonitor, componentName } = this;
        internalMonitor.reportInteractionStart(componentName, 'initial-full-render');
        return () => {
            internalMonitor.reportInteractionEnd(componentName, 'initial-full-render');
            internalMonitor.reportInteractionEnd(componentName, 'e2e');
        };
    }
}
//# sourceMappingURL=FedopsReporter.js.map