import { type FC } from 'react'
import { Receipt21 } from 'iconsax-react'
import SubMenuItem from './SubMenuItem'
import { Pages } from '../../config/Pages'

const OrdersSubMenu: FC = () => {
    const isActive = (name: string) => {
        return window.location.href.includes(name)
    }

    return (
        <div className='py-12'>
            <div className='flex gap-3 items-center border-b border-border pb-10 px-6'>
                <Receipt21
                    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('/seller')}
                    link={Pages.orders.sellers}
                /> */}
                <SubMenuItem
                    title={'همه ی سفارشات'}
                    isActive={isActive('Admin')}
                    link={Pages.orders.admin}
                />
                <SubMenuItem
                    title={'سفارشات کنسل شده'}
                    isActive={isActive('cancelled')}
                    link={Pages.orders.cancelled}
                />
                <SubMenuItem
                    title={'سفارشات تکمیل شده'}
                    isActive={isActive('process_by_sellers')}
                    link={Pages.orders.completed}
                />
                <SubMenuItem
                    title={'دسته بندی کنسلی ها'}
                    isActive={isActive('cancellation-categories')}
                    link={Pages.orders.cancellationCategories}
                />
                <SubMenuItem
                    title={'دسته بندی مرجوعی ها'}
                    isActive={isActive('return-categories')}
                    link={Pages.orders.returnCategories}
                />

                <SubMenuItem
                    title={'مرجوعی ها'}
                    isActive={isActive('return')}
                    link={Pages.orders.return}
                />

                <SubMenuItem
                    title={'کنسلی ها'}
                    isActive={isActive('cancels')}
                    link={Pages.orders.cancels}
                />
            </div>
        </div>
    )
}

export default OrdersSubMenu
