import { render, screen } from '@testing-library/react';
import Header from '@/app/components/Header';

// Mock next-intl
jest.mock('next-intl', () => ({
  useLocale: () => 'en',
  useTranslations: () => (key: string) => {
    const messages: Record<string, string> = {
      home: 'Home',
      about: 'About',
      projects: 'Projects',
      contact: 'Contact'
    };
    return messages[key] || key;
  },
}));

// Mock next/navigation
jest.mock('next/navigation', () => ({
  usePathname: () => '/en',
}));

describe('Header', () => {
  it('renders the header with the dk logo', () => {
    render(<Header />);
    expect(screen.getByText('dk')).toBeInTheDocument();
    
    // Check for navigation links
    expect(screen.getByText('Home')).toBeInTheDocument();
    expect(screen.getByText('About')).toBeInTheDocument();
    expect(screen.getByText('Projects')).toBeInTheDocument();
    expect(screen.getByText('Contact')).toBeInTheDocument();
  });
});
