"use client";

import Image from "next/image";
import { usePathname } from "next/navigation";

export const DynamicLogoPolda = () => {
  const pathname = usePathname();

  const getLogoSrc = () => {
    if (pathname?.startsWith("/polda/aceh")) return "/logo/polda/polda-aceh.png";
    if (pathname?.startsWith("/user")) return "/logos/user-logo.svg";
    return "/logos/default-logo.svg";
  };

  return (
    <div className="p-2">
      <Image src={getLogoSrc()} alt="Logo" width={120} height={40} className="object-contain" />
    </div>
  );
};
