<template>
  <div class="s1">
    <div class="s1__hero">
      <div class="s1__logo">
        <RobotOutlined />
      </div>
      <h1 class="s1__title">Fischer AgentKit</h1>
      <p class="s1__subtitle">企业级 AI 智能体平台</p>
      <div class="s1__hints">
        <div v-for="hint in hints" :key="hint" class="s1__hint">
          <ThunderboltOutlined class="s1__hint-icon" />
          <span>{{ hint }}</span>
        </div>
      </div>
    </div>

    <div class="s1__messages">
      <MessageShell role="user" name="用户" meta="10:23">
        <UserBubble content="你好！" />
      </MessageShell>
      <MessageShell role="user" name="用户" meta="10:23">
        <UserBubble content="在吗？" />
      </MessageShell>
      <MessageShell role="assistant" name="AI Agent" meta="10:24">
        <AssistantText :message="welcomeMessage" />
      </MessageShell>
    </div>

    <div class="s1__input">
      <span class="s1__input-field">@team:tech_lead,frontend_engineer,backend_engineer 设计一个用户认证系统</span>
      <button class="s1__input-send">
        <SendOutlined />
      </button>
    </div>
    <p class="s1__input-hint">Enter 发送，Shift + Enter 换行</p>
  </div>
</template>

<script setup lang="ts">
import { RobotOutlined, ThunderboltOutlined, SendOutlined } from '@ant-design/icons-vue'
import { MessageShell, UserBubble, AssistantText } from '@/components/chat/messages'
import type { IChatMessage } from '@/api/types'

const hints = [
  '智能路由：自动识别任务类型',
  '专家团协作：@team 调用多智能体',
  '私董会决策：@board 深度讨论',
  '工具调用：代码、搜索、文件处理',
]

const welcomeMessage: IChatMessage = {
  id: 's1-welcome',
  role: 'assistant',
  content: '在的。我是 Fischer AgentKit 的 AI Agent，可以帮助你完成代码开发、数据分析、文档写作等复杂任务。\n\n你可以直接输入问题，或使用：\n- `@team:任务描述` 启动专家团协作\n- `@board:话题` 开启私董会讨论',
  timestamp: new Date().toISOString(),
  status: 'completed',
}
</script>

<style scoped>
.s1 {
  max-width: var(--max-chat-width);
  margin: 0 auto;
  padding: 48px 0 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-height: 100%;
}

.s1__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
  padding: 40px 0;
}

.s1__logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-xl);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.s1__title {
  font-size: var(--font-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin: 0;
}

.s1__subtitle {
  font-size: var(--font-md);
  color: var(--text-tertiary);
  margin: 0;
}

.s1__hints {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
  width: 100%;
}

.s1__hint {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

.s1__hint-icon {
  color: var(--text-tertiary);
  font-size: var(--font-sm);
}

.s1__messages {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.s1__input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  margin-top: 24px;
}

.s1__input-field {
  flex: 1;
  font-size: 14px;
  color: var(--text-placeholder);
}

.s1__input-send {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--text-primary);
  color: var(--text-inverse);
  border: 1px solid var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.s1__input-hint {
  font-size: 11px;
  color: var(--text-placeholder);
  margin: -24px 0 0 0;
  text-align: center;
}
</style>
