'use client';

import Link from 'next/link';
import { buttonVariants } from '@/components/ui/button';
import { cn } from '@/lib/utils';
import { InteractiveGridPattern } from './interactive-grid';

export default function SignUpViewPage() {
  return (
    <div className='relative flex min-h-screen flex-col items-center justify-center overflow-hidden md:grid lg:max-w-none lg:grid-cols-2 lg:px-0'>
      <Link
        href='/auth/sign-in'
        className={cn(
          buttonVariants({ variant: 'ghost' }),
          'absolute top-4 right-4 hidden md:top-8 md:right-8'
        )}
      >
        Sign in
      </Link>
      <div className='relative hidden h-full flex-col p-10 lg:flex dark:border-r'>
        <div className='absolute inset-0 bg-sidebar' />
        <div className='text-sidebar-foreground relative z-20 flex items-center text-lg font-medium'>
          Training System
        </div>
        <InteractiveGridPattern
          className={cn(
            'mask-[radial-gradient(400px_circle_at_center,white,transparent)]',
            'inset-x-0 inset-y-[0%] h-full skew-y-12'
          )}
        />
      </div>
      <div className='flex h-full items-center justify-center p-4 lg:p-8'>
        <div className='w-full max-w-md space-y-6 rounded-2xl border bg-background/95 p-8 shadow-sm'>
          <div className='space-y-2 text-center'>
            <h1 className='text-2xl font-semibold tracking-tight'>Sign-up is disabled</h1>
            <p className='text-muted-foreground text-sm'>
              Accounts are created by a super admin or organizer admin only.
            </p>
          </div>
          <div className='bg-muted rounded-lg border px-4 py-3 text-sm'>
            If you need access, contact your administrator and ask them to create your account.
          </div>
          <Link href='/auth/sign-in' className={cn(buttonVariants({ className: 'w-full' }))}>
            Back to sign in
          </Link>
        </div>
      </div>
    </div>
  );
}
