{% for decorator in decorators -%}
{{ decorator }}
{% endfor -%}
{%- set args = [] %}
{%- for k, v in (dataclass_arguments or {}).items() %}
    {%- if v is not none and v is not false %}
        {%- set _ = args.append(k ~ '=' ~ (v|pprint)) %}
    {%- endif %}
{%- endfor %}
{%- if config %}
{%- set config_items = [] %}
{%- for k, v in config.items() %}
    {%- set _ = config_items.append(k ~ '=' ~ v) %}
{%- endfor %}
    {%- set _ = args.append('config=ConfigDict(' ~ config_items | join(', ') ~ ')') %}
{%- endif %}
{%- if args %}
@dataclass({{ args | join(', ') }})
{%- else %}
@dataclass
{%- endif %}
{%- if base_class %}
class {{ class_name }}({{ base_class }}):
{%- else %}
class {{ class_name }}:
{%- endif %}
{%- if description %}
    """
    {{ description | escape_docstring | indent(4) }}
    """
{%- endif %}
{%- if not fields and not description %}
    pass
{%- endif %}
{%- for field in fields -%}
    {%- if not field.annotated and field.field %}
    {{ field.name }}: {{ field.type_hint }} = {{ field.field }}
    {%- else %}
    {%- if field.annotated %}
    {{ field.name }}: {{ field.annotated }}
    {%- else %}
    {{ field.name }}: {{ field.type_hint }}
    {%- endif %}
    {%- if not field.has_default_factory_in_field and not field.required and (field.represented_default != 'None' or not field.strip_default_none or field.data_type.is_optional)
            %} = {{ field.represented_default }}
    {%- endif -%}
    {%- endif %}
    {%- if field.docstring %}
    """
    {{ field.docstring | escape_docstring | indent(4) }}
    """
{%- if field.use_inline_field_description and not loop.last %}

{% endif %}
    {%- elif field.inline_field_docstring %}
    {{ field.inline_field_docstring }}
{%- if not loop.last %}

{% endif %}
    {%- endif %}
{%- endfor -%}
