{#
/**
 * @file
 * Default theme implementation to display a Apigee Rate Plan entity rendered
 * in Full view mode.
 *
 * This template uses Apigee Edge's default entity template, which can be found
 * at apigee_edge/templates/apigee-entity.html.twig.
 *
 * Additional variables:
 *
 * @ingroup themeable
 */
#}

{% extends 'apigee-entity.html.twig' %}
{% block content %}

  {{ attach_library('apigee_kickstart/monetization') }}

  <div class="container py-5">

    <div class="row">
      <div class="col-lg-6">
        <div class="bg-lighter p-4 rounded-lg">
          {{ content|without(
            'setupFees',
            'recurringFees',
            'consumptionFee',
            'consumptionPricingType',
            'feeFrequency',
            'paymentFundingModel',
            'purchase'
            ) }}
        </div>
      </div>
    </div>

    <div class="row">
      <div class="col-lg-6">

        <div class="rate-plan__card rate-plan__card--fees bg-lighter p-4 my-5 rounded-lg">
          <h2>{{ 'Fees'|t }}</h2>
          {{ content.setupFees }}
          {{ content.recurringFees }}
          {% if content.recurringFees|render|striptags|trim is not empty %}
            {{ content.feeFrequency }}
          {% endif %}
          {{ content.paymentFundingModel }}
        </div>

        <div class="rate-plan__card rate-plan__card--fees bg-lighter p-4 my-5 rounded-lg">
          <h2>{{ 'Consumption Fees'|t }}</h2>
          {{ content.consumptionFee }}
          {{ content.consumptionPricingType }}
        </div>

        {% if content.purchase %}
          <div class="rate-plan__card rate-plan__card--purchase bg-lighter p-4 mt-4 rounded-lg" id="purchase">
            <h2>{{ 'Purchase'|t }} {{ label }}</h2>
            {{ content.purchase }}
          </div>
        {% endif %}
      </div>
    </div>

  </div>

{% endblock %}
