{% set is_oob = oob if oob is defined else False %}
{% set pending_state = must_have_state if must_have_state is defined else None %}
{% set pending_includes = pending_state.includes if pending_state and pending_state.includes is not none else [] %}
{% set pending_excludes = pending_state.excludes if pending_state and pending_state.excludes is not none else [] %}
{% set has_pending = (pending_includes|length > 0) or (pending_excludes|length > 0) %}
{% if summary and summary.include_exclude_summary %}
{% set ie_summary = summary.include_exclude_summary %}
{% set has_data = (ie_summary.include_cards|length > 0) or (ie_summary.exclude_cards|length > 0) or (ie_summary.include_added|length > 0) or (ie_summary.excluded_removed|length > 0) %}
{% if has_data %}
Include/Exclude Impact
{% if ie_summary.include_cards|length > 0 %}
✓ Must Include Cards ({{ ie_summary.include_cards|length }})
{% if ie_summary.include_added|length > 0 %}
✓ Successfully Included ({{ ie_summary.include_added|length }})
{% for card in ie_summary.include_added %}
{{ card }}
{% endfor %}
{% endif %}
{% if ie_summary.missing_includes|length > 0 %}
⚠ Could Not Include ({{ ie_summary.missing_includes|length }})
{% for card in ie_summary.missing_includes %}
{{ card }}
{% endfor %}
{% endif %}
{% if ie_summary.fuzzy_corrections %}
⚡ Fuzzy Matched
{% for original, corrected in ie_summary.fuzzy_corrections.items() %}
{{ original }} → {{ corrected }}
{% endfor %}
{% endif %}
{% endif %}
{% if ie_summary.exclude_cards|length > 0 %}
✗ Must Exclude Cards ({{ ie_summary.exclude_cards|length }})