'use client';

import { logout } from '@/app/login/actions';

interface LogoutButtonProps {
  className?: string;
  children?: React.ReactNode;
}

export default function LogoutButton({ className, children }: LogoutButtonProps) {
  const handleLogout = async () => {
    await logout();
  };

  return (
    <button
      onClick={handleLogout}
      className={className || 'btn-logout'}
    >
      {children || 'Abmelden'}
    </button>
  );
}
