"use client" import { useState, useEffect } from "react" import { useTheme } from "next-themes" import { usePathname } from "next/navigation" import Sidebar from "./sidebar" import UnifiedNotifications from "@/components/notifications/UnifiedNotifications" import type React from "react" interface LayoutProps { children: React.ReactNode } export default function Layout({ children }: LayoutProps) { const { theme } = useTheme() const [mounted, setMounted] = useState(false) const pathname = usePathname() // Check if we're in a chat detail page const isChatDetailPage = pathname?.includes('/dashboard/chats/') && !pathname?.endsWith('/chats') && !pathname?.endsWith('/new') // Check if we're on an admin page const isAdminPage = pathname?.includes('/dashboard/admin') useEffect(() => setMounted(true), []) // Show skeleton while mounting to prevent layout shift if (!mounted) { return (