package com.correx.core.transitions.conditions

import com.correx.core.transitions.evaluation.EvaluationContext
import com.correx.core.transitions.graph.TransitionCondition

data class AllOf(val conditions: List<TransitionCondition>) : TransitionCondition {
    override fun evaluate(context: EvaluationContext) =
        conditions.all { it.evaluate(context) }
}

data class AnyOf(val conditions: List<TransitionCondition>) : TransitionCondition {
    override fun evaluate(context: EvaluationContext) =
        conditions.any { it.evaluate(context) }
}

data class Not(val condition: TransitionCondition) : TransitionCondition {
    override fun evaluate(context: EvaluationContext) =
        !condition.evaluate(context)
}
