"use client";

import { usePathname } from "next/navigation";

// Site kromunun (banner, header, üst/alt blur) gizleneceği rotalar
// (tam eşleşme veya alt yol)
const HIDDEN_PREFIXES = ["/giris"];

export function HeaderGate({ children }: { children: React.ReactNode }) {
  const pathname = usePathname();
  const gizli = HIDDEN_PREFIXES.some(
    (p) => pathname === p || pathname.startsWith(`${p}/`),
  );
  if (gizli) return null;
  return <>{children}</>;
}
