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

<view class="container FlexColumn" style='min-height:{{Containnerheight}}rpx;background-color:{{Color.BackColor}}'>
  <!-- 顶端工具栏 -->
  <block wx:if="{{ShowType=='show' &&  Flag!=-1}}">
    <view class="panelTop FlexRow">
      <view class='left FlexRow'>
        <view class="panelTopBtn FlexRow" catchtap='editField' data-type="{{PrintID}}">
          编辑
        </view>
        <view class="panelTopBtn">
        </view>
      </view>
      <block wx:if="{{!PrintID}}">
        <view class="FlexRow" wx:if="{{IsCardInfoCloseMenu}}" catchtap="openIsCardInfoCloseMenu" >
        <view>快捷操作</view>
        <image class="universalpic_arrow_up_black_14x10" src='../images/universalpic_arrow_down_black_14x10.png' wx:if="{{true}}" />
      </view>
      <view class="FlexRow" wx:if="{{!IsCardInfoCloseMenu}}" catchtap="closeIsCardInfoCloseMenu">
        <view>信息收起</view>
        <image class="universalpic_arrow_up_black_14x10" src='../images/universalpic_arrow_up_black_14x10.png' wx:if="{{true}}" />
      </view>
      </block>
      
      
      <view class='right FlexRow'>
       <view class="panelTopBtn FlexRow" catchtap='gotoCollect'>
          <image class="universalpic_star_black_34x34" src='../images/universalpic_star_black_34x34.png' wx:if="{{!IsCollect}}" />
          <image class="universalpic_star_black_34x34" src='../images/universalpic_star_yellow_34x34.png' wx:if="{{IsCollect}}" />
        </view>
        <view wx:if="{{!PrintID}}" class="panelTopBtn2 panelTopBtn FlexRow" catchtap='btnMore'>
          <image class="universalpic_omit_black_36x10" src='../images/universalpic_omit_black_36x10.png' />
        </view>
      </view>
    </view>
    <view class="panelTop1" style='background-color:{{Color.BackColor}};'></view>
  </block>
  <block wx:if="{{!IsCardInfoCloseMenu && !PrintID && ShowType!='share'}}">
    <view class="panelTop2 FlexColumn">
      <view class="panelTop2Item FlexRow" catchtap='editField' data-type="cardtype">
        <view class="left FlexRow">
          <image class="universalpic_diagram_black_30x28" src='../images/universalpic_diagram_black_30x28.png' />
          <view class="panelTop2Item1"><block wx:if="{{CardType==1}}">紧急练习</block><block wx:if="{{CardType==0}}">日常练习</block><block wx:if="{{CardType==-1}}">归档</block></view>
        </view>
        <image class="Arrow" src='../images/universalpic_indicator_right_gray.png' />
      </view>
      <block wx:if="{{FolderName}}">
      <view class="lineWidthAll FlexRow">
        <view class="lineWidth660"></view>
      </view>
      <view class="panelTop2Item FlexRow" catchtap='editField' data-type="folder">
        <view class="left FlexRow">
          <image class="universalpic_diagram_black_30x28" src='../images/universalpic_cardlist_black_30x28.png' />
          <view class="panelTop2Item1">{{FolderName}}</view>
        </view>
        <image class="Arrow" src='../images/universalpic_indicator_right_gray.png' />
      </view>
      </block>
      <block wx:if="{{CardType!=-1}}">
        <view class="lineWidthAll FlexRow">
          <view class="lineWidth660"></view>
        </view>
        <view class="panelTop2Item FlexRow" catchtap='editField' data-type="limittime">
          <view class="left FlexRow">
            <image class="universalpic_calendar_black_30x32" src='../images/universalpic_calendar_black_30x32.png' />
            <view class="panelTop2Item1">{{LimitTimeStr}}</view>
          </view>
          <image class="Arrow" src='../images/universalpic_indicator_right_gray.png' />
        </view>
      </block>
      
      <view class="lineWidthAll FlexRow">
        <view class="lineWidth720"></view>
      </view>
      <view class="panelTop2Item FlexRow" catchtap="goto" data-url="./cardInfo?id={{MiaoguoCardID}}">
        <view class="panelTop2Item1">题卡详细信息</view>
        <image class="Arrow" src='../images/universalpic_indicator_right_gray.png' />
      </view>
    </view>
  </block>
  <view style="width:100%;min-height:{{Containnerheight-250}}rpx;" bindtap="onShowAnswer">
  <template is="CardShow" data="{{Color:Color,Field:Field,Tags:Tags,IsShowAnswer:IsShowAnswer,TagWidth:TagWidth,FontSize:FontSize,ShowType:ShowType,TextSpace:TextSpace}}" />
  </view>
  <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' wx:if="{{!PrintID}}">分享给大家</button>
      <view class='btn21' wx:if="{{PrintID}}">{{CurrentIndex}}</view>
      <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>
</view>

<!-- 菜单 -->
<view wx:if="{{IsShowMenu}}" class="panelMenu container FlexColumn" style='height:{{Containnerheight}}rpx; top:{{topBarHeight}}rpx;'>
	
	<view class="panelMenu12 panelMenu1" wx:if="{{!IsClickShowAnswer}}" catchtap="setClickShowAnswer">点击卡面显示段落2、3</view>
	<view class="panelMenu12 panelMenu1" wx:if="{{IsClickShowAnswer}}" catchtap="setAlwaysShowAnswer">同时显示段落1、2、3</view>
	<view class="panelMenu11 panelMenu1" catchtap="deleteCard">删除题卡</view>
	<view class="panelMenu10 panelMenu1" catchtap='closeMenu'>取消</view>
	<view class="iphone10plusMenu" wx:if="{{IsIPhoneX}}"></view>
</view>


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