import {
  TraceIdContent
} from "/build/_shared/chunk-3JJG57KF.js";
import "/build/_shared/chunk-B7SHUSBW.js";
import "/build/_shared/chunk-EOIU3ZRJ.js";
import "/build/_shared/chunk-WWUYM2PJ.js";
import "/build/_shared/chunk-2LVPY4YG.js";
import "/build/_shared/chunk-5DGBJUUY.js";
import {
  PageDocLink
} from "/build/_shared/chunk-T75MUU5G.js";
import "/build/_shared/chunk-JZ6W5YHO.js";
import "/build/_shared/chunk-5HIGY2MY.js";
import "/build/_shared/chunk-HUUSILLY.js";
import {
  PageSubtitle
} from "/build/_shared/chunk-VV3RU6RL.js";
import "/build/_shared/chunk-VO5VXZGS.js";
import "/build/_shared/chunk-ERWYPUCA.js";
import {
  PageLayout
} from "/build/_shared/chunk-BXT5AGPN.js";
import "/build/_shared/chunk-5YPGPC4O.js";
import "/build/_shared/chunk-7K73PJIB.js";
import "/build/_shared/chunk-EJE2TVVM.js";
import "/build/_shared/chunk-LGQ4GCFK.js";
import "/build/_shared/chunk-B7TG3BDD.js";
import "/build/_shared/chunk-7NMI3PDC.js";
import "/build/_shared/chunk-AI5FD5Y6.js";
import {
  withAuth
} from "/build/_shared/chunk-NHF4CNMF.js";
import "/build/_shared/chunk-KQKP3VNY.js";
import {
  init_esm2 as init_esm,
  useLoaderData,
  useParams
} from "/build/_shared/chunk-ZC2TL3GZ.js";
import {
  require_jsx_dev_runtime
} from "/build/_shared/chunk-ED7KKCRB.js";
import "/build/_shared/chunk-RYE6BCZB.js";
import "/build/_shared/chunk-PECDPABK.js";
import {
  require_node
} from "/build/_shared/chunk-G7CHZRZX.js";
import "/build/_shared/chunk-TLLKLDIT.js";
import {
  Routes
} from "/build/_shared/chunk-N27UEDHN.js";
import {
  createHotContext,
  init_remix_hmr
} from "/build/_shared/chunk-G7KTOMTD.js";
import "/build/_shared/chunk-ZIPKILLR.js";
import {
  __toESM
} from "/build/_shared/chunk-PNG5AS42.js";

// app/routes/app+/project+/$projectId+/env+/$envId+/experiments+/$experimentId+/datapoint-run+/$datapointRunId+/index.tsx
init_remix_hmr();
var import_node = __toESM(require_node(), 1);
init_esm();

// app/pages/datasetRuns/DatasetRunIdPage.tsx
init_remix_hmr();
init_esm();
var import_jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
if (!window.$RefreshReg$ || !window.$RefreshSig$ || !window.$RefreshRuntime$) {
  console.warn("remix:hmr: React Fast Refresh only works when the Remix compiler is running in development mode.");
} else {
  prevRefreshReg = window.$RefreshReg$;
  prevRefreshSig = window.$RefreshSig$;
  window.$RefreshReg$ = (type, id) => {
    window.$RefreshRuntime$.register(type, '"app/pages/datasetRuns/DatasetRunIdPage.tsx"' + id);
  };
  window.$RefreshSig$ = window.$RefreshRuntime$.createSignatureFunctionForTransform;
}
var prevRefreshReg;
var prevRefreshSig;
var _s = $RefreshSig$();
if (import.meta) {
  import.meta.hot = createHotContext(
    //@ts-expect-error
    "app/pages/datasetRuns/DatasetRunIdPage.tsx"
  );
  import.meta.hot.lastModified = "1711327267022.036";
}
var DatasetRunIdPage = ({
  trace,
  datapointRun
}) => {
  _s();
  const params = useParams();
  const breadcrumbs = [{
    label: "Experiments",
    to: Routes.app.project.env.experiments({
      envId: params.envId,
      projectId: params.projectId
    })
  }, {
    label: datapointRun?.experiment.name || "\u2014",
    to: Routes.app.project.env.experimentsId({
      envId: params.envId,
      projectId: params.projectId,
      experimentId: params.experimentId
    })
  }, {
    label: "Run"
  }];
  const subtitle = () => {
    return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(PageSubtitle, { children: [
      "Each run generates a trace to help you debug.",
      " ",
      /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(PageDocLink, { to: Routes.external.docs.runs, children: "Run Docs." }, void 0, false, {
        fileName: "app/pages/datasetRuns/DatasetRunIdPage.tsx",
        lineNumber: 53,
        columnNumber: 9
      }, this)
    ] }, void 0, true, {
      fileName: "app/pages/datasetRuns/DatasetRunIdPage.tsx",
      lineNumber: 51,
      columnNumber: 12
    }, this);
  };
  return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(PageLayout, { breadcrumbs, subtitle, children: trace ? /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(TraceIdContent, { trace }, void 0, false, {
    fileName: "app/pages/datasetRuns/DatasetRunIdPage.tsx",
    lineNumber: 57,
    columnNumber: 16
  }, this) : /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("p", { children: "No Trace on this run." }, void 0, false, {
    fileName: "app/pages/datasetRuns/DatasetRunIdPage.tsx",
    lineNumber: 57,
    columnNumber: 51
  }, this) }, void 0, false, {
    fileName: "app/pages/datasetRuns/DatasetRunIdPage.tsx",
    lineNumber: 56,
    columnNumber: 10
  }, this);
};
_s(DatasetRunIdPage, "+jVsTcECDRo3yq2d7EQxlN9Ixog=", false, function() {
  return [useParams];
});
_c = DatasetRunIdPage;
var _c;
$RefreshReg$(_c, "DatasetRunIdPage");
window.$RefreshReg$ = prevRefreshReg;
window.$RefreshSig$ = prevRefreshSig;

// app/routes/app+/project+/$projectId+/env+/$envId+/experiments+/$experimentId+/datapoint-run+/$datapointRunId+/index.tsx
var import_jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
if (!window.$RefreshReg$ || !window.$RefreshSig$ || !window.$RefreshRuntime$) {
  console.warn("remix:hmr: React Fast Refresh only works when the Remix compiler is running in development mode.");
} else {
  prevRefreshReg = window.$RefreshReg$;
  prevRefreshSig = window.$RefreshSig$;
  window.$RefreshReg$ = (type, id) => {
    window.$RefreshRuntime$.register(type, '"app/routes/app+/project+/$projectId+/env+/$envId+/experiments+/$experimentId+/datapoint-run+/$datapointRunId+/index.tsx"' + id);
  };
  window.$RefreshSig$ = window.$RefreshRuntime$.createSignatureFunctionForTransform;
}
var prevRefreshReg;
var prevRefreshSig;
var _s2 = $RefreshSig$();
if (import.meta) {
  import.meta.hot = createHotContext(
    //@ts-expect-error
    "app/routes/app+/project+/$projectId+/env+/$envId+/experiments+/$experimentId+/datapoint-run+/$datapointRunId+/index.tsx"
  );
  import.meta.hot.lastModified = "1711234838356.9612";
}
var loader = withAuth(async ({
  api,
  params,
  request
}) => {
  const datapointRunId = params.datapointRunId;
  const datapointRunPromise = api.datapointRun.datapointRunControllerGetDatapointWithExperiment({
    datapointRunId
  });
  const tracePromise = api.datapointRun.datapointRunControllerGetDatapointTrace({
    datapointRunId
  });
  const [datapointRunRes, traceRes] = await Promise.allSettled([datapointRunPromise, tracePromise]);
  const trace = traceRes.status === "fulfilled" ? traceRes.value : null;
  const datapointRun = datapointRunRes.status === "fulfilled" ? datapointRunRes.value : null;
  return (0, import_node.json)({
    trace,
    datapointRun
  });
});
function DatapointIdRoute() {
  _s2();
  const {
    trace,
    datapointRun
  } = useLoaderData();
  return /* @__PURE__ */ (0, import_jsx_dev_runtime2.jsxDEV)(DatasetRunIdPage, { trace, datapointRun }, void 0, false, {
    fileName: "app/routes/app+/project+/$projectId+/env+/$envId+/experiments+/$experimentId+/datapoint-run+/$datapointRunId+/index.tsx",
    lineNumber: 52,
    columnNumber: 10
  }, this);
}
_s2(DatapointIdRoute, "1vQzb8wOu0p4UqH4ekvG/o5JQM8=", false, function() {
  return [useLoaderData];
});
_c2 = DatapointIdRoute;
var _c2;
$RefreshReg$(_c2, "DatapointIdRoute");
window.$RefreshReg$ = prevRefreshReg;
window.$RefreshSig$ = prevRefreshSig;
export {
  DatapointIdRoute as default
};
//# sourceMappingURL=/build/routes/app+/project+/$projectId+/env+/$envId+/experiments+/$experimentId+/datapoint-run+/$datapointRunId+/index-KBVP4ZFO.js.map
