import { ConfirmationModal, RequestModal, usePaginationState, useRequestsList, useUpdateRequestStatus, useDeleteRequest, useTableSelection, PageTitleCaption, FilterBar, TableSelectionToolbar, CustomModal, useRequest, ContextViewer, JsonViewer } from '../../../chunk-CPIQ5GXG.js';
export { RequestActionIcon, RequestModal, requestTopbarActionManifest } from '../../../chunk-CPIQ5GXG.js';
import '../../../chunk-NZ2F5RQ4.js';
import '../../../chunk-OJJK27GC.js';
import '../../../chunk-ZTWA5H77.js';
import '../../../chunk-AUDNF2Q7.js';
import '../../../chunk-6M6OLGQY.js';
import '../../../chunk-MKH2KOAO.js';
import '../../../chunk-7Q5THR43.js';
import '../../../chunk-SJHM4WDG.js';
import '../../../chunk-GMXGDO3I.js';
import { CardHeader } from '../../../chunk-S3XR4II4.js';
import '../../../chunk-6DO4PE3O.js';
import '../../../chunk-DD3CCMCZ.js';
import '../../../chunk-M7WWRZ5Z.js';
import '../../../chunk-E6NSKXYN.js';
import '../../../chunk-2IFYDILW.js';
import '../../../chunk-Q7DJKLEN.js';
import '../../../chunk-HENXLGVD.js';
import '../../../chunk-I3CFGE3N.js';
import '../../../chunk-RNP5R5I3.js';
import '../../../chunk-W2SFTXMT.js';
import { formatTimeAgo } from '../../../chunk-XOPLS4S6.js';
import '../../../chunk-FVOMKZ7S.js';
import '../../../chunk-KRWALB24.js';
import '../../../chunk-2FTX4WO2.js';
import '../../../chunk-MQZE7SUI.js';
import '../../../chunk-TVTSASST.js';
import '../../../chunk-BRJ3QZ4E.js';
import '../../../chunk-I2KLQ2HA.js';
import { useState } from 'react';
import { useNavigate } from '@tanstack/react-router';
import { Badge, Menu, Button, Stack, Paper, Select, Center, Loader, Text, Table, Checkbox, Group, Pagination, Title, Skeleton, SimpleGrid, CopyButton, Tooltip, ActionIcon, SegmentedControl } from '@mantine/core';
import { IconChevronDown, IconAlertTriangle, IconMessagePlus, IconCheck, IconCopy, IconClipboardText, IconFileDescription, IconAlertCircle, IconInfoCircle, IconArrowLeft } from '@tabler/icons-react';
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
import { useDisclosure } from '@mantine/hooks';
import { notifications } from '@mantine/notifications';

// src/features/monitoring/requests/manifest.ts
var submittedRequestsManifest = {
  key: "submitted-requests",
  routePrefixes: ["/monitoring/requests"]
};
var TYPE_COLORS = {
  bug: "red",
  feature: "blue",
  question: "yellow",
  other: "gray"
};
var TYPE_LABELS = {
  bug: "Bug",
  feature: "Feature",
  question: "Question",
  other: "Other"
};
function RequestTypeBadge({ type }) {
  return /* @__PURE__ */ jsx(Badge, { variant: "light", color: TYPE_COLORS[type], size: "sm", children: TYPE_LABELS[type] });
}
var SEVERITY_COLORS = {
  critical: "red",
  warning: "orange",
  info: "blue"
};
var SEVERITY_LABELS = {
  critical: "Critical",
  warning: "Warning",
  info: "Info"
};
function SeverityBadge({ severity }) {
  return /* @__PURE__ */ jsx(Badge, { variant: "light", color: SEVERITY_COLORS[severity], size: "sm", children: SEVERITY_LABELS[severity] });
}
var STATUS_COLORS = {
  open: "blue",
  investigating: "yellow",
  resolved: "green",
  wont_fix: "gray"
};
var STATUS_LABELS = {
  open: "Open",
  investigating: "Investigating",
  resolved: "Resolved",
  wont_fix: "Won't Fix"
};
function StatusBadge({ status }) {
  return /* @__PURE__ */ jsx(Badge, { variant: "light", color: STATUS_COLORS[status], size: "sm", children: STATUS_LABELS[status] });
}
var VALID_TRANSITIONS = {
  open: ["investigating", "wont_fix"],
  investigating: ["resolved", "wont_fix", "open"],
  resolved: ["open"],
  wont_fix: ["open"]
};
var ALL_STATUSES = ["open", "investigating", "resolved", "wont_fix"];
var STATUS_LABELS2 = {
  open: "Open",
  investigating: "Investigating",
  resolved: "Resolved",
  wont_fix: "Won't Fix"
};
function StatusTransitionMenu({ currentStatus, onTransition }) {
  const [wontFixConfirmOpen, setWontFixConfirmOpen] = useState(false);
  const validNextStatuses = VALID_TRANSITIONS[currentStatus];
  function handleSelect(status) {
    if (status === "wont_fix") {
      setWontFixConfirmOpen(true);
    } else {
      onTransition(status);
    }
  }
  return /* @__PURE__ */ jsxs(Fragment, { children: [
    /* @__PURE__ */ jsxs(Menu, { withinPortal: true, position: "bottom-end", shadow: "md", children: [
      /* @__PURE__ */ jsx(Menu.Target, { children: /* @__PURE__ */ jsx(Button, { variant: "light", size: "xs", rightSection: /* @__PURE__ */ jsx(IconChevronDown, { size: 14 }), children: STATUS_LABELS2[currentStatus] }) }),
      /* @__PURE__ */ jsxs(Menu.Dropdown, { children: [
        /* @__PURE__ */ jsx(Menu.Label, { children: "Transition to" }),
        ALL_STATUSES.filter((s) => s !== currentStatus).map((status) => {
          const isValid = validNextStatuses.includes(status);
          return /* @__PURE__ */ jsx(
            Menu.Item,
            {
              disabled: !isValid,
              color: status === "wont_fix" ? "red" : void 0,
              onClick: () => isValid && handleSelect(status),
              children: STATUS_LABELS2[status]
            },
            status
          );
        })
      ] })
    ] }),
    /* @__PURE__ */ jsx(
      ConfirmationModal,
      {
        opened: wontFixConfirmOpen,
        onClose: () => setWontFixConfirmOpen(false),
        icon: /* @__PURE__ */ jsx(IconAlertTriangle, { color: "red" }),
        title: "Mark as Won't Fix",
        text: "Are you sure you want to mark this request as won't fix? This signals the issue will not be addressed.",
        buttonText: "Confirm Won't Fix",
        buttonColor: "red",
        confirmationHandler: () => {
          setWontFixConfirmOpen(false);
          onTransition("wont_fix");
        }
      }
    )
  ] });
}
function RequestButton({
  label = "Request a feature or report an issue",
  affectedPage,
  ...buttonProps
}) {
  const [opened, { open, close }] = useDisclosure(false);
  return /* @__PURE__ */ jsxs(Fragment, { children: [
    /* @__PURE__ */ jsx(Button, { variant: "light", leftSection: /* @__PURE__ */ jsx(IconMessagePlus, { size: 16 }), onClick: open, ...buttonProps, children: label }),
    /* @__PURE__ */ jsx(RequestModal, { opened, onClose: close, affectedPage })
  ] });
}
var PAGE_SIZE = 20;
function RequestsListPage({
  type: typeProp,
  severity: severityProp,
  status: statusProp,
  source: sourceProp,
  onNavigateToRequest,
  rightSection
}) {
  const navigate = useNavigate();
  const [typeFilter, setTypeFilter] = useState(typeProp);
  const [severityFilter, setSeverityFilter] = useState(severityProp);
  const [statusFilter, setStatusFilter] = useState(statusProp ?? "open");
  const [sourceFilter, setSourceFilter] = useState(sourceProp);
  const [showBatchDelete, setShowBatchDelete] = useState(false);
  const { page, setPage, offset, totalPages } = usePaginationState(PAGE_SIZE, [
    typeFilter,
    severityFilter,
    statusFilter,
    sourceFilter
  ]);
  const { data: requests = [], isLoading } = useRequestsList({
    type: typeFilter,
    severity: severityFilter,
    status: statusFilter,
    source: sourceFilter,
    limit: PAGE_SIZE,
    offset
  });
  const { mutate: updateStatus } = useUpdateRequestStatus();
  const deleteRequest = useDeleteRequest();
  const selection = useTableSelection(requests);
  function pushSearchParam(patch) {
    navigate({
      // @ts-expect-error — search type is narrowed by each route wrapper
      search: (prev) => ({ ...prev, ...patch })
    });
  }
  function handleTypeChange(value) {
    const next = value ?? void 0;
    setTypeFilter(next);
    pushSearchParam({ type: next });
  }
  function handleSeverityChange(value) {
    const next = value ?? void 0;
    setSeverityFilter(next);
    pushSearchParam({ severity: next });
  }
  function handleStatusChange(value) {
    const next = value ?? void 0;
    setStatusFilter(next);
    pushSearchParam({ status: next });
  }
  function handleSourceChange(value) {
    const next = value ?? void 0;
    setSourceFilter(next);
    pushSearchParam({ source: next });
  }
  const handleDeleteSelected = async () => {
    await Promise.all([...selection.selectedIds].map((id) => deleteRequest.mutateAsync(id)));
    setShowBatchDelete(false);
    selection.clear();
  };
  const estimatedTotal = requests.length < PAGE_SIZE ? offset + requests.length : offset + PAGE_SIZE + 1;
  const pageCount = totalPages(estimatedTotal);
  return /* @__PURE__ */ jsxs(Stack, { children: [
    /* @__PURE__ */ jsx(
      PageTitleCaption,
      {
        title: "Submitted Requests",
        caption: "Browse and triage user-submitted bug reports, feature requests, and questions",
        rightSection
      }
    ),
    /* @__PURE__ */ jsx(Paper, { children: /* @__PURE__ */ jsxs(Stack, { gap: 0, children: [
      /* @__PURE__ */ jsxs(
        FilterBar,
        {
          actions: /* @__PURE__ */ jsx(
            TableSelectionToolbar,
            {
              selectedCount: selection.selectedCount,
              onDelete: () => setShowBatchDelete(true),
              isDeleting: deleteRequest.isPending
            }
          ),
          children: [
            /* @__PURE__ */ jsx(
              Select,
              {
                placeholder: "All types",
                value: typeFilter ?? null,
                onChange: handleTypeChange,
                data: [
                  { value: "bug", label: "Bug" },
                  { value: "feature", label: "Feature" },
                  { value: "question", label: "Question" },
                  { value: "other", label: "Other" }
                ],
                clearable: true,
                size: "sm",
                w: 150
              }
            ),
            /* @__PURE__ */ jsx(
              Select,
              {
                placeholder: "All severities",
                value: severityFilter ?? null,
                onChange: handleSeverityChange,
                data: [
                  { value: "critical", label: "Critical" },
                  { value: "warning", label: "Warning" },
                  { value: "info", label: "Info" }
                ],
                clearable: true,
                size: "sm",
                w: 160
              }
            ),
            /* @__PURE__ */ jsx(
              Select,
              {
                placeholder: "All statuses",
                value: statusFilter ?? null,
                onChange: handleStatusChange,
                data: [
                  { value: "open", label: "Open" },
                  { value: "investigating", label: "Investigating" },
                  { value: "resolved", label: "Resolved" },
                  { value: "wont_fix", label: "Won't Fix" }
                ],
                clearable: true,
                size: "sm",
                w: 170
              }
            ),
            /* @__PURE__ */ jsx(
              Select,
              {
                placeholder: "All sources",
                value: sourceFilter ?? null,
                onChange: handleSourceChange,
                data: [
                  { value: "agent", label: "Agent" },
                  { value: "cli", label: "CLI" },
                  { value: "api", label: "API" },
                  { value: "webhook", label: "Webhook" },
                  { value: "user", label: "User" },
                  { value: "external", label: "External" }
                ],
                clearable: true,
                size: "sm",
                w: 150
              }
            )
          ]
        }
      ),
      isLoading ? /* @__PURE__ */ jsx(Center, { py: "xl", children: /* @__PURE__ */ jsx(Loader, { size: "md" }) }) : requests.length === 0 ? /* @__PURE__ */ jsx(Center, { py: "xl", children: /* @__PURE__ */ jsx(Text, { c: "dimmed", children: "No requests yet" }) }) : /* @__PURE__ */ jsxs(Table, { highlightOnHover: true, style: { cursor: "pointer" }, children: [
        /* @__PURE__ */ jsx(Table.Thead, { children: /* @__PURE__ */ jsxs(Table.Tr, { children: [
          /* @__PURE__ */ jsx(Table.Th, { w: 40, children: /* @__PURE__ */ jsx(
            Checkbox,
            {
              checked: selection.isPageAllSelected,
              indeterminate: selection.isPagePartiallySelected,
              onChange: selection.togglePage
            }
          ) }),
          /* @__PURE__ */ jsx(Table.Th, { children: "Type" }),
          /* @__PURE__ */ jsx(Table.Th, { children: "Severity" }),
          /* @__PURE__ */ jsx(Table.Th, { children: "Title" }),
          /* @__PURE__ */ jsx(Table.Th, { children: "Status" }),
          /* @__PURE__ */ jsx(Table.Th, { children: "Source" }),
          /* @__PURE__ */ jsx(Table.Th, { children: "Reported at" }),
          /* @__PURE__ */ jsx(Table.Th, { children: "Actions" })
        ] }) }),
        /* @__PURE__ */ jsx(Table.Tbody, { children: requests.map((request) => /* @__PURE__ */ jsxs(Table.Tr, { onClick: () => onNavigateToRequest?.(request.id), children: [
          /* @__PURE__ */ jsx(Table.Td, { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsx(
            Checkbox,
            {
              checked: selection.isSelected(request.id),
              onChange: () => selection.toggle(request.id)
            }
          ) }),
          /* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(RequestTypeBadge, { type: request.type }) }),
          /* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(SeverityBadge, { severity: request.severity }) }),
          /* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(Text, { size: "sm", lineClamp: 1, children: request.title }) }),
          /* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(StatusBadge, { status: request.status }) }),
          /* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: request.source }) }),
          /* @__PURE__ */ jsx(Table.Td, { children: /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: formatTimeAgo(request.reported_at) }) }),
          /* @__PURE__ */ jsx(Table.Td, { onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsx(
            StatusTransitionMenu,
            {
              currentStatus: request.status,
              onTransition: (newStatus) => updateStatus({ id: request.id, status: newStatus })
            }
          ) })
        ] }, request.id)) })
      ] }),
      pageCount > 1 && /* @__PURE__ */ jsx(Group, { justify: "flex-start", px: "md", pb: "md", children: /* @__PURE__ */ jsx(Pagination, { size: "sm", total: pageCount, value: page, onChange: setPage, boundaries: 1 }) })
    ] }) }),
    /* @__PURE__ */ jsx(
      CustomModal,
      {
        opened: showBatchDelete,
        onClose: () => !deleteRequest.isPending && setShowBatchDelete(false),
        size: "sm",
        loading: deleteRequest.isPending,
        children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
          /* @__PURE__ */ jsxs(Group, { gap: "sm", children: [
            /* @__PURE__ */ jsx(IconAlertTriangle, { size: 24, color: "var(--color-error)" }),
            /* @__PURE__ */ jsxs(Title, { order: 4, children: [
              "Delete ",
              selection.selectedCount,
              " Requests"
            ] })
          ] }),
          /* @__PURE__ */ jsxs(Text, { size: "sm", children: [
            "Are you sure you want to delete",
            " ",
            /* @__PURE__ */ jsx(Text, { span: true, fw: 600, children: selection.selectedCount }),
            " ",
            "selected requests?"
          ] }),
          /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", children: "This action cannot be undone." }),
          /* @__PURE__ */ jsxs(Group, { justify: "flex-end", mt: "md", children: [
            /* @__PURE__ */ jsx(Button, { variant: "light", onClick: () => setShowBatchDelete(false), disabled: deleteRequest.isPending, children: "Cancel" }),
            /* @__PURE__ */ jsx(Button, { color: "red", loading: deleteRequest.isPending, onClick: () => void handleDeleteSelected(), children: "Delete" })
          ] })
        ] })
      }
    )
  ] });
}
function formatDateTime(isoString) {
  if (!isoString) return "N/A";
  return new Date(isoString).toLocaleString(void 0, {
    dateStyle: "medium",
    timeStyle: "short"
  });
}
function MetaField({ label, children }) {
  return /* @__PURE__ */ jsxs(Stack, { gap: 2, children: [
    /* @__PURE__ */ jsx(Text, { size: "xs", c: "var(--color-text-subtle)", tt: "uppercase", fw: 600, children: label }),
    /* @__PURE__ */ jsx("div", { children })
  ] });
}
function JsonSection({ title, icon, data, emptyLabel }) {
  const [view, setView] = useState("formatted");
  return /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
    /* @__PURE__ */ jsx(
      CardHeader,
      {
        icon,
        title,
        rightSection: data !== null && data !== void 0 ? /* @__PURE__ */ jsx(
          SegmentedControl,
          {
            value: view,
            onChange: (v) => setView(v),
            size: "xs",
            data: [
              { label: "Formatted", value: "formatted" },
              { label: "JSON", value: "json" }
            ]
          }
        ) : null
      }
    ),
    data === null || data === void 0 ? /* @__PURE__ */ jsx(Text, { size: "sm", c: "dimmed", fs: "italic", children: emptyLabel }) : view === "formatted" ? /* @__PURE__ */ jsx(ContextViewer, { data }) : /* @__PURE__ */ jsx(JsonViewer, { data })
  ] }) });
}
function RequestsDetailPage({ requestId, onNavigateBack }) {
  const { data: request, isLoading } = useRequest(requestId);
  const { mutate: updateStatus, isPending: isUpdating } = useUpdateRequestStatus();
  function handleTransition(newStatus) {
    updateStatus(
      { id: requestId, status: newStatus },
      {
        onSuccess: () => {
          notifications.show({
            title: "Status updated",
            message: `Request status changed to "${newStatus.replace("_", " ")}".`,
            color: "green",
            position: "top-right",
            autoClose: 4e3
          });
        },
        onError: (error) => {
          const message = error instanceof Error ? error.message : "Failed to update status.";
          notifications.show({
            title: "Update failed",
            message,
            color: "red",
            position: "top-right",
            autoClose: 5e3
          });
        }
      }
    );
  }
  const backButton = onNavigateBack ? /* @__PURE__ */ jsx(Button, { variant: "light", leftSection: /* @__PURE__ */ jsx(IconArrowLeft, { size: 16 }), onClick: onNavigateBack, size: "sm", children: "Back" }) : null;
  if (isLoading) {
    return /* @__PURE__ */ jsxs(Stack, { children: [
      /* @__PURE__ */ jsxs(Group, { justify: "space-between", align: "end", children: [
        /* @__PURE__ */ jsx(Skeleton, { height: 36, width: 240 }),
        backButton
      ] }),
      /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
        /* @__PURE__ */ jsx(Skeleton, { height: 20, width: 180 }),
        /* @__PURE__ */ jsx(SimpleGrid, { cols: 2, children: Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
          /* @__PURE__ */ jsx(Skeleton, { height: 12, width: 80 }),
          /* @__PURE__ */ jsx(Skeleton, { height: 20, width: 140 })
        ] }, i)) })
      ] }) }),
      /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsx(Skeleton, { height: 80 }) })
    ] });
  }
  if (!request) {
    return /* @__PURE__ */ jsxs(Stack, { children: [
      /* @__PURE__ */ jsx(PageTitleCaption, { title: "Request Not Found", rightSection: backButton ?? void 0 }),
      /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsx(Text, { ta: "center", c: "dimmed", children: "This request no longer exists or could not be loaded." }) })
    ] });
  }
  const currentStatus = request.status;
  return /* @__PURE__ */ jsxs(Stack, { children: [
    /* @__PURE__ */ jsx(
      PageTitleCaption,
      {
        title: request.title,
        rightSection: /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
          /* @__PURE__ */ jsx(StatusTransitionMenu, { currentStatus, onTransition: handleTransition }),
          backButton
        ] })
      }
    ),
    /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
      /* @__PURE__ */ jsx(
        CardHeader,
        {
          icon: /* @__PURE__ */ jsx(IconClipboardText, { size: 18 }),
          title: "Details",
          rightSection: /* @__PURE__ */ jsxs(Group, { gap: "xs", children: [
            /* @__PURE__ */ jsx(Text, { size: "sm", ff: "monospace", c: "var(--color-text-subtle)", children: request.id }),
            /* @__PURE__ */ jsx(CopyButton, { value: `/requests review ${request.id}`, children: ({ copied, copy }) => /* @__PURE__ */ jsx(Tooltip, { label: copied ? "Copied!" : "Copy ID", withArrow: true, children: /* @__PURE__ */ jsx(
              ActionIcon,
              {
                onClick: copy,
                variant: "subtle",
                size: "xs",
                color: copied ? "green" : "var(--color-text-subtle)",
                children: copied ? /* @__PURE__ */ jsx(IconCheck, { size: 14 }) : /* @__PURE__ */ jsx(IconCopy, { size: 14 })
              }
            ) }) })
          ] })
        }
      ),
      /* @__PURE__ */ jsxs(SimpleGrid, { cols: 2, spacing: "md", children: [
        /* @__PURE__ */ jsxs(MetaField, { label: "Status", children: [
          /* @__PURE__ */ jsx(StatusBadge, { status: currentStatus }),
          isUpdating && /* @__PURE__ */ jsx(Text, { size: "xs", c: "dimmed", ml: 4, span: true, children: "Updating\u2026" })
        ] }),
        /* @__PURE__ */ jsx(MetaField, { label: "Type", children: /* @__PURE__ */ jsx(RequestTypeBadge, { type: request.type }) }),
        /* @__PURE__ */ jsx(MetaField, { label: "Severity", children: /* @__PURE__ */ jsx(SeverityBadge, { severity: request.severity }) }),
        /* @__PURE__ */ jsx(MetaField, { label: "Category", children: /* @__PURE__ */ jsx(Text, { size: "sm", children: request.category }) }),
        /* @__PURE__ */ jsx(MetaField, { label: "Source", children: /* @__PURE__ */ jsx(Text, { size: "sm", children: request.source }) }),
        /* @__PURE__ */ jsx(MetaField, { label: "Reporter", children: /* @__PURE__ */ jsx(Text, { size: "sm", children: request.reporter_id ?? "Unknown" }) }),
        /* @__PURE__ */ jsx(MetaField, { label: "Reported At", children: /* @__PURE__ */ jsx(Text, { size: "sm", children: formatDateTime(request.reported_at) }) }),
        request.resolved_at && /* @__PURE__ */ jsx(MetaField, { label: "Resolved At", children: /* @__PURE__ */ jsx(Text, { size: "sm", children: formatDateTime(request.resolved_at) }) })
      ] })
    ] }) }),
    /* @__PURE__ */ jsx(Paper, { withBorder: true, children: /* @__PURE__ */ jsxs(Stack, { gap: "md", children: [
      /* @__PURE__ */ jsx(CardHeader, { icon: /* @__PURE__ */ jsx(IconFileDescription, { size: 18 }), title: "Description" }),
      /* @__PURE__ */ jsx(Text, { size: "sm", style: { whiteSpace: "pre-wrap" }, children: request.description })
    ] }) }),
    /* @__PURE__ */ jsx(
      JsonSection,
      {
        title: "Evidence",
        icon: /* @__PURE__ */ jsx(IconAlertCircle, { size: 18 }),
        data: request.evidence,
        emptyLabel: "No evidence recorded."
      }
    ),
    /* @__PURE__ */ jsx(
      JsonSection,
      {
        title: "Context",
        icon: /* @__PURE__ */ jsx(IconInfoCircle, { size: 18 }),
        data: request.context,
        emptyLabel: "No context recorded."
      }
    )
  ] });
}

export { RequestButton, RequestTypeBadge, RequestsDetailPage, RequestsListPage, SeverityBadge, StatusBadge, StatusTransitionMenu, submittedRequestsManifest };
