// lib/services/river_api_service.dart

import 'package:intl/intl.dart';
import 'package:flutter/foundation.dart';
import 'package:environment_monitoring_app/services/base_api_service.dart';
import 'package:environment_monitoring_app/services/telegram_service.dart';
import 'package:environment_monitoring_app/services/server_config_service.dart';

class RiverApiService {
  final BaseApiService _baseService;
  final TelegramService _telegramService;
  final ServerConfigService _serverConfigService;

  RiverApiService(this._baseService, this._telegramService, this._serverConfigService);

  Future<Map<String, dynamic>> getManualStations() async {
    final baseUrl = await _serverConfigService.getActiveApiUrl();
    return _baseService.get(baseUrl, 'river/manual-stations');
  }

  Future<Map<String, dynamic>> getTriennialStations() async {
    final baseUrl = await _serverConfigService.getActiveApiUrl();
    return _baseService.get(baseUrl, 'river/triennial-stations');
  }
}