package com.fabledsword.minstrel.player.ui

import androidx.lifecycle.ViewModel
import com.fabledsword.minstrel.player.PlaybackErrorReporter
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.Flow
import javax.inject.Inject

/**
 * Hilt-injectable wrapper exposing [PlaybackErrorReporter.messages]
 * to ShellScaffold. The reporter itself is an app-scoped singleton;
 * this VM just bridges its Flow into a `hiltViewModel()`-resolvable
 * surface so ShellScaffold can collect it without an EntryPoint
 * accessor.
 */
@HiltViewModel
class PlaybackErrorViewModel @Inject constructor(
    reporter: PlaybackErrorReporter,
) : ViewModel() {
    val messages: Flow<String> = reporter.messages
}
