/**
 * Body class strings extracted verbatim from the production PHP pages.
 * Production Elementor/WordPress CSS depends heavily on these for layout, typography, and section rules.
 * Sources: doormile-site/{index,how-it-works,miletruth,solutions,about-us,blogs,contacts}.php
 *
 * Note: replicated EXACTLY including PHP-source quirks
 *   - how-it-works.php omits `elementor-kit-5`
 *   - about-us.php prepends `home`
 * These are upstream inconsistencies; preserved here so the migrated DOM matches production 1:1.
 */

/** Base classes shared by every page — safe to SSR before route is known. */
export const SHARED_BODY_CLASSES =
  "wp-singular page-template-default page wp-theme-logico wp-child-theme-logico-child theme-logico ehf-header ehf-footer ehf-template-logico ehf-stylesheet-logico-child logico-front-end logico-theme-style-rounded elementor-default elementor-kit-5 elementor-page";

const SHARED = SHARED_BODY_CLASSES;

const ROUTE_CLASSES: Record<string, string> = {
  "/": `home-page ${SHARED} page-id-61 elementor-page-61 is-home-page`,
  // PHP source quirk: how-it-works omits elementor-kit-5
  "/how-it-works":
    "wp-singular page-template-default page page-id-59 wp-theme-logico wp-child-theme-logico-child theme-logico ehf-header ehf-footer ehf-template-logico ehf-stylesheet-logico-child logico-front-end logico-theme-style-rounded elementor-default elementor-page elementor-page-59",
  "/miletruth": `${SHARED} page-id-59 elementor-page-59`,
  "/solutions": `${SHARED} page-id-59 elementor-page-59`,
  // PHP source quirk: about-us.php has `home` class (upstream bug, preserved)
  "/about-us": `home ${SHARED} page-id-59 elementor-page-59`,
  "/blog": `${SHARED} page-id-59 elementor-page-59`,
  "/contact": `${SHARED} page-id-59 elementor-page-59`,
};

export function getBodyClasses(pathname: string): string {
  return ROUTE_CLASSES[pathname] ?? SHARED;
}
