/**
 * Single source of truth for shop navigation: pet categories and their subcategories.
 * Used by header (desktop BottomNav, mobile MobileNavButtons) so links stay in sync
 * with shop routes: /shop/[category]/[subCategory].
 */

export type NavSubcategory = {
  name: string;
  slug: string;
};

export type NavCategory = {
  slug: string;
  subcategories: NavSubcategory[];
};

/** Ordered keys for consistent nav order. */
export const navCategoryOrder = ["dogs", "cats", "birds", "smallPets"] as const;
export type NavCategoriesKey = (typeof navCategoryOrder)[number];

/** Display label for each nav category key (for nav UI). */
export const navCategoryLabels: Record<NavCategoriesKey, string> = {
  dogs: "Dogs",
  cats: "Cats",
  birds: "Birds",
  smallPets: "Small Pets",
};

export const navCategories: Record<NavCategoriesKey, NavCategory> = {
  dogs: {
    slug: "dogs",
    subcategories: [
      { name: "Dry Food", slug: "dog-dry-food" },
      { name: "Wet Food", slug: "dog-wet-food" },
      { name: "Treats", slug: "dog-treats" },
      { name: "Beds & Baskets", slug: "dog-beds-baskets" },
      { name: "Leads & Collars", slug: "dog-leads-collars" },
      { name: "Toys", slug: "dogs-toys" },
      { name: "Grooming & Care", slug: "dog-grooming-care" },
      { name: "Bowls & Feeders", slug: "dog-bowls-feeders" },
      { name: "Crates & Travel Accessories", slug: "dog-crates-travel" },
      { name: "Kennels, Flaps & Gates", slug: "dogs-kennel-flaps-gates" },
      { name: "Clothing", slug: "dog-clothing" },
      { name: "Agility & Training Accessories", slug: "dog-agility-training" },
      { name: "Puppy Products & Accessories", slug: "dog-puppy-products" },
      { name: "Senior Food", slug: "dog-senior-food" },
    ],
  },
  cats: {
    slug: "cats",
    subcategories: [
      { name: "Dry Food", slug: "cat-dry-food" },
      { name: "Wet Food", slug: "cat-wet-food" },
      { name: "Litter", slug: "cats-litter" },
      { name: "Litter Boxes & Litter Trays", slug: "cat-litter-boxes-trays" },
      { name: "Trees & Scratching Posts", slug: "cat-trees-scratching-posts" },
      { name: "Treats", slug: "cat-treats" },
      { name: "Feliway & Care", slug: "cat-feliway-care" },
      { name: "Beds & Baskets", slug: "cat-beds-baskets" },
      { name: "Flaps & Nets", slug: "cat-flaps-nets" },
      { name: "Toys", slug: "cats-toys" },
      { name: "Bowls & Feeders", slug: "cat-bowls-feeders" },
      { name: "Carriers & Transport", slug: "cat-carriers-transport" },
      { name: "Kitten Supplies & Accessories", slug: "cat-kitten-supplies" },
      { name: "Senior Food", slug: "cat-senior-food" },
    ],
  },
  birds: {
    slug: "birds",
    subcategories: [
      { name: "Pet Food", slug: "bird-pet-food" },
      { name: "Cages", slug: "bird-cages" },
      { name: "Cage Accessories", slug: "bird-cage-accessories" },
      { name: "Snacks & Crackers", slug: "bird-snacks-crackers" },
      { name: "Toys", slug: "birds-toys" },
    ],
  },
  smallPets: {
    slug: "small-pets",
    subcategories: [
      { name: "Cages", slug: "small-pet-cages" },
      { name: "Cage Accessories", slug: "small-pet-cage-accessories" },
      { name: "Pet Food", slug: "small-pet-food" },
      { name: "Straw & Beddings", slug: "small-pet-straw-beddings" },
      { name: "Runs & Enclosures", slug: "small-pet-runs-enclosures" },
      { name: "Care & Grooming", slug: "small-pet-care-grooming" },
      { name: "Toys & Travel", slug: "small-pet-toys-travel" },
      { name: "Tunnels & Dens", slug: "small-pet-tunnels-dens" },
      { name: "Bridges & Stairs", slug: "small-pet-bridges-stairs" },
      { name: "Exercise Wheels", slug: "small-pet-exercise-wheels" },
    ],
  },
};
