package com.correx.core.tools

import com.correx.core.events.events.StoredEvent
import com.correx.core.sessions.projections.Projection
import com.correx.core.tools.state.ToolState

class ToolProjector(private val reducer: ToolReducer) : Projection<ToolState> {
    override fun initial(): ToolState = ToolState()

    override fun apply(state: ToolState, event: StoredEvent): ToolState = reducer.reduce(state, event)
}
