<!--pages/application-result/application-result.wxml-->
<view class="container">
  <!-- 结果状态 -->
  <view class="result-section">
    <view class="result-icon {{resultStatus === 'success' ? 'success' : 'error'}}">
      <text class="icon-text">{{resultStatus === 'success' ? '✓' : '✗'}}</text>
    </view>
    
    <view class="result-title">{{resultStatus === 'success' ? '申请提交成功' : '申请提交失败'}}</view>
    <view class="result-desc">{{resultMessage}}</view>
  </view>

  <!-- 申请信息 -->
  <view class="info-section">
    <view class="section-title">申请信息</view>
    
    <view class="info-card">
      <view class="info-item">
        <text class="info-label">产品名称</text>
        <text class="info-value">{{applicationInfo.productName}}</text>
      </view>
      
      <view class="info-item">
        <text class="info-label">申请单号</text>
        <text class="info-value">{{applicationInfo.applicationNo}}</text>
      </view>
      
      <view class="info-item">
        <text class="info-label">申请人</text>
        <text class="info-value">{{applicationInfo.applicantName}}</text>
      </view>
      
      <view class="info-item">
        <text class="info-label">保险金额</text>
        <text class="info-value">¥{{applicationInfo.coverageAmount}}万</text>
      </view>
      
      <view class="info-item">
        <text class="info-label">应缴保费</text>
        <text class="info-value">¥{{applicationInfo.premium}}</text>
      </view>
      
      <view class="info-item">
        <text class="info-label">申请时间</text>
        <text class="info-value">{{applicationInfo.applicationTime}}</text>
      </view>
    </view>
  </view>

  <!-- 下一步操作 -->
  <view class="action-section">
    <view class="section-title">下一步操作</view>
    
    <view class="action-list">
      <view class="action-item" wx:if="{{resultStatus === 'success'}}">
        <view class="action-icon">💳</view>
        <view class="action-content">
          <text class="action-title">支付保费</text>
          <text class="action-desc">请在24小时内完成保费支付</text>
        </view>
        <view class="action-arrow">></view>
      </view>
      
      <view class="action-item" wx:if="{{resultStatus === 'success'}}">
        <view class="action-icon">📄</view>
        <view class="action-content">
          <text class="action-title">查看保单</text>
          <text class="action-desc">支付完成后可查看电子保单</text>
        </view>
        <view class="action-arrow">></view>
      </view>
      
      <view class="action-item" wx:if="{{resultStatus === 'error'}}">
        <view class="action-icon">🔄</view>
        <view class="action-content">
          <text class="action-title">重新申请</text>
          <text class="action-desc">检查信息后重新提交申请</text>
        </view>
        <view class="action-arrow">></view>
      </view>
      
      <view class="action-item">
        <view class="action-icon">📞</view>
        <view class="action-content">
          <text class="action-title">联系客服</text>
          <text class="action-desc">如有疑问请联系客服</text>
        </view>
        <view class="action-arrow">></view>
      </view>
    </view>
  </view>

  <!-- 温馨提示 -->
  <view class="tips-section">
    <view class="tips-title">温馨提示</view>
    <view class="tips-list">
      <view class="tip-item" wx:for="{{tips}}" wx:key="index">
        <text class="tip-icon">💡</text>
        <text class="tip-text">{{item}}</text>
      </view>
    </view>
  </view>

  <!-- 底部操作栏 -->
  <view class="bottom-actions">
    <button 
      class="action-btn secondary"
      bindtap="goToHome"
    >
      返回首页
    </button>
    
    <button 
      class="action-btn primary"
      bindtap="goToPolicies"
      wx:if="{{resultStatus === 'success'}}"
    >
      查看保单
    </button>
    
    <button 
      class="action-btn primary"
      bindtap="retryApplication"
      wx:if="{{resultStatus === 'error'}}"
    >
      重新申请
    </button>
  </view>
</view>