{{#common/tab-container class="clearfix"}}
  {{#common/tab-item}}
    <a href="#" {{action 'selectRevenue'}} class="{{if isRevenueSelected 'active'}}" role="tab">
      {{i18n 'Revenue'}}
    </a>
  {{/common/tab-item}}
  {{#common/tab-item}}
    <a href="#" {{action 'selectSubscriptions'}} class="{{if (not isRevenueSelected) 'active'}}">
      {{t 'general.Twitch.subscriptions'}}
    </a>
  {{/common/tab-item}}
{{/common/tab-container}}

<div class="dataWrap dataWrap--graph clearfix pd-t-3">
  {{#if isRevenueSelected}}
    {{#if isRevLoading}}
      <div class="flex flex--verticalCenter flex--fullHeight flex--horizontalCenter">
        <div class="flex__item loading-spinner"></div>
      </div>
    {{else}}
      {{ember-chart
        type='bar'
        data=revenueData
        options=revenueChartOptions
        height=270
      }}
    {{/if}}
  {{else}}
    {{#if isSubLoading}}
      <div class="flex flex--verticalCenter flex--fullHeight flex--horizontalCenter">
        <div class="flex__item loading-spinner"></div>
      </div>
    {{else}}
      {{ember-chart
        type='line'
        data=subscriptionsData
        options=subscriptionsChartOptions
        height=270
      }}
    {{/if}}
  {{/if}}
</div>

{{dashboards/revenue/export-data
  revenueData=revenueData
  subscriptionsData=subscriptionsData
  isDisabled=(or isRevLoading isSubLoading)}}
