import React from 'react';
import { describe, expect, it, vi } from 'vitest';
import { render, screen } from '@testing-library/react';
import { EventDataProvider } from '../context/EventDataContext';

vi.mock('framer-motion', () => ({
  AnimatePresence: ({ children }: { children: React.ReactNode }) => <div>{children}</div>,
  motion: { div: ({ children }: { children: React.ReactNode }) => <div>{children}</div> },
}));

vi.mock('../services/photosApi', () => ({
  fetchGallery: () => Promise.resolve({ data: [] }),
}));

vi.mock('@/shared/guest/i18n/useTranslation', () => ({
  useTranslation: () => ({ t: (_key: string, fallback?: string) => fallback ?? _key, locale: 'de' }),
}));

import SlideshowScreen from '../screens/SlideshowScreen';

describe('SlideshowScreen', () => {
  it('shows empty state when no photos', async () => {
    render(
      <EventDataProvider token="token">
        <SlideshowScreen />
      </EventDataProvider>
    );

    expect(await screen.findByText('Noch keine Fotos')).toBeInTheDocument();
  });
});
