import 'package:krow_domain/krow_domain.dart';
import 'package:intl/intl.dart';

// Mock Implementation for now.
class ShiftsRepositoryMock {
  
  Future<List<Shift>> getMyShifts() async {
    await Future.delayed(const Duration(milliseconds: 500));
    return [
      Shift(
        id: 'm1',
        title: 'Warehouse Assistant',
        clientName: 'Amazon',
        logoUrl: 'https://upload.wikimedia.org/wikipedia/commons/thumb/0/06/Amazon_2024.svg/500px-Amazon_2024.svg.png',
        hourlyRate: 22.5,
        date: DateFormat('yyyy-MM-dd').format(DateTime.now().add(const Duration(days: 1))),
        startTime: '09:00',
        endTime: '17:00',
        location: 'Logistics Park',
        locationAddress: '456 Industrial Way',
        status: 'confirmed',
        createdDate: DateTime.now().toIso8601String(),
        description: 'Standard warehouse duties. Safety boots required.',
      ),
    ];
  }

  Future<List<Shift>> getAvailableShifts() async {
    await Future.delayed(const Duration(milliseconds: 500));
    return [
      Shift(
        id: 'a1',
        title: 'Bartender',
        clientName: 'Club Luxe',
        logoUrl: null,
        hourlyRate: 30.0,
        date: DateFormat('yyyy-MM-dd').format(DateTime.now().add(const Duration(days: 3))),
        startTime: '20:00',
        endTime: '02:00',
        location: 'City Center',
        locationAddress: '789 Nightlife Blvd',
        status: 'open',
        createdDate: DateTime.now().toIso8601String(),
        description: 'Experience mixing cocktails required.',
      ),
      // Add more mocks if needed
    ];
  }

  Future<List<Shift>> getPendingAssignments() async {
    await Future.delayed(const Duration(milliseconds: 500));
    return [
      Shift(
        id: 'p1',
        title: 'Event Server',
        clientName: 'Grand Hotel',
        logoUrl: null,
        hourlyRate: 25.0,
        date: DateFormat('yyyy-MM-dd').format(DateTime.now().add(const Duration(days: 2))),
        startTime: '16:00',
        endTime: '22:00',
        location: 'Downtown',
        locationAddress: '123 Main St',
        status: 'pending',
        createdDate: DateTime.now().toIso8601String(),
      ),
    ];
  }

  Future<Shift?> getShiftDetails(String shiftId) async {
    await Future.delayed(const Duration(milliseconds: 500));
    return Shift(
      id: shiftId,
      title: 'Event Server',
      clientName: 'Grand Hotel',
      logoUrl: null,
      hourlyRate: 25.0,
      date: DateFormat('yyyy-MM-dd').format(DateTime.now()),
      startTime: '16:00',
      endTime: '22:00',
      location: 'Downtown',
      locationAddress: '123 Main St, New York, NY',
      status: 'open',
      createdDate: DateTime.now().toIso8601String(),
      description: 'Provide exceptional customer service. Respond to guest requests or concerns promptly and professionally.',
      managers: [],
    );
  }
}
