import React from 'react'
import { Card, Row, Col, Button } from 'antd'
import { FileTextOutlined, ClearOutlined } from '@ant-design/icons'

export interface LogsCardProps {
    onView: () => void
    onClear: () => void
}

export const LogsCard: React.FC<LogsCardProps> = ({ onView, onClear }) => {
    return (
        <Card title="查看日志" size="small">
            <Row gutter={[8, 8]}>
                <Col span={12}>
                    <Button block type="primary" icon={<FileTextOutlined />} onClick={onView}>
                        查看日志
                    </Button>
                </Col>
                <Col span={12}>
                    <Button block danger icon={<ClearOutlined />} onClick={onClear}>
                        清空日志
                    </Button>
                </Col>
            </Row>
            <div style={{ marginTop: 8, fontSize: 12, textAlign: 'center', color: '#666' }}>
                💡 查看和管理历史日志记录
            </div>
        </Card>
    )
}

export default LogsCard


