{% set processing = data.topic_processing %}

{{ t.topic_processing_heading }}

{% if processing %}{% endif %}
{% if errors.get('topic_processing') %} {{ read_error(errors.topic_processing, t.topic_processing_error) }} {% elif processing %}

{{ t['topic_processing_' ~ processing.state] }}

{{ t.topic_processing_cursor }}: {{ processing.source_cursor }} ยท {{ t.topic_processing_head }}: {{ processing.source_head }}

{{ t.topic_processing_execution_unknown }} {{ t.topic_processing_publication_notice }}

{% else %}

{{ t.topic_processing_unavailable }}

{% endif %}
{% if processing %}

{{ t.topic_processing_heading }}

{{ t.topic_processing_origin }}

{{ t.scope_label }}
{{ scope }}
{{ t.topic_processing_read_at }}
{{ t.topic_processing_cursor }}
{{ processing.source_cursor }}
{{ t.topic_processing_head }}
{{ processing.source_head }}
{{ t.topic_processing_target }}
{{ processing.target_source_through if processing.target_source_through is not none else t.topic_processing_no_target }}

{{ t.topic_processing_execution_unknown }}

{{ t.topic_processing_budget }}

{% if processing.budget %}{% set budget = processing.budget %}
{{ t.topic_processing_after }}
{{ budget.source_after }}
{{ t.topic_processing_attempt_through }}
{{ budget.attempt_source_through if budget.attempt_source_through is not none else t.topic_processing_unknown }}
{{ t.topic_processing_budget_through }}
{{ budget.source_through }}
{{ t.topic_processing_attempts }}
{{ budget.attempts }}
{{ t.topic_processing_requests }}
{{ budget.requests }}
{{ t.topic_processing_tokens }}
{{ budget.tokens }}
{% else %}

{{ t.topic_processing_no_budget }}

{% endif %}

{{ t.topic_processing_budget_notice }}

{{ t.topic_processing_block }}

{% if processing.block %}{% set block = processing.block %}
{{ t.topic_processing_reason }}
{{ block.error_code }}
{{ t.topic_processing_last_error }}
{{ block.last_error_code or t.topic_processing_unknown }}
{{ t.topic_processing_observed_at }}
{{ t.topic_processing_after }}
{{ block.source_after }}
{{ t.topic_processing_attempt_through }}
{{ block.source_through if block.source_through is not none else t.topic_processing_unknown }}
{{ t.topic_processing_budget_through }}
{{ block.budget_source_through if block.budget_source_through is not none else t.topic_processing_unknown }}
{{ t.topic_processing_block_target }}
{{ block.target_source_through }}
{{ t.topic_processing_attempts }}
{{ block.attempts }}
{{ t.topic_processing_requests }}
{{ block.requests }}
{{ t.topic_processing_tokens }}
{{ block.tokens }}
{% else %}

{{ t.topic_processing_no_block }}

{% endif %}
{% endif %}