{% macro project_details_report(validation_results, project_title, validation_date, submission_dir, consent_statement_required, vcf_fasta_analysis_mapping) -%}

{% if project_title %}
	Project Title: {{ project_title }}
{% else %}
	Project Title: Not Found
{% endif %}
	Validation Date: {{ validation_date }}
	Submission Directory: {{ submission_dir }}
{% if consent_statement_required %}
    Note for human genotype data:
        You will need to provide a signed copy of our Consent Statement (https://docs.google.com/document/d/1UaRmimAe919IZYIH55mDXMe-4sHsRVqaP4moqx2IYE4) via email to eva-helpdesk@ebi.ac.uk after submission.
        Your submission will only be processed after receiving the consent statement.For more info, please see our help section (https://www.ebi.ac.uk/eva/?Help#submissionPanel&link=consent-statement-for-human-genotype-data).
{% endif %}

{% if vcf_fasta_analysis_mapping %}
	Files mapping:
	{% for mapping in vcf_fasta_analysis_mapping %}
		---
		VCF File: {{ mapping.vcf_file }}
		Fasta File: {{ mapping.fasta_file }}
		Analysis: {{ mapping.analysis }}
	{% endfor %}
{% endif %}

{% set evidence_type_check_results = validation_results.get('evidence_type_check', {}) %}
{% set evidence_check_type_pass = evidence_type_check_results.get('pass', true) %}
{% if not evidence_check_type_pass %}
    Evidence Type Check Failures:
    {% for alias, alias_result in evidence_type_check_results.items() if alias != 'pass' %}
        {% if alias_result.evidence_type is none and alias_result.errors %}
            {{ alias }}: {{ alias_result.errors }}
        {% endif %}
    {% endfor %}
{% endif %}

{%- endmacro %}