package com.correx.core.critique

import com.correx.core.critique.model.CriticCalibrationState
import com.correx.core.events.events.StoredEvent
import com.correx.core.sessions.projections.Projection

class CriticCalibrationProjector(
    private val reducer: CriticCalibrationReducer,
) : Projection<CriticCalibrationState> {
    override fun initial(): CriticCalibrationState = CriticCalibrationState()
    override fun apply(state: CriticCalibrationState, event: StoredEvent): CriticCalibrationState =
        reducer.reduce(state, event)
}
