import 'package:hub/src/core/data/datasource/hub_remote_datasource.dart';
import 'package:hub/src/core/domain/repositories/hub_repository.dart';
import 'package:hub/src/features/hub/domain/entities/position_entity.dart';
import 'package:legacy_shared/legacy_shared.dart';

class HomeRepositoryImpl implements HomeRepository {
  const HomeRepositoryImpl(this._remote);

  final HomeRemoteDatasource _remote;

  @override
  Future<List<DeviceEntity>> getDevices({required String userId}) async {
    return _remote.getDevices(userId: userId);
  }

  @override
  Future<List<PositionEntity>> getLatestPositions({required String deviceId}) async {
    return _remote.getLatestPositions(deviceId: deviceId);
  }
}
