import {
  TraceIdContent
} from "/build/_shared/chunk-EE3ON7N4.js";
import "/build/_shared/chunk-KQSGWVIC.js";
import "/build/_shared/chunk-TCLIWQBB.js";
import "/build/_shared/chunk-H6F3VZYF.js";
import "/build/_shared/chunk-5DGBJUUY.js";
import "/build/_shared/chunk-HCRGASHR.js";
import "/build/_shared/chunk-RFBEIH4W.js";
import "/build/_shared/chunk-MR25HKXM.js";
import "/build/_shared/chunk-B7ZAE2NL.js";
import {
  PageDocLink
} from "/build/_shared/chunk-TPFG27GP.js";
import "/build/_shared/chunk-5HIGY2MY.js";
import {
  PageSubtitle
} from "/build/_shared/chunk-Z534YQLL.js";
import "/build/_shared/chunk-TEUK4AYU.js";
import "/build/_shared/chunk-4EISWT2J.js";
import "/build/_shared/chunk-D7HH3MFR.js";
import "/build/_shared/chunk-L7VKH6VP.js";
import "/build/_shared/chunk-4CHLX6OP.js";
import "/build/_shared/chunk-EEPFRJZL.js";
import {
  PageLayout
} from "/build/_shared/chunk-IVHXUM2B.js";
import "/build/_shared/chunk-P2DAPPQF.js";
import "/build/_shared/chunk-W2WK7NJF.js";
import "/build/_shared/chunk-527IW2Z6.js";
import "/build/_shared/chunk-AI5FD5Y6.js";
import "/build/_shared/chunk-CUOCTUZ2.js";
import {
  require_jsx_dev_runtime
} from "/build/_shared/chunk-D5XSJF2M.js";
import {
  init_esm2 as init_esm,
  useLoaderData,
  useParams
} from "/build/_shared/chunk-VJFCZKPM.js";
import "/build/_shared/chunk-OCFPP4X2.js";
import "/build/_shared/chunk-HWKMUXRS.js";
import {
  withAuth
} from "/build/_shared/chunk-RHQW4WCH.js";
import {
  require_node
} from "/build/_shared/chunk-MDLUSIM2.js";
import "/build/_shared/chunk-EB6A6RVQ.js";
import {
  Routes
} from "/build/_shared/chunk-5222SY3A.js";
import {
  createHotContext,
  init_remix_hmr
} from "/build/_shared/chunk-4FTV3JJX.js";
import "/build/_shared/chunk-YLRAJVC6.js";
import {
  __toESM
} from "/build/_shared/chunk-RODUX5XG.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 = "1715882071659.9014";
}
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 = "1715882071672.6677";
}
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-HBPIHRH3.js.map
