'use client'

import { WifiSlash } from '@phosphor-icons/react'

interface NetworkErrorCardProps {
  errorMessage?: string
}

export function NetworkErrorCard({ errorMessage }: NetworkErrorCardProps) {
  return (
    <div className="flex flex-col h-full">
      <div className="flex items-center justify-center flex-1 p-8">
        <div className="text-center">
          <WifiSlash className="h-16 w-16 text-red-500/50 mx-auto mb-4" weight="thin" />
          <p className="text-red-500 font-medium mb-2">Request Failed</p>
          <p className="text-sm text-muted-foreground max-w-md">
            {errorMessage || 'An error occurred while sending the request'}
          </p>
        </div>
      </div>
    </div>
  )
}
