import GridShape from "@/components/common/GridShape";
import ThemeTogglerTwo from "@/components/common/ThemeTogglerTwo";

import LayoutClient from "@/app/LayoutClient";
import Image from "next/image";
import Link from "next/link";
import React from "react";

export default function AuthLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <LayoutClient>
      <div className="relative p-6 bg-white z-1 dark:bg-gray-900 sm:p-0">
        <div className="relative flex lg:flex-row w-full h-screen justify-center flex-col dark:bg-gray-900 sm:p-0">
          {/* Assurez-vous que le formulaire est visible */}
          <div className="lg:w-1/2 w-full flex items-center justify-center">
            {children}
          </div>
          <div className="lg:w-1/2 w-full h-full bg-brand-950 dark:bg-white/5 lg:grid items-center hidden">
            <div className="relative items-center justify-center  flex z-1">
              {/* <!-- ===== Common Grid Shape Start ===== --> */}
              <GridShape />
              <div className="flex flex-col items-center max-w-xs">
                <Link href="/" className="block mb-4">
                  {/*<Image*/}
                  {/*  width={231}*/}
                  {/*  height={48}*/}
                  {/*  src="./images/logo/auth-logo.svg"*/}
                  {/*  alt="Logo"*/}
                  {/*/>*/}
                </Link>
                <p className="text-center text-gray-400 dark:text-white/60">
                  Notre application de gestion de dossiers
                </p>
              </div>
            </div>
          </div>
          <div className="fixed bottom-6 right-6 z-50 hidden sm:block">
            <ThemeTogglerTwo />
          </div>
        </div>
      </div>
    </LayoutClient>
  );
}
