
import 'dart:io';

import 'package:be_happy/domain/entities/active_scooter_order.dart';

import '../../core/result.dart';
import '../entities/client_subscription.dart';
import '../entities/point.dart';
import '../entities/scooter.dart';
import '../entities/subscription.dart';
import '../entities/tariff.dart';
import '../entities/scooter_order.dart';

abstract class ScooterRepository {
  Future<List<Scooter>> getScooters(List<double> area, int page, int pageSize);
  Future<Result<Scooter?>> getScooter(int id);
  Future<Result<List<Tariff>>> getAvailableTariffs(int scooterId);
  Future<Result<List<Subscription>>> getAvailableSubscriptions();
  Future<Result<Subscription>> getSubscriptionById(int id);
  Future<Result<List<ClientSubscription>>> getClientSubscriptions();
  Future<Result<ScooterOrder>> bookScooter({
    required int scooterId,
    required int planId,
    int? subscriptionId,
    int? cardId,
    required bool isBalance,
    required bool isInsurance,
  });
  Future<Result<ScooterOrder>> startRide(int orderId);
  Future<Result<ScooterOrder>> cancelRide(int orderId);
  Future<Result<ScooterOrder>> pauseRide(int orderId);
  Future<Result<ScooterOrder>> resumeRide(int orderId);
  Future<Result<ScooterOrder>> finishRide(int orderId, List<int> files);
  Future<Result<void>> payRide(int orderId);
  Future<Result<List<ScooterOrder>>> getClientOrders();
  Future<Result<List<int>>> uploadScooterPhotos(List<File> images);
  Future<Result<ActiveScooterOrder>> updateScooterOrderData({
    required int orderId,
  });
  Future<Result<void>> payScooterOrderWithPhotos({
    required int orderId,
    required int? cardId,
    required bool isBalance,
  });
  Future<Result<ScooterOrder>> getScooterOrderById(int id);

  Future<Result<List<ScooterOrder>>> getScooterOrderHistory({
    int page = 1,
    int pageSize = 20,
  });

  Future<Result<Scooter?>> getScooterByTitle(String title);

  Future<Result<List<Point>>> getScooterOrderRouteHistory(int id);

}
