"use client";

import React, { useState } from 'react';
import classnames from 'classnames';

interface ButtonProps {
  onClick?: () => void;
  children: React.ReactNode;
  className?: string;
}

const Button: React.FC<ButtonProps> = ({ onClick, children, className }) => {
    const [isHovered, setIsHovered] = useState(false);
    
  return (
    <button 
        onClick={onClick} 
        className={classnames(
            className, {
                'cursor-pointer': isHovered,
                'cursor-default': !isHovered,
            }
        )}
        onMouseEnter={() => setIsHovered(true)}
        onMouseLeave={() => setIsHovered(false)}
    >
      {children}
    </button>
  );
};

export default Button;