{%- macro extend_list(extends, suffix) -%}
{%- if extends|length > 0 -%}
extends {% for e in extends %}{{ e }}{{ suffix }}{% if not loop.last %}, {% endif %}{%- endfor %}
{%- endif %}
{%- endmacro -%}
{%- set readable = properties|selectattr("readable") %}
{%- set writable = properties|rejectattr("construct_only")|selectattr("writable") %}
{%- set construct_only = properties|rejectattr("readonly")|selectattr("construct_only") -%}


    interface SignalSignatures {{ extend_list(extends, ".SignalSignatures")}} {
        {%- for signal in signals %}
        {{ signal|indent(8) }}
        {%- endfor %}
    }

    interface ReadableProperties {{ extend_list(extends, ".ReadableProperties")}} {
        {%- for prop in readable %}
        "{{ prop.name }}": {{ prop.type }}
        {%- endfor %}
    }

    interface WritableProperties {{ extend_list(extends, ".WritableProperties")}} {
        {%- for prop in writable %}
        "{{ prop.name }}": {{ prop.type }}
        {%- endfor %}
    }

    interface ConstructOnlyProperties {{ extend_list(extends, ".ConstructOnlyProperties")}} {
        {%- for prop in construct_only %}
        "{{ prop.name }}": {{ prop.type }}
        {%- endfor %}
    }
