import {Tabs, Typography} from "antd";
import {
    ContainerOutlined,
    ControlOutlined,
    UserOutlined
} from "@ant-design/icons";
import useAdminPage from "./useAdminPage.js";
import UsersManageTab from "./Components/UsersManageTab/UsersManageTab.jsx";
import BackupManageTab from "./Components/BackupManageTab/BackupManageTab.jsx";

const items = [
    {
        key: '1',
        label: 'Пользователи',
        children: <UsersManageTab/>,
        icon: <UserOutlined/>
    },
    {
        key: '2',
        label: 'Резервное копирование и восстановление',
        children: <BackupManageTab/>,
        icon: <ContainerOutlined/>
    }
]

const AdminPage = () => {
    const adminPageData = useAdminPage();


    return (
        <div style={adminPageData.containerStyle}>
            <>
                <Typography.Title level={1}>
                    <ControlOutlined/> Панель администратора
                </Typography.Title>
                <Tabs
                    defaultActiveKey="1"
                    items={items}
                />
            </>
        </div>
    );
};

export default AdminPage;