<view class="debug-container">
  <view class="debug-header">版本调试工具</view>

  <view class="version-info">
    <text class="label">当前版本：</text>
    <text class="value">{{currentVersion}}</text>
  </view>

  <view class="version-info">
    <text class="label">版本名称：</text>
    <text class="value">{{versionName}}</text>
  </view>

  <view class="section-title">切换版本</view>
  <view class="version-list">
    <view
      class="version-item {{item.version === currentVersion ? 'active' : ''}}"
      wx:for="{{versionList}}"
      wx:key="version"
      data-version="{{item.version}}"
      bindtap="switchVersion">
      <view class="version-name">{{item.name}}</view>
      <view class="version-desc">{{item.description}}</view>
      <view class="version-current" wx:if="{{item.version === currentVersion}}">当前版本</view>
    </view>
  </view>

  <view class="section-title">版本特性对比</view>
  <view class="feature-comparison">
    <view class="feature-row">
      <text class="feature-name">新功能入口</text>
      <text class="feature-value {{isV2OrAbove ? 'enabled' : 'disabled'}}">
        {{isV2OrAbove ? '显示' : '隐藏'}}
      </text>
    </view>
    <view class="feature-row">
      <text class="feature-name">新UI设计</text>
      <text class="feature-value {{useNewUI ? 'enabled' : 'disabled'}}">
        {{useNewUI ? '启用' : '停用'}}
      </text>
    </view>
  </view>

  <view class="section-title">分类图标预览</view>
  <view class="icon-preview">
    <view class="icon-item" wx:for="{{categoryList}}" wx:key="id">
      <image class="icon-image" src="{{item.icon}}" mode="aspectFit"></image>
      <text class="icon-name">{{item.name}}</text>
    </view>
  </view>

  <view class="tips">
    <text>提示：切换版本后会重新加载页面</text>
  </view>
</view>
