import React from 'react';
import { Button, Divider, List, Typography, Space, Tag } from 'antd';
import { CloudDownloadOutlined } from '@ant-design/icons';
import { useNavigate } from 'react-router-dom';

const { Title, Paragraph, Text } = Typography;

const HomePage = () => {
  const navigate = useNavigate();

  return (
  <div className="space-y-6">
    <div className="text-center py-8">
      <Title level={1}>欢迎来到 PT 网站</Title>
      <Paragraph className="text-lg text-slate-500">
        高清资源分享，互助共赢的PT资源社区
      </Paragraph>
      <Button type="primary" size="large" icon={<CloudDownloadOutlined />} onClick={() => navigate('/torrents')}>
        浏览资源
      </Button>
    </div>
    
    <Divider>最新公告</Divider>
    
    <List
      itemLayout="horizontal"
      dataSource={[
        {
          content: '暂无公告',
        }
      ]}
      renderItem={(item) => (
        <List.Item>
          <List.Item.Meta
            title={<Space><Text strong>{item.title}</Text><Tag color="blue">{item.date}</Tag></Space>}
            description={item.content}
          />
        </List.Item>
      )}
    />
  </div>
  )
};

export default HomePage; 