import loginBackground from "../assets/backgrounds/login-new-bg.png";
import homeBackground from "../assets/backgrounds/home-bg.jpg";
import allPagesBackground from "../assets/backgrounds/All BG.jpg";

const appShellBackground = allPagesBackground;

export const backgroundImages = {
  login: loginBackground,
  home: homeBackground,
  profile: appShellBackground,
  editProfile: appShellBackground,
  magicBag: appShellBackground,
  messages: appShellBackground,
  publicChat: appShellBackground,
  feed: appShellBackground,
  challenges: appShellBackground,
  chatbot: appShellBackground,
  submitChallenge: appShellBackground,
} as const;

export function getLayoutBackgroundByPath(pathname: string): string {
  if (pathname === "/") return backgroundImages.home;
  if (pathname.startsWith("/profile")) return backgroundImages.profile;
  if (pathname.startsWith("/edit-profile")) return backgroundImages.editProfile;
  if (pathname.startsWith("/magic-bag")) return backgroundImages.magicBag;
  if (pathname.startsWith("/messages")) return backgroundImages.messages;
  if (pathname.startsWith("/public-chat")) return backgroundImages.publicChat;
  return appShellBackground;
}
