{%- if error_domain %}
abstract class {{ name }} extends GLib.Error {
    static readonly $gtype: GObject.GType<{{ name }}>

    {%- for member in members %}
    {{ member.jsdoc|indent(4) if member.jsdoc }}
    static readonly "{{ member.name }}": {{ member.value }}
    {%- endfor %}
}

{%- else %}
namespace {{ name }} {
    const $gtype: GObject.GType<{{ name }}>
}

{{ jsdoc if jsdoc }}
enum {{ name }} {
    {%- for member in members %}
    {{ member.jsdoc|indent(4) }}
    "{{ member.name }}" = {{ member.value }},
    {%- endfor %}
}
{%- endif %}

{%- for fn in functions %}
{{ fn }}
{%- endfor %}
