import { AlertTriangle } from 'lucide-react'
import {
Alert,
AlertDescription,
AlertTitle,
Badge,
Button_Shadcn_,
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
} from 'ui'
import { ShimmeringLoader } from 'ui-patterns/ShimmeringLoader'
import { useErrorCodesQuery } from '@/data/content-api/docs-error-codes-query'
import { Service, type ErrorCodeQueryQuery } from '@/data/graphql/graphql'
interface ErrorCodeDialogProps {
open: boolean
onOpenChange: (open: boolean) => void
errorCode: string
service?: Service
}
export const ErrorCodeDialog = ({
open,
onOpenChange,
errorCode,
service,
}: ErrorCodeDialogProps) => {
const {
data,
isPending: isLoading,
isSuccess,
refetch,
} = useErrorCodesQuery({ code: errorCode, service }, { enabled: open })
return (
)
}
const LoadingState = () => (
<>
Possible explanations for this error:
{message}
> ) } const ErrorState = ({ refetch }: { refetch?: () => void }) => (Failed to look up error code help info
{refetch && (