using Avalonia; using Avalonia.Xaml.Interactivity; namespace Toolkit.UI.Avalonia; public class ComparisonCondition : AvaloniaObject, ICondition { public static readonly StyledProperty LeftOperandProperty = AvaloniaProperty.Register(nameof(LeftOperand)); public static readonly StyledProperty OperatorProperty = AvaloniaProperty.Register(nameof(Operator)); public static readonly StyledProperty RightOperandProperty = AvaloniaProperty.Register(nameof(RightOperand)); public object LeftOperand { get => GetValue(LeftOperandProperty); set => SetValue(LeftOperandProperty, value); } public object RightOperand { get => GetValue(RightOperandProperty); set => SetValue(RightOperandProperty, value); } public ComparisonConditionType Operator { get => GetValue(OperatorProperty); set => SetValue(OperatorProperty, value); } public bool Evaluate() => ComparisonLogic.Evaluate(LeftOperand, Operator, RightOperand); }