import { useEffect } from 'react';
import { useDispatch } from 'react-redux';
import { setPageTitle } from '../../store/themeConfigSlice';
import { Breadcrumb } from '../../components/Breadcrumb';
import { useTranslation } from 'react-i18next';
import { ProductCategoriesList } from '../../features/productCategories/components/ProductCategoriesList';

const ProductCategories = () => {
    const dispatch = useDispatch();
    useEffect(() => {
        dispatch(setPageTitle('Product Categories'));
    });

    const { t } = useTranslation();

    const breadcrumbItems = [{ label: 'Dashboard', href: '/' }, { label: 'Product Categories' }];

    return (
        <>
            <Breadcrumb items={breadcrumbItems} />
            <h5 className="mt-5 mb-5 font-bold text-2xl">{t('product_categories')}</h5>
            <ProductCategoriesList />
        </>
    );
};

export default ProductCategories;
