<import src="../template/cardShow.wxml" />

<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;background-color:{{Color.BackColor}}'>
  <!-- 顶端工具栏 -->
  <block wx:if="{{ShowType=='show'}}">
    <view class="panelTop FlexRow">
      <view class='left FlexRow' bindtap='showMenu' data-limittime="{{LimitTime}}">
        <image class="universalpic_plan_6dots_black_30x32" src='../images/universalpic_plan_6dots_black_30x32.png' />
        <view class="text3" wx:if="{{CardType==0}}">日常</view>
        <view class="text3" wx:if="{{CardType==1}}">紧急</view>
        <view class="text3" wx:if="{{CardType==-1}}">留白</view>
        <view class="text4" wx:if="{{CardType>=0}}">{{LimitTimeStr}}</view>
        
      </view>
      <view class='right FlexRow'>
        <view class="panelTopBtn FlexRow" bindtap='editField' data-id="0">
          编辑
        </view>
        <view class="panelTopBtn FlexRow" bindtap='deleteCard'>
          删除
        </view>
        <view class="panelTopBtn FlexRow" bindtap='gotoCollect'>
          <image class="universalpic_fav_default_black_26x24" src='../images/universalpic_fav_default_black_26x24.png' wx:if="{{!IsCollect}}" />
          <image class="universalpic_fav_default_black_26x24" src='../images/universalpic_fav_enable_blue_26x24.png' wx:if="{{IsCollect}}" />
        </view>
        <view class="panelTopBtn2 panelTopBtn FlexRow" bindtap='btnMore'>
          <image class="universalpic_more_black_32x8" src='../images/universalpic_more_black_32x8.png' />
        </view>
      </view>
    </view>
    <view class="panelTop1" style='background-color:{{Color.BackColor}};'></view>
  </block>

  <!-- 幻灯片播放 -->
  <block wx:if="{{ShowType=='play'}}">
    <view class="panelTop FlexRow" style='background-color:{{Color.BackColor}};border-bottom:0;'>
      <view class='left' catchtap='gotoCollect'>
        <view class='panelCancel0 FlexRow'>
          <image hidden='{{IsCollect}}' src="../images/universalpic_fav_default_gray_26x24.png" class='universalpic_fav_default_gray_26x24' />
          <image hidden='{{!IsCollect}}' src="../images/universalpic_fav_enable_tc0{{Color.ID}}_26x24.png" class='universalpic_fav_default_gray_26x24' />
        </view>
      </view>
      <view class='right FlexRow'>
        <view class="FlexColumn">
          <view class='panelNumber1'>{{CurrentIndex+1}}</view>
          <view class='panelNumber2Line' style='background-color:{{Color.LineColor}};'></view>
        </view>
        <view class="FlexColumn">
          <view class='panelNumber2 panelNumber1'>{{PlayListCount}}</view>
        </view>
      </view>
    </view>
    <view class="panelTop1" style='background-color:{{Color.BackColor}};'></view>
  </block>

  <template is="CardShow" data="{{Color:Color,Field:Field,Tags:Tags,IsShowAnswer:IsShowAnswer,TagWidth:TagWidth,FontSize:FontSize,ShowType:ShowType}}" />

  <view style='height:150rpx'></view>

  <view class='footer FlexColumn' style='background-color:{{Color.BackColor}}'>
    <view class="panelFooter FlexRow" wx:if="{{ShowType=='preview'}}" catchtap="close">
      退出预览
    </view>

    <view class="panelFooter FlexRow" wx:if="{{ShowType=='show'}}">
      <view class='btn1' wx:if="{{PrevID==0}}"></view>
      <view class='btn1 FlexRow' catchtap="previewNext" data-id="{{PrevID}}" wx:if="{{PrevID>0}}">
        <image class="universalpic_next_gray_30x30" src='../images/universalpic_prev_gray_30x30.png' />
      </view>
      <button class="btn21" open-type='share'>分享给大家</button>
      <view class='btn1 FlexRow' catchtap="previewNext" data-id="{{NextID}}" wx:if="{{NextID>0}}">
        <image class="universalpic_next_gray_30x30" src='../images/universalpic_next_gray_30x30.png' />
      </view>
      <view class='btn1' wx:if="{{NextID==0}}"></view>
    </view>

    <view class="panelFooter FlexRow" wx:if="{{ShowType=='share'}}">
      <view class='btn1 FlexRow' catchtap="returnDefault">
        <image class="universalpic_home_gray_36x36" src='../images/universalpic_home_gray_36x36.png' />
      </view>
      <view class='btn2 FlexRow'>
        <button class="btn23 btn21" catchtap="copyCard">另存为我的题卡</button>
      </view>

      <view class='btn1'></view>
    </view>

    <view class="panelFooter FlexRow" wx:if="{{ShowType=='play'}}">
      <view class='btn1' wx:if="{{PrevID==0}}"></view>
      <view class='btn1 FlexRow' catchtap="playNext" data-div="-1" wx:if="{{PrevID>0}}">
        <image class="universalpic_next_gray_30x30" src='../images/universalpic_prev_gray_30x30.png' />
      </view>
      <view class='btn3 FlexRow' catchtap='onPlayAgain'>
        稍后回放
      </view>
      <view class='btn4 FlexRow' catchtap='onShowAnswer'>
        看答案
      </view>
      <view class='btn1 FlexRow' catchtap="playNext" data-div="1" wx:if="{{NextID>0}}">
        <image class="universalpic_next_gray_30x30" src='../images/universalpic_next_gray_30x30.png' />
      </view>
      <view class='btn1' wx:if="{{NextID==0}}"></view>
    </view>
  </view>
</view>

<!-- 菜单 -->
<view wx:if="{{IsShowMenu}}" class="numberContainer FlexColumn" style='height:{{Containnerheight}}rpx;'>
  <view class="numberContainerFooter1 FlexColumn">
    <view class='lineFooter'></view>
    <view class='numberContainerFooter10 FlexRow' wx:if="{{IsShowAnswer[0]==1}}" catchtap='onHideAnswer'>
      <image class="universalpic_part_black_30x30" src='../images/universalpic_part_black_30x30.png' />
      <view class='numberContainerFooter11 FlexColumn'>隐藏段落2和3</view>
    </view>
    <view class='numberContainerFooter10 FlexRow'  wx:if="{{IsShowAnswer[0]==0}}" catchtap='onShowAnswer'>
      <image class="universalpic_part_black_30x30" src='../images/universalpic_part_black_30x30.png' />
      <view class='numberContainerFooter11 FlexColumn'>显示段落2和3</view>
    </view>
    <view class='lineFooter'></view>
    <view class='numberContainerFooter10 FlexRow' bindtap='getDetailInfo'>
      <image class="universalpic_part_black_30x30" src='../images/universalpic_info_black_30x30.png' />
      <view class='numberContainerFooter11 FlexColumn'>题卡信息</view>
    </view>
  </view>
  <view class='lineFooter'></view>
  <view class="numberContaineFooter FlexRow" catchtap='closeMenu'>
    <view>关闭</view>
  </view>
</view>


<audio hidden='true' src="{{AudioSrc}}" id="myAudio" bindended="audioBindEnded" binderror="audioBindError"></audio>