"use client"

import { Button } from "@/components/ui/button"
import {
  Dialog,
  DialogContent,
  DialogDescription,
  DialogFooter,
  DialogHeader,
  DialogTitle,
} from "@/components/ui/dialog"
import { Siren, ShieldAlert, Gavel } from "lucide-react"

interface ScamWarningModalProps {
  open: boolean
  onOpenChange: (open: boolean) => void
}

export function ScamWarningModal({ open, onOpenChange }: ScamWarningModalProps) {
  return (
    <Dialog open={open} onOpenChange={onOpenChange}>
      <DialogContent className="sm:max-w-[460px] w-[95vw]">
        <DialogHeader>
          <DialogTitle className="sr-only">Anti-fraud warning</DialogTitle>
          <div className="flex flex-col items-center text-center pt-2">
            <div className="siren-glow rounded-full p-4 mb-3 bg-red-50 border border-red-100">
              <Siren className="h-12 w-12 text-red-600 siren-pulse" />
            </div>
            <p className="text-xl font-bold text-red-600">Scam & Fraud Warning</p>
            <DialogDescription className="text-sm text-gray-700 pt-3 space-y-3">
              <p className="font-semibold text-red-700">
                You are about to enter a contact phone number for this listing.
              </p>
              <ul className="list-disc pl-5 text-left space-y-1.5">
                <li>
                  Any fraudulent, misleading, or scam attempt on this platform is
                  recorded and reported to the authorities.
                </li>
                <li>
                  Offenders will be identified by their account, phone number, IP
                  address, and device, and will be <strong>arrested and prosecuted</strong>.
                </li>
                <li>
                  Only provide a genuine phone number that belongs to you or is
                  legally under your control.
                </li>
              </ul>
            </DialogDescription>
          </div>
        </DialogHeader>
        <DialogFooter className="flex-col sm:flex-row gap-2">
          <Button
            variant="outline"
            onClick={() => onOpenChange(false)}
            className="w-full sm:w-auto"
          >
            Go Back
          </Button>
          <Button
            onClick={() => onOpenChange(false)}
            className="w-full sm:w-auto bg-red-600 hover:bg-red-700 text-white"
          >
            <Gavel className="mr-2 h-4 w-4" />
            I Understand, Proceed
          </Button>
        </DialogFooter>
        <p className="flex items-center justify-center gap-1.5 text-xs text-gray-500 pt-1">
          <ShieldAlert className="h-3.5 w-3.5" />
          Protected under applicable data protection laws.
        </p>
      </DialogContent>
    </Dialog>
  )
}
