<div class="intro-oldStager-wrapper">
  <new-comers modal-instance="$ctrl.modalInstance" intro="'question'" on-close-btn="$ctrl.onCloseBtn()">
    <new-comers-body ng-if="!$ctrl.isSubmited">
      <div class="flex-wrap row-flex body-title">
        <span>请您回答以下问题，我们可以帮您推荐适合您使用的优惠券活动渠道。</span>
      </div>
      <div ng-repeat="q in $ctrl.questions track by $index">
        <div ng-if="q.isShow">
          <div class="flex-wrap row-flex question">
            <span>Q{{ $index + 1 }}</span>
            <span>{{ q.question }}</span>
          </div>
          <div class="flex-wrap row-flex option">
            <i class="fas fa-check-circle" ng-click="$ctrl.onSelectOption(q, q.options[0], $index)" ng-class="{ 'active':  q.options[0].active }"></i>
            <span>{{ q.options[0].value }}</span>
          </div>
          <div class="flex-wrap row-flex option">
            <i class="fas fa-check-circle" ng-click="$ctrl.onSelectOption(q, q.options[1], $index)" ng-class="{ 'active':  q.options[1].active }"></i>
            <span>{{ q.options[1].value }}</span>
          </div>
        </div>
      </div>
    </new-comers-body>
    <new-comers-body ng-if="$ctrl.isSubmited">
      <div class="flex-wrap row-flex body-title">
        <span>根据您的回答，我们帮您筛选出了以下适合您使用的营销渠道~</span>
      </div>
      <div class="flex-wrap row-flex body-content-row">
        <ng-container ng-repeat="result in $ctrl.results track by $index">
          <div ng-if="result.isShow" ng-class="'class_' + $index" ng-click="$ctrl.showIntros(result.channel)">
            <span>{{ result.value }}</span>
          </div>
        </ng-container>
      </div>
    </new-comers-body>
    <new-comers-footer style="width: 100%;" ng-if="!$ctrl.isSubmited">
      <div class="flex-wrap row-flex footer-btn">
        <div ng-click="$ctrl.pre()" ng-if="$ctrl.isShowPre"><span>上一题</span></div>
        <div ng-click="$ctrl.next()" ng-if="!$ctrl.isShowSubmit" style="background-color: #46B9BC"><span style="color: white;">下一题</span></div>
        <div ng-click="$ctrl.submit()" ng-if="$ctrl.isShowSubmit"><span>提交答案</span></div>
      </div>
    </new-comers-footer>
    <new-comers-footer style="width: 100%;" ng-if="$ctrl.isSubmited">
      <div class="flex-wrap row-flex footer-btn">
        <div ng-click="$ctrl.reset()"><span>重置问题</span></div>
        <div ng-click="$ctrl.back()"><span>返回</span></div>
      </div>
    </new-comers-footer>
  </new-comers>
</div>