import React, { useState } from 'react';
import { Tabs } from 'antd';
import styles from './EvaluationReport.less';

// 导入子页面组件
import PermitStatistics from './secondary_menu/PermitStatistics';
import EnvironmentalTaskList from './secondary_menu/EnvironmentalTaskList';
import DischargePermitManagement from './secondary_menu/DischargePermitManagement';

const EvaluationReport = () => {
    const [activeTab, setActiveTab] = useState('permit-statistics');

    // 标签页配置
    const tabItems = [
        {
            key: 'permit-statistics',
            label: '许可证信息统计表',
            children: <PermitStatistics />
        },
        {
            key: 'environmental-task-list',
            label: '环保管理任务清单',
            children: <EnvironmentalTaskList />
        },
        {
            key: 'discharge-permit-management',
            label: '排污许可执行管理',
            children: <DischargePermitManagement />
        }
    ];

    // 标签页切换处理
    const handleTabChange = (key) => {
        setActiveTab(key);
    };

    return (
        <div className={styles.container}>
            <Tabs
                activeKey={activeTab}
                onChange={handleTabChange}
                items={tabItems}
                className={styles.tabs}
                style={{
                    '--ant-tabs-tab-color': '#AFAFAF',
                    '--ant-tabs-tab-active-color': '#009D6F',
                    '--ant-tabs-tab-active-bg': '#fff'
                }}
                tabBarStyle={{
                    '--ant-tabs-tab-active-color': '#009D6F'
                }}
            />
        </div>
    );
};

export default EvaluationReport;
