import { MyPageContainer } from '@/common';
import type { TabsProps } from 'antd';
import { Tabs } from 'antd';
import MyList from './list';
import MyMaintenanceRules from './maintenance_rules';

export default function Index({ title = '维保管理' }) {
  // const getCurrentPermissions = useCurrentPermissions();

  const items: TabsProps['items'] = [
    {
      key: '1',
      label: '维保工单',
      children: <MyList />,
    },
    {
      key: '2',
      label: '维保规则',
      children: <MyMaintenanceRules />,
    },
  ];

  return (
    <MyPageContainer
      title={title}
      enableTabs={true}
      tabKey="asset_item_maintenances"
      tabLabel={title}
    >
      <Tabs type="card" defaultActiveKey="1" items={items} />
    </MyPageContainer>
  );
}
