<template>
	<div class="main-content">
		<div v-if="activeMenu !== 'chat'" class="content-header">
			<h2 class="content-title">{{ currentTitle }}</h2>
			<div class="content-actions">
			</div>
		</div>

		<div class="content-body">
			<div class="chat-container" v-if="activeMenu === 'chat'">
				<ChatList />
			</div>
		</div>
	</div>
</template>

<script setup lang="ts">
import { computed } from 'vue';
import ChatList from './ChatList.vue';

interface Props {
	activeMenu: string;
}

const props = defineProps<Props>();

const menuTitles: Record<string, string> = {
	chat: '对话',
	models: '模型管理',
	creation: '内容创作',
};

const currentTitle = computed(() => menuTitles[props.activeMenu] || '首页');
</script>

<style scoped lang="scss">
.main-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	background: #ffffff;
	overflow: hidden;
}

.content-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 24px;
	border-bottom: 1px solid #e5e7eb;
	background: #ffffff;
}

.content-title {
	font-size: 20px;
	font-weight: 600;
	color: #1f2937;
	margin: 0;
}

.content-actions {
	display: flex;
	gap: 12px;
}

.content-body {
	flex: 1;
	overflow-y: auto;
	background:
		radial-gradient(1200px 420px at 58% -120px, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0) 65%),
		radial-gradient(900px 320px at 20% 120%, rgba(99, 102, 241, 0.08) 0%, rgba(99, 102, 241, 0) 68%),
		linear-gradient(180deg, #f8fbff 0%, #f5f7fb 100%);

	/* 隐藏滚动条但保持滚动功能 */
	scrollbar-width: none;
	-ms-overflow-style: none;

	&::-webkit-scrollbar {
		display: none;
	}
}

.chat-container {
	width: min(1060px, 82%);
	margin: 0 auto;
	padding: 20px 0 130px;
}
</style>
