import { jsxDEV } from "react/jsx-dev-runtime";
import { useApiBaseUrl, useProjectSlug, useStageSlug, useSessionTokenWithMeta, formatContentApiRelativeUrl, tenantApiRelativeUrl } from "@contember/react-client";
import { Table, TableRow, TableHeaderCell, TableCell } from "@contember/ui";
import { DevPanel } from "@contember/react-devbar";
import { GlobeIcon } from "lucide-react";
const ApiPanel = () => {
  const apiBaseUrl = useApiBaseUrl();
  const projectSlug = useProjectSlug();
  const stageSlug = useStageSlug();
  const sessionToken = useSessionTokenWithMeta();
  if (!projectSlug || !stageSlug) {
    return null;
  }
  return /* @__PURE__ */ jsxDEV(DevPanel, { icon: /* @__PURE__ */ jsxDEV(GlobeIcon, {}, void 0, false, {
    fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
    lineNumber: 22,
    columnNumber: 19
  }, void 0), heading: "API URLs", children: /* @__PURE__ */ jsxDEV(Table, { children: [
    /* @__PURE__ */ jsxDEV(TableRow, { children: [
      /* @__PURE__ */ jsxDEV(TableHeaderCell, { children: "Project" }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
        lineNumber: 25,
        columnNumber: 6
      }, void 0),
      /* @__PURE__ */ jsxDEV(TableCell, { children: projectSlug }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
        lineNumber: 26,
        columnNumber: 6
      }, void 0)
    ] }, void 0, true, {
      fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
      lineNumber: 24,
      columnNumber: 5
    }, void 0),
    /* @__PURE__ */ jsxDEV(TableRow, { children: [
      /* @__PURE__ */ jsxDEV(TableHeaderCell, { children: "Base URL" }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
        lineNumber: 29,
        columnNumber: 6
      }, void 0),
      /* @__PURE__ */ jsxDEV(TableCell, { children: apiBaseUrl }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
        lineNumber: 30,
        columnNumber: 6
      }, void 0)
    ] }, void 0, true, {
      fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
      lineNumber: 28,
      columnNumber: 5
    }, void 0),
    /* @__PURE__ */ jsxDEV(TableRow, { children: [
      /* @__PURE__ */ jsxDEV(TableHeaderCell, { children: "Content API URL" }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
        lineNumber: 33,
        columnNumber: 6
      }, void 0),
      /* @__PURE__ */ jsxDEV(TableCell, { children: [
        apiBaseUrl,
        formatContentApiRelativeUrl(projectSlug, stageSlug)
      ] }, void 0, true, {
        fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
        lineNumber: 34,
        columnNumber: 6
      }, void 0)
    ] }, void 0, true, {
      fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
      lineNumber: 32,
      columnNumber: 5
    }, void 0),
    /* @__PURE__ */ jsxDEV(TableRow, { children: [
      /* @__PURE__ */ jsxDEV(TableHeaderCell, { children: "Tenant API URL" }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
        lineNumber: 38,
        columnNumber: 6
      }, void 0),
      /* @__PURE__ */ jsxDEV(TableCell, { children: [
        apiBaseUrl,
        tenantApiRelativeUrl
      ] }, void 0, true, {
        fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
        lineNumber: 39,
        columnNumber: 6
      }, void 0)
    ] }, void 0, true, {
      fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
      lineNumber: 37,
      columnNumber: 5
    }, void 0),
    /* @__PURE__ */ jsxDEV(TableRow, { children: [
      /* @__PURE__ */ jsxDEV(TableHeaderCell, { children: "Token" }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
        lineNumber: 42,
        columnNumber: 6
      }, void 0),
      /* @__PURE__ */ jsxDEV(TableCell, { children: /* @__PURE__ */ jsxDEV("span", { children: sessionToken.token }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
        lineNumber: 44,
        columnNumber: 7
      }, void 0) }, void 0, false, {
        fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
        lineNumber: 43,
        columnNumber: 6
      }, void 0)
    ] }, void 0, true, {
      fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
      lineNumber: 41,
      columnNumber: 5
    }, void 0)
  ] }, void 0, true, {
    fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
    lineNumber: 23,
    columnNumber: 4
  }, void 0) }, void 0, false, {
    fileName: "/__w/interface/interface/packages/admin/src/components/Dev/ApiPanel.tsx",
    lineNumber: 22,
    columnNumber: 3
  }, void 0);
};
export {
  ApiPanel
};
//# sourceMappingURL=ApiPanel.js.map
