import React from 'react';
import { Button } from '@/ui/Button';
import { Stack } from '@/ui/Stack';
import { routes } from '@/lib/routing/RouteConfig';
import { LogIn, UserPlus } from 'lucide-react';

interface HeaderActionsProps {
  isAuthenticated: boolean;
}

/**
 * HeaderActions provides the primary actions in the header (Login, Signup, Profile).
 */
export function HeaderActions({ isAuthenticated }: HeaderActionsProps) {
  if (isAuthenticated) {
    return (
      <Stack direction="row" gap={3}>
        <Button as="a" href={routes.protected.profile} variant="secondary" size="sm">
          Profile
        </Button>
      </Stack>
    );
  }

  return (
    <Stack direction="row" gap={3}>
      <Button
        as="a"
        href={routes.auth.login}
        variant="ghost"
        size="sm"
        icon={<LogIn size={16} />}
        data-testid="public-nav-login"
      >
        Login
      </Button>
      <Button
        as="a"
        href={routes.auth.signup}
        variant="primary"
        size="sm"
        icon={<UserPlus size={16} />}
        data-testid="public-nav-signup"
      >
        Sign Up
      </Button>
    </Stack>
  );
}
