type RouteFactory = (
  t: any,
  locale: string,
) => {
  home: { title: string; route: () => string };
  productCategories: { title: string; route: () => string };
  products: { title: string; route: (productId: string) => string };
  projects: { title: string; route: () => string };
  project: { title: string; route: (projectId: string) => string };
  about: { title: string; route: () => string };
  blog: { title: string; route: () => string };
  singlePost: { title: string; route: (postId: string) => string };
  contact: { title: string; route: () => string };
};

const routeFactory: RouteFactory = (t, locale) => ({
  home: {
    title: t('pages_home_title'),
    route: () => `/${locale}`,
  },
  productCategories: {
    title: t('pages_product_categories_title'),
    route: () => `/${locale}/product-categories`,
  },
  products: {
    title: t('pages_products_title'),
    route: (productId: string) => `/${locale}/product-categories/${productId}`,
  },
  projects: {
    title: t('pages_projects_title'),
    route: () => `/${locale}/projects`,
  },
  project: {
    title: '',
    route: (projectId: string) => `/${locale}/projects/${projectId}`,
  },
  about: {
    title: t('pages_about_title'),
    route: () => `/${locale}/about-us`,
  },
  blog: {
    title: t('pages_blog_title'),
    route: () => `/${locale}/blog`,
  },
  singlePost: {
    title: '',
    route: (id: string) => `/${locale}/blog/${id}`,
  },
  contact: {
    title: t('pages_contact_title'),
    route: () => `/${locale}/contact-us`,
  },
});

export default routeFactory;
