import Link from 'next/link';
import Image from 'next/image';
import { DEFAULT_MAINTENANCE_MESSAGE } from '@/lib/settings';

export default function MaintenancePage({ message }: { message: string | null }) {
  return (
    <div className="flex min-h-screen flex-col items-center justify-center px-6 text-center">
      <div className="h-1 w-24 brand-gradient" />
      <Image
        src="/logo.png"
        alt="Craft2Prints"
        width={96}
        height={96}
        className="mt-8 h-24 w-24 object-contain"
      />
      <p className="mt-4 font-script text-3xl text-splash-pink">Back soon</p>
      <h1 className="mt-2 font-display text-4xl">We&apos;re making some changes</h1>
      <p className="mt-4 max-w-md text-muted">{message?.trim() || DEFAULT_MAINTENANCE_MESSAGE}</p>

      <Link href="/admin/login" className="mt-12 tag-label text-muted hover:text-clay">
        Admin login
      </Link>
    </div>
  );
}
