const DEFAULT_HERO = "/images/background/properties-hero-bg.jpg";

/**
 * Maps property type slugs to their hero image paths.
 * Add images under /public/images/property-types/{TypeName}/
 * - Left Side Small-{TypeName}.jpg (for desktop left panel)
 * - Right Side Big-{TypeName}.jpg (for desktop right panel & mobile background)
 */
const PROPERTY_TYPE_IMAGES: Record<
  string,
  { left: string; right: string } | undefined
> = {
  condominium: {
    left: "/images/property-types/Condominium/Left Side Small-Condominium.webp",
    right: "/images/property-types/Condominium/Right Side Big-Condominium.webp",
  },
  land: {
    left: "/images/property-types/Land/Left Side Small-Land.avif",
    right: "/images/property-types/Land/Right Side Big-Land.avif",
  },
  residential: {
    left: "/images/property-types/Residential/Small Left.webp",
    right: "/images/property-types/Residential/Big-Right.webp",
  },
  commercial: {
    left: "/images/property-types/Commercial/Small Left.webp",
    right: "/images/property-types/Commercial/Big Right.webp",
  },
};

export function getPropertyTypeHeroImages(type: string): {
  left: string;
  right: string;
} {
  const normalized = type?.toLowerCase() || "all";
  const images = PROPERTY_TYPE_IMAGES[normalized];
  if (images) {
    return images;
  }
  return { left: DEFAULT_HERO, right: DEFAULT_HERO };
}
