import React from 'react'

interface LoadingDialogProps {
  open: boolean
  message?: string
}

export function LoadingDialog({ open, message = 'Loading...' }: LoadingDialogProps) {
  if (!open) return null

  return (
    <div className="fixed inset-0 z-50 flex items-center justify-center bg-black/50">
      <div className="flex flex-col items-center gap-3 rounded-lg bg-white p-6 shadow-lg">
        <div className="h-8 w-8 animate-spin rounded-full border-4 border-brand-500 border-t-transparent" />
        <p className="text-sm text-gray-600">{message}</p>
      </div>
    </div>
  )
}
