<dialog
  visible="{{true}}"
  zIndex="{{11001}}"
  maskClosable="{{true}}"
  bind:close="onClose"
  containerStyle="background: transparent; overflow: visible; width: auto; max-width: none;"
>
  <view class="luckymoney-modal-container">
    <view class="luckymoney-close-btn" bindtap="onClose">
      <mp-icon icon="close" color="#fff" size="{{15}}"></mp-icon>
    </view>
    <view class="luckymoney-content">
       <view class="content-top {{useBigStyle ? 'big' : ''}}">
          <view class="top-title">{{isPoint ? '主办方正在发送积分红包' : '主办方正在发送现金红包'}}</view>
          
          <view class="top-amount {{unitBlock ? 'unit-block' : ''}}">
             <block wx:if="{{current.Name}}">
                <view class="name-wrap"><text class="name">{{current.Name}}</text></view>
             </block>
             <block wx:elif="{{current.HasNoLimit}}">
                <view class="name-wrap"><text class="name">{{isPoint ? '积分红包' : '现金红包'}}</text></view>
             </block>
             <block wx:else>
                <text class="value">{{currentAmount}}</text>
                <view class="unit {{unitBlock ? 'block' : ''}}">{{currentUnit}}</view>
             </block>
          </view>

          <block wx:if="{{isManual}}">
             <view class="btn-manual {{unitBlock ? 'unit-block' : ''}}">等待开启</view>
          </block>
          <block wx:else>
             <view class="btn-countdown {{unitBlock ? 'unit-block' : ''}}">
                <view>即将开启</view>
                <view class="count">{{countDownStr}}</view>
             </view>
          </block>
       </view>

       <view wx:if="{{hasConditions}}" class="condition-box">
          <view class="condition-title">
             <text class="part1">做任务</text>
             <text>参与领红包</text>
             <block wx:if="{{conditionDisplayFlag && attendStr.length === 3}}">
                <view class="pro">
                   <text>{{attendStr[0]}}</text>
                   <text class="pro-cen">{{attendStr[1]}}</text>
                   <text>{{attendStr[2]}}</text>
                </view>
             </block>
          </view>
          <view class="condition-wrap">
             <block wx:for="{{conditionList}}" wx:key="key">
                 <view class="condition-item {{item.completed ? 'completed' : ''}}">
                     <image
                        class="icon-dot {{item.completed ? 'icon-completed' : ''}}"
                        src="{{item.completed ? iconCompleted : iconDot}}"
                     />

                    <view class="text-two">
                       <view class="contain">{{item.tip}}</view>
                       <block wx:if="{{item.key === 'BarragePwd' && !item.completed}}">
                          <view class="tip">({{conditionList.length === 1 ? '点击参与按钮自动发送' : '完成上方任务后自动发送'}})</view>
                       </block>
                    </view>
                    <view class="status" wx:if="{{conditionDisplayFlag}}">{{item.completed ? '已完成' : '待完成'}}</view>
                 </view>
             </block>
          </view>
       </view>

       <view class="attend-button-wrap">
          <view class="attend-button {{isAttended ? 'attended' : 'unattended'}} {{useBigStyle ? 'big' : ''}} {{hasConditions && isAttended ? 'attended-bottom' : ''}}" bindtap="onAttend">
             {{attendBtnText}}
          </view>
       </view>
    </view>
  </view>
</dialog>
