> For the complete documentation index, see [llms.txt](https://gstudios.gitbook.io/gslibrary/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gstudios.gitbook.io/gslibrary/conditions-api/how-to-make-condition.md).

# How to make condition

### Creating condition

Okay, we're starting to create our first condition. The new condition type that presents our conditions library is based on sections. Here is an example of the functionality of sections in the config:

{% code title="example of section list" lineNumbers="true" %}

```yaml
conditions: # <-- This is section name. 
  first: # <-- This is the first section in our list of sections. 
    data1: # <-- We can add multiple data rows to the section
    data2:
  second: # <-- This is another section. You can create unlimited sections in the list.
```

{% endcode %}

Now you know how to use sections. Lets take a look at conditions format.\
\
When we create an condition, we name it arbitrarily. The name must be together and must be unique in the list.

{% code title="creating condition, condition name" overflow="wrap" lineNumbers="true" %}

```yaml
conditions:
  condition_name: # <<<---
```

{% endcode %}

Now you have to add condition data for full funcionality.

\
Select a condition type from the [`list of library conditions`](/gslibrary/conditions-api/conditions-types-list.md) or select condition type from [`specific plugin`](/gslibrary/our-plugins.md). For a example we will make a <mark style="color:blue;">has-permission</mark> condition.

Every condition request type. Determine the type as follows:

{% code title="creating condition, condition type" lineNumbers="true" %}

```yaml
conditions:
  condition_name:
    type: has-permission # <-- here paste your selected type instead of a has-permission
```

{% endcode %}

Now just add requested data for your condition. HasPermission only request input. Each condition has a proper example in the [`conditions list`](/gslibrary/conditions-api/conditions-types-list.md).

{% code title="creating condition, condition data" overflow="wrap" lineNumbers="true" %}

```yaml
conditions:
  condition_name:
    type: has-permission
    inoput: 'rotatingheads.create' # <-- example permission to check
```

{% endcode %}
