/**
 * MSW handlers for performance metrics endpoints.
 * @module mocks/handlers/performance
 */
import { http, HttpResponse } from "msw";
import performanceData from "../fixtures/performance.json";
import { captureRequest } from "../request-log.js";

export const performanceHandlers = [
  http.get("/api/logs/:id/performance", ({ params }) => {
    captureRequest("GET", `/api/logs/${params.id}/performance`);
    return HttpResponse.json(performanceData);
  }),

  http.get("/api/filters/:id/performance", ({ params }) => {
    captureRequest("GET", `/api/filters/${params.id}/performance`);
    return HttpResponse.json(performanceData);
  }),
];
