<import-sjs
  name="utils"
  from="./index.sjs"
/>
<wrapper>
  <view class="store-address-container {{hasRefund ? 'no-border' : ''}}">
    <!-- title -->
    <view class="title">
      <!-- left 店名 -->
      <view class="title-head">
        <view class="title-text">
          {{title}}
        </view>
        <view class="title-address">
          {{shop.storeName || globalShop.storeName}}
        </view>
      </view>
      <!-- right icon -->
      <view class="title-icon">
        <!-- 导航 -->
        <view
          class="icon"
          a:if="{{showNavigateIcon}}"
          onTap="navToStore"
        >
          <image
            src="{{navigationIcon}}"
            class="icon-img"
          />
          <view class="icon-text">
            导航
          </view>
        </view>
        <!-- 联系店家 -->
        <view
          class="icon"
          a:if="{{showMobile}}"
        >
          <image
            src="{{phoneIcon}}"
            class="icon-img"
            onTap="contactStore"
          />
          <view class="icon-text">
            联系商家
          </view>
        </view>
      </view>
    </view>
    <!-- address info -->
    <view class="address-info-container">
      <view class="address">
        地址：
      </view>
      <view class="address-info">
        {{shop.address || globalShop.address}}
      </view>
    </view>
  </view>
  <view
    class="refund"
    a:if="{{hasRefund && refundList.length}}"
  >
    <!-- text -->
    <view class="text-container">
      <view class="text">
        退款金额：
      </view>
      <view class="money">
        ¥{{utils.getRefundMoney(refundList)}}
      </view>
      <block a:if="{{refundDetailStatus && refundDetailStatus !== 'REFUND'}}">
        <view class="text">
          退货数量：
        </view>
        <view class="money">
          {{refundTotalNum}}
        </view>
      </block>
    </view>
    <!-- button -->
    <refund-popup
      a:if="{{refundList.length}}"
      refundList="{{refundList}}"
    >
      <view class="button">
        查看退款
      </view>
    </refund-popup>
  </view>
</wrapper>