<wxs module="m1">
  var LotteryAttendIconMap = {
    lotteryBox: '../assets/lottery_attend_box.svg',
    slotMachine: '../assets/lottery_attend_machine.svg',
  };
  var getImage = function(AwardThemeUrl, IsUseDarkTheme) {
    return LotteryAttendIconMap[AwardThemeUrl] ||
    (IsUseDarkTheme ? '../assets/lottery_attend_dark.svg' : '../assets/lottery_attend_default.svg');
  }
  module.exports.getImage = getImage;
</wxs>
<!-- 多个奖品展示 -->
<view wx:if="{{data.displayAwardItemConfigs && data.displayAwardItemConfigs.length > 1}}" class="lottery-detail-award-wrap{{(data.hasCondition || type === 'result') ? ' lottery-detail-award-wrap-small' : ''}}{{IsUseDarkTheme ? ' lottery-detail-award-wrap-dark' : ''}}{{data.AwardThemeUrl === 'lotteryBox' ? ' lottery-detail-award-wrap-box' : ''}}{{data.AwardThemeUrl === 'slotMachine' ? ' lottery-detail-award-wrap-machine' : ''}}">
  <swiper class="lottery-detail-swiper" autoplay="false" circular="true" indicator-dots="true">
    <swiper-item wx:for="{{data.displayAwardItemConfigs}}" wx:key="{{item.AwardId}}">
      <view class="lottery-detail-award-item">
        <image class="lottery-detail-image" src="{{item.AwardItemIcon || 'https://lf-cdn-tos.bytescm.com/obj/static/livesaas-console/static/media/icon-default-award.5c5cef22.svg'}}" />
        <view class="lottery-detail-award-wrap-text">
          <view class="lottery-detail-text">奖品：{{item.AwardItemName}}</view>
          <view wx:if="{{!data.IsHideAwardNum}}" class="lottery-detail-text-num">
            奖品数量：{{item.AwardItemCount}}份
          </view>
        </view>
      </view>
    </swiper-item>
  </swiper>
  <image class="lottery-detail-attend" wx:if="{{status === 1}}" src="{{m1.getImage(data.AwardThemeUrl, IsUseDarkTheme)}}" />
</view>
<!-- 单个奖品展示 -->
<view wx:else class="lottery-detail-award-wrap{{(data.hasCondition || type === 'result') ? ' lottery-detail-award-wrap-small' : ''}}{{IsUseDarkTheme ? ' lottery-detail-award-wrap-dark' : ''}}{{data.AwardThemeUrl === 'lotteryBox' ? ' lottery-detail-award-wrap-box' : ''}}{{data.AwardThemeUrl === 'slotMachine' ? ' lottery-detail-award-wrap-machine' : ''}}">
  <image class="lottery-detail-image" src="{{data.displayAwardItemConfig.AwardItemIcon || 'https://lf-cdn-tos.bytescm.com/obj/static/livesaas-console/static/media/icon-default-award.5c5cef22.svg'}}" />
  <view class="lottery-detail-award-wrap-text">
    <view class="lottery-detail-text">
      奖品：{{data.displayAwardItemConfig.AwardItemName}}
    </view>
    <view wx:if="{{!data.IsHideAwardNum}}" class="lottery-detail-text-num">
      奖品数量：{{data.displayAwardItemConfig.AwardItemCount}}份
    </view>
  </view>
  <image class="lottery-detail-attend" wx:if="{{status === 1}}" src="{{m1.getImage(data.AwardThemeUrl, IsUseDarkTheme)}}" />
</view>
