export type OrderStatus = 'offen' | 'inBearbeitung' | 'abgeschlossen' | 'storniert';

export interface Customer {
  id: string;
  customerNumber: string;
  name: string;
  street: string;
  zipCode: string;
  city: string;
  latitude: number;
  longitude: number;
  distanceKm: number;
  phone?: string;
  email?: string;
  notes?: string;
  firstContactDate?: string;
  openOrdersCount: number;
  lastOrderDate?: string;
}

export interface WorkOrder {
  id: string;
  customerId: string;
  customerName?: string;
  title: string;
  description?: string;
  scheduledDate: string;
  scheduledTime?: string;
  technicianName?: string;
  status: OrderStatus;
}

export interface ScheduleItem {
  id: string;
  title: string;
  customerName?: string;
  technicianName?: string;
  address?: string;
  taskDescription?: string;
  startTime: string;
  endTime: string;
  status: 'In Bearbeitung' | 'Geplant' | 'Abgeschlossen';
}

export interface SystemStatus {
  isConnected: boolean;
  host: string;
  dbName: string;
  latencyMs: number;
  isSslEnabled: boolean;
  lastSync: Date;
  errorMessage?: string;
}

export interface DashboardMetrics {
  activeOrdersCount: number;
  techniciansInField: { active: number; total: number };
  openInvoicesAmount: number;
  inventoryWarningsCount: number;
}
