import {
  Dialog,
  DialogContent,
  DialogHeader,
  DialogTitle,
  DialogDescription,
  DialogFooter,
} from "@/components/ui/dialog";
import { Button } from "@/components/ui/button";

interface ThemeApplyConfirmDialogProps {
  open: boolean;
  onConfirm: () => void;
  onCancel: () => void;
}

export function ThemeApplyConfirmDialog({
  open,
  onConfirm,
  onCancel,
}: ThemeApplyConfirmDialogProps) {
  return (
    <Dialog open={open} onOpenChange={(isOpen) => { if (!isOpen) onCancel(); }}>
      <DialogContent showCloseButton={false}>
        <DialogHeader>
          <DialogTitle>Apply theme?</DialogTitle>
          <DialogDescription>
            This will update your Nexus color scheme. You can revert from
            Settings.
          </DialogDescription>
        </DialogHeader>
        <DialogFooter>
          <Button variant="ghost" onClick={onCancel}>
            Keep current
          </Button>
          <Button onClick={onConfirm}>
            Apply theme
          </Button>
        </DialogFooter>
      </DialogContent>
    </Dialog>
  );
}
