<import-sjs name="utils" from="./medicalInformation.sjs"/>
<wrapper className="medical-information-container">
  <block a:if="{{ isLogin }}">
    <block a:if="{{ items.length > 0}}">
      <view class="medical-information" a:for="{{ items }}">
        <view class="medical-information-left">
          <!-- 头部标题 -->
          <view class="outpatient-department-type">
            <text>{{ utils.getName(item) }}</text>
          </view>
          <!-- 提示主标题 -->
          <!-- 就诊提醒visit ｜ 排队提醒queue ，排队中queuing | 已过号expired-->
          <view
            class="outpatient-department-tip"
            a:if="{{ utils.isShowQueue(item) }}"
          >
            <text class="{{ utils.getQueueStatus(item) }}">
              {{ item.queueNum }}
            </text>
            <text>号 ｜ 前面排队</text>
            <text class="{{ utils.getQueueStatus(item) }}">
              {{ item.leftover }}
            </text>
            <text>位</text>
          </view>
          <!-- 其余 -->
          <view a:else class="outpatient-department-tip {{ utils.getQueueStatus(item) }}">
            {{ item.context }}
          </view>
          <!-- 描述 -->
          <!-- 预约提醒 -->
          <view class="outpatient-department-district">
            <text
              number-of-lines="1"
              class="content-text"
              a:if="{{ utils.getContent(item) }}"
            >
              {{ utils.getContent(item) }}
            </text>
            <block a:if="{{ utils.showLinkUrl(item) }}">
              <text
                onTap="onNavTo"
                a:if="{{ item.textUrl }}"
                class="department-district-btn"
                data-textUrl="{{ item.textUrl }}"
              >
                {{ item.textUrlLabel }}
              </text>
            </block>
          </view>
        </view>
        <view
          onTap="toMainUrl"
          data-mainUrl="{{ item.mainUrl }}"
          class="medical-information-right"
        >
          <status-icon
            type="{{ item.type }}"
            url="{{ item.noticePictureUrl }}"
          />
        </view>
      </view>
    </block>
  </block>
  <block a:if="{{ utils.showGrade(isLogin, openNotify, items, loading) }}">
    <!-- <subscribe-msg ref="saveSubscribe" /> -->
    <!-- <grade-content onAuth="onAuthHandel" /> -->
  </block>
</wrapper>
