import {
Alert_Shadcn_,
AlertDescription_Shadcn_,
AlertTitle_Shadcn_,
Badge,
Button_Shadcn_,
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
} from 'ui'
import { useErrorCodesQuery } from 'data/content-api/docs-error-codes-query'
import { type ErrorCodeQueryQuery, Service } from 'data/graphql/graphql'
import { AlertTriangle } from 'lucide-react'
import ShimmeringLoader from 'ui-patterns/ShimmeringLoader'
interface ErrorCodeDialogProps {
open: boolean
onOpenChange: (open: boolean) => void
errorCode: string
service?: Service
}
export const ErrorCodeDialog = ({
open,
onOpenChange,
errorCode,
service,
}: ErrorCodeDialogProps) => {
const { data, 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 && (