import 'package:krow_domain/krow_domain.dart';
import '../session/client_session_store.dart';

/// Mock implementation of data source for Home dashboard data.
///
/// This mock simulates backend responses for dashboard-related queries.
class HomeRepositoryMock {
  /// Returns a mock [HomeDashboardData].
  Future<HomeDashboardData> getDashboardData() async {
    // Simulate network delay
    await Future.delayed(const Duration(milliseconds: 500));

    return const HomeDashboardData(
      weeklySpending: 4250.0,
      next7DaysSpending: 6100.0,
      weeklyShifts: 12,
      next7DaysScheduled: 18,
      totalNeeded: 10,
      totalFilled: 8,
    );
  }

  /// Returns the current user's session data.
  ///
  /// Returns a tuple of (businessName, photoUrl).
  (String, String?) getUserSession() {
    final ClientSession? session = ClientSessionStore.instance.session;
    final String businessName = session?.business?.businessName ?? 'Your Company';
    final String? photoUrl = session?.userPhotoUrl;
    return (businessName, photoUrl);
  }
}
