import React, { useState } from 'react';
import { Tabs, Row, Col } from 'antd';
import CompanyInfo from '@/components/CompanyInfo';
import PersonalInfo from './components/PersonalInfo';
import ChangePassword from './components/ChangePassword';
const { TabPane } = Tabs;

const Workbench: React.FC = () => {
    const [activeTab, setActiveTab] = useState<string>('company');

    return (
        <div style={{ height: '100vh', background: '#fff', display: 'flex', flexDirection: 'column' }}>
            <div style={{ padding: '16px 24px', borderBottom: '1px solid #f0f0f0' }}>
                <h2 style={{ margin: 0 }}>工作台</h2>
            </div>

            <Row style={{ flex: 1, overflow: 'hidden' }}>
                <Col span={24} style={{ borderRight: '1px solid #f0f0f0' }}>
                    <Tabs
                        tabPosition="left"
                        activeKey={activeTab}
                        onChange={setActiveTab}
                        style={{ height: '100%' }}
                    >
                        <TabPane tab="公司信息" key="company">
                            <CompanyInfo />
                        </TabPane>
                        <TabPane tab="个人信息" key="tasks">
                            <PersonalInfo />
                        </TabPane>
                        <TabPane tab="修改密码" key="settings">
                            <ChangePassword />
                        </TabPane>
                    </Tabs>
                </Col>
            </Row>
        </div>
    );
};

export default Workbench;
