<div class="scenario-widget scenario-returns">
  <div class="scenario-widget__header">
    <span class="scenario-widget__location">{{ scenario.location }}, {{ scenario.country }}</span>
    <span class="scenario-widget__config">{{ t.scenario_returns_config_title }}</span>
  </div>
  <div class="scenario-widget__body">
    <h4 class="scenario-widget__section-title">{{ t.scenario_return_metrics_title }}</h4>
    <div class="scenario-widget__metrics">
      <div class="scenario-widget__metric">
        <span class="scenario-widget__metric-label">IRR ({{ s.holdYears }}yr)</span>
        <span class="scenario-widget__metric-value">{{ "{:.1f}".format(d.irr * 100) }}%</span>
      </div>
      <div class="scenario-widget__metric">
        <span class="scenario-widget__metric-label">MOIC</span>
        <span class="scenario-widget__metric-value">{{ "{:.2f}".format(d.moic) }}x</span>
      </div>
      <div class="scenario-widget__metric">
        <span class="scenario-widget__metric-label">{{ t.scenario_payback_label }}</span>
        <span class="scenario-widget__metric-value">{% if d.paybackIdx >= 0 %}{{ d.paybackIdx + 1 }} {{ t.scenario_months_unit }}{% else %}N/A{% endif %}</span>
      </div>
    </div>
    <div class="scenario-widget__metrics">
      <div class="scenario-widget__metric">
        <span class="scenario-widget__metric-label">Cash-on-Cash</span>
        <span class="scenario-widget__metric-value">{{ "{:.1f}".format(d.cashOnCash * 100) }}%</span>
      </div>
      <div class="scenario-widget__metric">
        <span class="scenario-widget__metric-label">{{ t.scenario_yield_on_cost_label }}</span>
        <span class="scenario-widget__metric-value">{{ "{:.1f}".format(d.yieldOnCost * 100) }}%</span>
      </div>
      <div class="scenario-widget__metric">
        <span class="scenario-widget__metric-label">{{ t.scenario_ebitda_margin_label }}</span>
        <span class="scenario-widget__metric-value">{{ "{:.0f}".format(d.ebitdaMargin * 100) }}%</span>
      </div>
    </div>

    <h4 class="scenario-widget__section-title">{{ t.scenario_exit_analysis_title }}</h4>
    <div class="scenario-widget__metrics">
      <div class="scenario-widget__metric">
        <span class="scenario-widget__metric-label">{{ t.scenario_exit_value_label | tformat(multiple=s.exitMultiple) }}</span>
        <span class="scenario-widget__metric-value">&euro;{{ "{:,.0f}".format(d.exitValue) }}</span>
      </div>
      <div class="scenario-widget__metric">
        <span class="scenario-widget__metric-label">{{ t.scenario_remaining_loan_label }}</span>
        <span class="scenario-widget__metric-value">&euro;{{ "{:,.0f}".format(d.remainingLoan) }}</span>
      </div>
      <div class="scenario-widget__metric">
        <span class="scenario-widget__metric-label">{{ t.scenario_net_exit_label }}</span>
        <span class="scenario-widget__metric-value">&euro;{{ "{:,.0f}".format(d.netExit) }}</span>
      </div>
    </div>

    <h4 class="scenario-widget__section-title">{{ t.scenario_financing_title }}</h4>
    <div class="scenario-widget__metrics">
      <div class="scenario-widget__metric">
        <span class="scenario-widget__metric-label">{{ t.scenario_loan_amount_label }}</span>
        <span class="scenario-widget__metric-value">&euro;{{ "{:,.0f}".format(d.loanAmount) }}</span>
      </div>
      <div class="scenario-widget__metric">
        <span class="scenario-widget__metric-label">{{ t.scenario_rate_term_label }}</span>
        <span class="scenario-widget__metric-value">{{ s.interestRate }}% / {{ s.loanTerm }}yr</span>
      </div>
      <div class="scenario-widget__metric">
        <span class="scenario-widget__metric-label">{{ t.scenario_monthly_payment_label }}</span>
        <span class="scenario-widget__metric-value">&euro;{{ "{:,.0f}".format(d.monthlyPayment) }}</span>
      </div>
    </div>
  </div>
  <div class="scenario-widget__cta">
    <a href="{{ url_for('planner.index') }}">{{ t.scenario_cta_try_numbers }}</a>
  </div>
</div>
