<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>AI Mouse — Trajectory Generator</title>
  <script src="https://unpkg.com/vue@3/dist/vue.global.prod.js"></script>
  <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>
  <link rel="stylesheet" href="/static/css/main.css" />
</head>
<body>
<div id="app">
  <div class="header">
    <span class="header-title">AI Mouse</span>
    <div class="tabs">
      <button class="tab" :class="{active: view==='collect'}" @click="switchView('collect')">采集数据</button>
      <button class="tab" :class="{active: view==='train'}"   @click="switchView('train')">训练模型</button>
      <button class="tab" :class="{active: view==='verify'}"  @click="switchView('verify')">验证效果</button>
    </div>
    <div class="status-bar">
      鼠标：<span :class="status.trace_count>0?'ok':'warn'">{{ status.trace_count }}</span> 条
      &nbsp;|&nbsp;
      滚轮：<span :class="scrollStatus.trace_count>0?'ok':'warn'">{{ scrollStatus.trace_count }}</span> 条
      &nbsp;|&nbsp;
      模型：<span :class="status.model_trained?'ok':'warn'">{{ status.model_trained ? '就绪' : '未训练' }}</span>
    </div>
  </div>

  <collect-view  v-show="view==='collect'" @status-changed="refreshAll"></collect-view>
  <train-view    v-show="view==='train'"   @status-changed="refreshAll"></train-view>
  <verify-view   v-show="view==='verify'"></verify-view>
</div>

<script type="module" src="/static/js/app.js"></script>
</body>
</html>
