'use client';

import { usePathname } from "next/navigation";
import MainLogoSvg from '../svgs/mainlogosvg';

export default function Footer() {
	const pathname = usePathname();
	const isMenuPage = pathname?.startsWith('/menu');
	
	return (
		<footer className="bg-[#f2f3f7] border-t border-[rgba(0,0,0,0.1)] relative">
			{isMenuPage && (
				<div className="absolute left-1/2 -translate-x-1/2 w-full max-w-[1440px]">
					<div className="absolute left-[320px] top-0 bottom-0 w-px bg-[#dee1e6]"></div>
				</div>
			)}
			<div className="flex justify-center">
					<div className="w-full max-w-[1440px] px-[1px] py-[40px] flex gap-[32px]">
					<div className="flex flex-col items-center gap-[7px] w-[72px]">
						<MainLogoSvg width={72} height={54} />
						<div className="text-[16px] font-extrabold leading-[1.45] tracking-[-0.08px] text-black">
							XR LMS
						</div>
					</div>
					<div className="flex-1 flex flex-col justify-end gap-[24px]">
						<div className="flex items-center gap-[24px]">
							<a href="#" className="text-[16px] font-semibold leading-[1.45] tracking-[-0.08px] text-black no-underline">
								이용 약관
							</a>
							<div className="w-px h-[18px] bg-black/10" aria-hidden />
							<a href="#" className="text-[16px] font-semibold leading-[1.45] tracking-[-0.08px] text-black no-underline">
								개인정보처리방침
							</a>
							<div className="w-px h-[18px] bg-black/10" aria-hidden />
							<a href="#" className="text-[16px] font-semibold leading-[1.45] tracking-[-0.08px] text-black no-underline">
								고객센터
							</a>
						</div>
						<div className="w-full flex items-end justify-between text-[16px] leading-[0] tracking-[-0.08px] text-black/55">
							<div className="flex flex-col gap-[8px]">
								<p className="leading-[1.45] text-nowrap">(12345) 서울특별시 광진구 구의동 123-12(구의타워1)</p>
								<p className="leading-[1.45] text-nowrap">문의: 1234-1234 (평일 09:00 ~ 18:00)</p>
								<p className="leading-[1.45] text-nowrap">이메일: qwer1234@go.or.kr</p>
							</div>
							<p className="leading-[1.45] text-nowrap">Copyright ⓒ 2025 XR LMS. All rights reserved</p>
						</div>
					</div>
					<img
						src="/imgs/talk.png"
						alt="talk"
						className="self-end ml-auto mr-[40px] mb-[0px]"
					/>
				</div>
			</div>
		</footer>
	);
}


