import 'package:dartz/dartz.dart';

import '../analytic.dart';

abstract class IAnalyticRepository {
  Future<Either<AnalyticFailure, SalesAnalytic>> getSales({
    required DateTime dateFrom,
    required DateTime dateTo,
    String? outletId,
  });

  Future<Either<AnalyticFailure, ProfitLossAnalytic>> getProfitLoss({
    required DateTime dateFrom,
    required DateTime dateTo,
    String? outletId,
  });

  Future<Either<AnalyticFailure, CategoryAnalytic>> getCategory({
    required DateTime dateFrom,
    required DateTime dateTo,
    String? outletId,
  });

  Future<Either<AnalyticFailure, InventoryAnalytic>> getInventory({
    required DateTime dateFrom,
    required DateTime dateTo,
    String? outletId,
  });

  Future<Either<AnalyticFailure, DashboardAnalytic>> getDashboard({
    required DateTime dateFrom,
    required DateTime dateTo,
    String? outletId,
  });

  Future<Either<AnalyticFailure, ProductAnalytic>> getProduct({
    required DateTime dateFrom,
    required DateTime dateTo,
    String? outletId,
  });

  Future<Either<AnalyticFailure, PaymentMethodAnalytic>> getPaymentMethod({
    required DateTime dateFrom,
    required DateTime dateTo,
    String? outletId,
  });

  Future<Either<AnalyticFailure, PurchasingAnalytic>> getPurchasing({
    required DateTime dateFrom,
    required DateTime dateTo,
    String? outletId,
    String groupBy = 'day',
  });

  Future<Either<AnalyticFailure, ExclusiveSummary>> getExclusiveSummary({
    required DateTime dateFrom,
    required DateTime dateTo,
    String? outletId,
  });

  Future<Either<AnalyticFailure, ProfitSharing>> getProfitSharing({
    required DateTime dateFrom,
    required DateTime dateTo,
    String? outletId,
    String groupBy = 'day',
  });

  Future<Either<AnalyticFailure, ProfitSharingDetail>> getProfitSharingDetail({
    required String parentCategoryId,
    required DateTime dateFrom,
    required DateTime dateTo,
    String? outletId,
  });
}
