import 'package:frontend_eccp_mobile/app/core/services/remote_config_service.dart';
import 'package:url_launcher/url_launcher.dart';

class ContactAdmin {
  static Future<void> openLink() async {
    await RemoteConfigService.init();

    final config = await RemoteConfigService.getUpdateConfig();
    if (config == null || config.adminLink.isEmpty) return;

    final uri = Uri.parse(config.adminLink);
    await launchUrl(
      uri,
      mode: LaunchMode.externalApplication,
    );
  }
}
