"""DROID circuits. These circuits are auto-generated from circuits.json."""

from pydantic import AliasChoices, Field
from metapatch.circuits.base import DroidCircuit


__droid_version__ = "{{ droid_version }}"

{% for circuit_name, params in circuits.items() %}

class {{ circuit_name|capitalize }}(DroidCircuit):
    """{{params.title}}

    Args:
    {% for param in params.get_io() %}
        {{ param.name }} ({{ param.type }}):
{{ param.synopsis }}
{% endfor %}
        comment: Add a comment in the droid ini file.
    """

    _ramsize: int = {{params.ramsize}}

    {% for param in params.get_io() %}
    {{ param.parameter }}: str | None = Field(
        default=None,
        serialization_alias="{{ param.name }}",
        json_schema_extra={"essential": {{ param.essential }}, "type": "{{ param.type }}", "shortname": "{{ param.short }}"},
    )
    {% endfor %}

{% endfor %}
