NetworkMockEndpointViewModel
class NetworkMockEndpointViewModel(endpointKey: EndpointKey, configRepository: MockConfigRepository, stateRepository: MockStateRepository) : ViewModel
ViewModel for the Network Mock endpoint detail screen.
Manages the state and business logic for a single endpoint, combining its discovered mock responses with the live persisted EndpointMockState so the UI always reflects the latest selection without any manual lookup.
Responsibilities
Discover available mock response files for the given endpointKey
Observe the live EndpointMockState for the endpoint from DataStore
Combine both into a single uiState flow
Handle mock state changes triggered by the user
Constructors
Link copied to clipboard
constructor(endpointKey: EndpointKey, configRepository: MockConfigRepository, stateRepository: MockStateRepository)