<!--module/chats/components/guide-analysis/guide-analysis.wxml-->
<t-popup visible="{{visible}}" t-class="wrapper" usingCustomNavbar bind:visible-change="onVisibleChange" placement="bottom">
  <view class="guide-analysis" style="{{containerStyle}}">
    <view class="header-container">
      <view class="btn btn--cancel" aria-role="button" bind:tap="onCancel">取消</view>
      <view class="title">舌面象上传</view>
      <view class="btn btn--confirm" aria-role="button" bind:tap="onSubmit">提交</view>
    </view>
    <scroll-view class="content-container page-scroll__container" type="list" scroll-y>
      <t-cell title="拍摄注意事项" required bordered="{{false}}">
        <view slot="description">
          <view style="margin: 8px 0px 8px 0px;color:black;">光线：</view>
          <view>白天充足、柔和的自然光线下效果最佳，避免背光、偏暗、曝光。</view>
          <view style="margin: 8px 0px 8px 0px;color:black;">禁忌：</view>
          <view>不要在食用有色饮食或药物后、有色光源下、早晨起床时、饭后半小时内拍摄舌象。</view>
          <view>不要带妆拍摄面部图片。</view>
        </view>
      </t-cell>
      <view class="upload-card" wx:for="{{uploadList}}" wx:key="{{item.target}}" mark:index="{{index}}" mark:target="{{item.target}}" bind:tap="handle">
        <view class="upload-card__header">
          <text>{{item.label}}上传</text>
          <text wx:if="{{item.required}}" style="color: #D54941;">（必传）</text>
        </view>
        <view class="upload-card__content">
          <view class="row">
            <image class="col example" mark:handle="preview" src="{{item.src}}" mode="aspectFit" />
            <image wx:if="{{thumbnail[index]}}" class="col picture" mark:handle="preview:thumbnail" src="{{thumbnail[index]}}" mode="aspectFit"></image>
            <!-- <image wx:elif="{{original[index]}}" class="col picture" mark:handle="preview:original" src="{{original[index]}}" mode="aspectFit"></image> -->
            <image wx:else class="col picture" mark:handle="upload" src="../../assets/upload-picture.bg.png" mode="aspectFit" />
          </view>
          <view class="row">
            <view class="col">示例</view>
            <view class="col">
              <text>（上传）</text>
              <block wx:if="{{thumbnail[index]}}">
                <t-icon wx:if="{{original[index]}}" style="color: #D54941;" name="delete-1" mark:handle="upload:delete" />
                <t-loading wx:else="" theme="spinner" size="40rpx" class="wrapper" />
              </block>
            </view>
          </view>
        </view>
      </view>


      <form bind:submit="onSubmit">
        <form-button block index="1" loading="{{submitting}}" disableOnClick="{{false}}">提交</form-button>
      </form>
    </scroll-view>
  </view>
</t-popup>