// app/page.tsx
'use client'

import { Layout, Button } from 'antd'
import Link from 'next/link'
import  FileTree  from './components/FileTree/FileTree'

const { Header, Sider, Content } = Layout

export default function Home() {
  return (
    <Layout className="h-screen">
      <Header className="bg-white px-4 flex items-center justify-between border-b">
        <h1 className="text-xl font-semibold">协作文档编辑器</h1>
        <div className="flex gap-4">
          <Link href="/document">
            <Button type="primary">新建文档</Button>
          </Link>
          <Link href="/login">
            <Button>登录</Button>
          </Link>
        </div>
      </Header>
      <Layout>
        <Sider width={250} className="bg-white border-r">
          <FileTree />
        </Sider>
        <Content className="p-6">
          <div className="bg-white rounded-lg shadow p-6 min-h-full">
            <h2 className="text-lg font-medium mb-4">最近的文档</h2>
            {/* 最近文档列表将在这里显示 */}
          </div>
        </Content>
      </Layout>
    </Layout>
  )
}