"use client";

import { LogOut } from "lucide-react";

export function SignOutButton({ action }: { action: () => Promise<void> }) {
  return (
    <form action={action}>
      <button
        type="submit"
        className="flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium text-fg/80 transition-colors hover:bg-bg hover:text-accent sm:px-3"
        title="Wyloguj się"
      >
        <LogOut size={16} />
        <span className="hidden sm:inline">Wyloguj</span>
      </button>
    </form>
  );
}
