import { ActionIcon, Flex, ScrollArea, Stack } from '@mantine/core';
import {
IconBrandWordpress,
IconCalendarClock,
IconChartPie,
IconCode,
IconCopyOff,
IconDatabase,
IconLayoutSidebarLeftCollapse,
IconLayoutSidebarLeftExpand,
IconRecycle,
} from '@tabler/icons-react';
import { __ } from '@wordpress/i18n';
import classes from './LeftSidebar.module.scss';
import { LeftSidebarButton } from './LeftSidebarButton';
const links = [
{
label: __('Overview', 'scotty'),
id: 'overview',
leftSection: ,
},
{ divider: __('Cleaning', 'scotty') },
{
label: __('Trash', 'scotty'),
id: 'trash',
leftSection: ,
},
{
label: __('Duplicates', 'scotty'),
id: 'duplicates',
leftSection: ,
},
{ divider: __('Optimization', 'scotty') },
{
label: __('Database', 'scotty'),
id: 'database',
leftSection: ,
},
{ divider: __('System', 'scotty') },
{
label: __('Cron', 'scotty'),
id: 'cron',
leftSection: ,
},
{
label: __('Shortcode', 'scotty'),
id: 'shortcode',
leftSection: ,
},
{ divider: __('Settings', 'scotty') },
// {
// label: __('Preferences', 'scotty'),
// id: 'preferences',
// leftSection: ,
// },
{
label: __('WordPress', 'scotty'),
id: 'wordpress',
leftSection: ,
},
];
type LeftSidebarProps = {
activeTab: string;
setActiveTab: (id: string) => void;
onClickCollapse: (collapse: boolean) => void;
collapse?: boolean;
};
export function LeftSidebar({
activeTab,
setActiveTab,
onClickCollapse,
collapse = false,
}: LeftSidebarProps) {
return (
{links.map((link) => (
))}
onClickCollapse(!collapse)}>
{collapse ? : }
);
}