/**
 * MSW handlers for process discovery (map) endpoints.
 * @module mocks/handlers/discover
 */
import { http, HttpResponse } from "msw";
import discoverData from "../fixtures/discover.json";
import { captureRequest } from "../request-log.js";

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

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

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