"use client";

import Sidebar from "@/components/layouts/sidebar";
import Navbar from "@/components/layouts/navbar";
import { Sparkles } from "lucide-react";
import { NavProvider } from "@/components/layouts/context/navContext";

export default function DashboardLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <NavProvider>
      
        {/* Shared Sidebar - Now inside NavProvider */}
        <Sidebar />

        <div className="pl-64 flex flex-col ">
          {/* Shared Navbar - Now inside NavProvider */}
          <Navbar />

          {/* Main Page Content */}
          <main className="flex-1  bg-[#071321]">
            
            {children}
          </main>
        </div>

        {/* Ask AI Floating Button */}
        <button className="fixed bottom-4 right-4 z-40 flex items-center gap-2 
          rounded-full bg-[#17d4bd] hover:bg-[#13b19e] px-4 py-2.5 text-xs
          font-bold text-[#05111d] transition shadow-lg shadow-[#17d4bd]/20">
          <Sparkles size={14} className="animate-pulse" />
          <span>Ask AI</span>
        </button>
      
    </NavProvider>
  );
}