import { ModelSvg } from '@/components/icons';
import Icon, {
AppstoreOutlined,
BuildOutlined,
ConsoleSqlOutlined,
ForkOutlined,
MessageOutlined,
PartitionOutlined,
} from '@ant-design/icons';
import { ConfigProvider, Tabs } from 'antd';
import { t } from 'i18next';
import { useRouter } from 'next/router';
import React from 'react';
import './style.css';
function ConstructLayout({ children }: { children: React.ReactNode }) {
const items = [
{
key: 'app',
name: t('App'),
path: '/app',
icon: ,
// operations: (
// }
// // onClick={handleCreate}
// >
// {t('create_app')}
//
// ),
},
{
key: 'flow',
name: t('awel_flow'),
icon: ,
path: '/flow',
},
{
key: 'models',
name: t('model_manage'),
path: '/models',
icon: ,
},
{
key: 'database',
name: t('Database'),
icon: ,
path: '/database',
},
{
key: 'knowledge',
name: t('Knowledge_Space'),
icon: ,
path: '/knowledge',
},
// {
// key: 'agent',
// name: t('Plugins'),
// path: '/agent',
// icon: ,
// },
{
key: 'prompt',
name: t('Prompt'),
icon: ,
path: '/prompt',
},
{
key: 'dbgpts',
name: t('dbgpts_community'),
path: '/dbgpts',
icon: ,
},
];
const router = useRouter();
const activeKey = router.pathname.split('/')[2];
// const isDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches; // unused
return (
{
return {
key: items.key,
label: items.name,
children: children,
icon: items.icon,
};
})}
onTabClick={key => {
router.push(`/construct/${key}`);
}}
// tabBarExtraContent={
// }
// // onClick={handleCreate}
// >
// {t('create_app')}
//
// }
/>
);
}
export default ConstructLayout;