public static IErrorModel GetErrorModel(this OutputState outputState, ErrorModelType errorModelType) => outputState.ErrorModels .Find(d => d.ErrorModelType == errorModelType) .AssertSome($"Failed to find {errorModelType} in error models for {outputState.Name}");
public static OutputState WithIsSelected(this OutputState outputState, bool isSelected) => new OutputState(outputState.Name, outputState.ErrorModelType, outputState.ErrorModels, isSelected);