# Condition

### Overview

The **Condition Component** evaluates expressions and directs data to either the `true` or `false` output port based on the result. It supports logical conditions using multiple operators and can process complex logical groupings.

### Usage

#### Input Parameters

| Parameter    | Type     | Description                                                                       |
| ------------ | -------- | --------------------------------------------------------------------------------- |
| `expression` | `object` | A structured condition with logical operators (`AND`, `OR`) and comparison rules. |

#### Supported Operators

| Operator   | Description                                              |
| ---------- | -------------------------------------------------------- |
| `=`        | Checks if two values are equal.                          |
| `!=`       | Checks if two values are not equal.                      |
| `>`        | Checks if a value is greater than another.               |
| `>=`       | Checks if a value is greater than or equal to another.   |
| `<`        | Checks if a value is less than another.                  |
| `<=`       | Checks if a value is less than or equal to another.      |
| `%`        | Checks if a number is divisible by another (modulo).     |
| `empty`    | Checks if a value is empty.                              |
| `notEmpty` | Checks if a value is not empty.                          |
| `contains` | Checks if a value contains another value.                |
| `range`    | Checks if a value falls within a specified range.        |
| `regex`    | Validates if a value matches a given regular expression. |

#### Output Ports

| Port    | Description                                  |
| ------- | -------------------------------------------- |
| `true`  | Fires if the condition evaluates to `true`.  |
| `false` | Fires if the condition evaluates to `false`. |

### Instructions

1. **Define Conditions**
   * Create conditions using logical grouping (`AND`, `OR`).
   * Choose an operator and provide a comparison value.
2. **Evaluate Inputs**
   * Inputs are compared using selected operators.
   * Logical groups (`AND`, `OR`) allow complex expressions.
3. **Direct Output**
   * If the condition evaluates to `true`, data is sent to the `true` port.
   * If the condition evaluates to `false`, data is sent to the `false` port.

### Notes

* **Logical Groups:** Conditions can be grouped using `AND` and `OR` for flexible logic handling.
* **Range Handling:** Use `rangeMin` and `rangeMax` to check if a value is within a range.
* **Regex Support:** Allows pattern matching for advanced validation.
