import React from 'react';
import { Button } from "@/components/ui/button";
import { Lock } from "lucide-react";

const LockButton = () => {
  const handleLock = () => {
    // Remove PIN verification from session storage
    sessionStorage.removeItem('pinVerified');
    // Reset attempt count
    localStorage.removeItem('pinAttempts');
    localStorage.removeItem('lastAttemptTime');
    // Force reload to show PIN screen
    window.location.reload();
  };

  return (
    <Button
      variant="ghost"
      size="icon"
      className="hover:bg-gray-100 dark:hover:bg-gray-800"
      onClick={handleLock}
    >
      <Lock className="h-5 w-5" />
    </Button>
  );
};

export default LockButton;