import { type FC } from 'react'
import { useLocation } from 'react-router-dom'
import { Profile } from 'iconsax-react'
import SubMenuItem from './SubMenuItem'
import { Pages } from '../../config/Pages'

const UsersSubMenu: FC = () => {
    const location = useLocation()
    const isActive = (name: string) => {
        return location.pathname.includes(name)
    }

    return (
        <div className='py-12'>
            <div className='flex gap-3 items-center border-b pb-10 px-6'>
                <Profile
                    size={24}
                    color='#da2129'
                    variant='Bold'
                />
                <div className='text-xs'>
                    ادمین ها
                </div>
            </div>

            <div className='flex flex-col mt-10 gap-4'>
                <SubMenuItem
                    title={'لیست ادمین ها'}
                    isActive={isActive('list')}
                    link={Pages.admin.list}
                />
                {/* <SubMenuItem
                    title={'تعریف نقش'}
                    isActive={isActive('roles')}
                    link={Pages.admin.roleList}
                />
                <SubMenuItem
                    title={'تعریف گروه کاربری'}
                    isActive={isActive('groups')}
                    link={Pages.admin.groupList}
                /> */}
            </div>
        </div>
    )
}

export default UsersSubMenu
