import 'package:niogu_app/core/entities/custom_activity.dart';
import 'package:niogu_app/core/enums/approval_process.dart';
import 'package:niogu_app/core/enums/canceled_by.dart';
import 'package:niogu_app/core/enums/order_status.dart';
import 'package:niogu_app/features/online_store/domain/entities/online_store.dart';

abstract class IOnlineStoreRepository {
  Future<ConfigureOnlineStore> getConfigureOnlineStore();

  Future<void> configureOnlineStore(ConfigureOnlineStore configure);

  Stream<List<OnlineStoreProduct>> watchOnlineStoreProducts();

  Future<int> updateAlreadyOrderOnline(String orderId);

  Stream<MessageActivity?> watchOrderOnlineHasNotReview();

  Stream<int> watchNumberOfNeedToBeProcessed();

  Stream<List<OnlineOrder>> watchOnlineOrders({
    String? outletId,
    DateTime? startDate,
    DateTime? endDate,
  });

  Future<OnlineOrderDetail> fetchOnlineOrderDetailById(String orderId);

  Stream<ViewOrderStatus> watchOrderStatusById(String orderId);

  Future<int> updateOrder({
    required String orderId,
    required OrderStatus orderStatus,
    required bool cancellationAccepted,
    ApprovalProcess? process,
    CanceledBy? canceledBy,
  });

  Future<ShippingConfiguration> fetchShippingConfiguration();

  Future<int> shippingConfiguration(ShippingConfiguration configure);

  Future<List<ConfigurePaymentMethod>> fetchConfigurePaymentMethod();

  Future<void> paymentMethodConfiguration(
    List<ConfigurePaymentMethod> configures,
  );

  Stream<List<DisplayProductReview>> watchProductReviews();

  Stream<DetailProductReview> watchDetailProductReview(String productId);

  Stream<List<ProductComment>> watchProductComments(String productId);

  Future<RatingConfiguration> fetchRatingConfiguration();

  Future<int> ratingConfiguration(RatingConfiguration configuration);

  Stream<List<ProductCampaign>> watchProductCampaigns();

  Stream<List<CategoryCampaign>> watchCategoryCampaigns();

  Stream<List<DisplayCampaign>> watchCampaigns();

  Stream<List<TargetOutlet>> watchTargetOutlets();

  Future<CampaignDetail> fetchCampaignById(String id);

  Future<void> saveCampaign({
    required UpsertCampaign campaign,
    List<String>? deleteTargetOutlets,
  });

  Future<void> deleteCampaign(String campaignId);
}
