import React from "react";
import Header from "../components/Header";
import { ToastContainer } from "react-toastify";

type LayoutProps = {
  children: React.ReactNode;
};

const Layout: React.FC<LayoutProps> = ({ children }) => {
  return (
    <div className="min-h-screen bg-gradient-to-br from-blue-100 via-blue-200 to-blue-400 flex flex-col">
      <Header />
      <ToastContainer
        position="top-right"
        autoClose={5000}
        hideProgressBar={false}
        newestOnTop
        closeOnClick
        rtl={false}
        pauseOnFocusLoss={false}
        draggable
        pauseOnHover
        theme="dark"
      />
      <main className="flex-1 container mx-auto px-4 py-8 flex flex-col items-center justify-center">
        {children}
      </main>
    </div>
  );
};

export default Layout;
