import 'package:audio_service/audio_service.dart';
import 'package:flutter/material.dart';
import 'app.dart';
import 'servicios/servicio_audio.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  final handler = await AudioService.init(
    builder: () => PluriWaveAudioHandler(),
    config: const AudioServiceConfig(
      androidNotificationChannelId: 'es.freetimelab.pluriwave.audio',
      androidNotificationChannelName: 'PluriWave Radio',
      androidNotificationOngoing: true,
      androidStopForegroundOnPause: true,
      notificationColor: Color(0xFF6750A4),
    ),
  );
  registrarHandler(handler);

  runApp(const PluriWaveApp());
}
