/**
 * User-related types
 */

export interface User {
  id: string;
  email: string;
  firstName: string;
  lastName: string;
  avatarUrl?: string;
  departmentId?: string;
  roles: UserRole[];
  isActive: boolean;
  createdAt: Date;
  updatedAt: Date;
}

export type UserRole = 'admin' | 'manager' | 'department_head' | 'employee';

export interface UserPreferences {
  theme: 'light' | 'dark' | 'system';
  language: 'de' | 'en';
  dashboardLayout?: DashboardWidgetConfig[];
  notifications: NotificationPreferences;
}

export interface DashboardWidgetConfig {
  id: string;
  widgetType: string;
  position: { x: number; y: number };
  size: { width: number; height: number };
  settings?: Record<string, unknown>;
}

export interface NotificationPreferences {
  email: boolean;
  push: boolean;
  inApp: boolean;
  digest: 'none' | 'daily' | 'weekly';
}

export interface CreateUserDto {
  email: string;
  firstName: string;
  lastName: string;
  departmentId?: string;
  roles: UserRole[];
}

export interface UpdateUserDto {
  firstName?: string;
  lastName?: string;
  avatarUrl?: string;
  departmentId?: string;
  roles?: UserRole[];
  isActive?: boolean;
}
