import { CalendarEvent } from '../../src/types/CalendarTypes';

/**
 * Setup mock DOM for testing
 */
export function setupMockDOM(): void {
  // Create basic DOM structure for testing
  document.body.innerHTML = `
    <div class="swp-calendar-grid" data-current="true">
      <div class="swp-day-header" data-date="2024-09-22"></div>
      <div class="swp-day-header" data-date="2024-09-23"></div>
      <div class="swp-day-header" data-date="2024-09-24"></div>
      <div class="swp-day-header" data-date="2024-09-25"></div>
      <div class="swp-day-header" data-date="2024-09-26"></div>
    </div>
    <swp-calendar-header>
      <swp-allday-container></swp-allday-container>
    </swp-calendar-header>
  `;
}

/**
 * Create mock CalendarEvent for testing
 */
export function createMockEvent(
  id: string, 
  title: string, 
  startDate: string, 
  endDate: string
): CalendarEvent {
  return {
    id,
    title,
    start: new Date(startDate),
    end: new Date(endDate),
    type: 'work',
    allDay: true,
    syncStatus: 'synced'
  };
}