'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useCallback } from 'react';
import { useRouter, usePathname } from 'next/navigation';
import { Bot } from 'lucide-react';
import { BaseDrawer } from '../../common/base-drawer/index.js';
import { Separator } from '../../ui/separator.js';
import { ChatTab } from '../../features/chat/ChatTab.js';
export function GlobalChatDrawerClient() {
    const router = useRouter();
    const pathname = usePathname();
    const isOpen = pathname === '/chat';
    const onClose = useCallback(() => {
        router.push('/control-center');
    }, [router]);
    return (_jsx(BaseDrawer, { open: isOpen, onClose: onClose, size: "lg", modal: false, "data-testid": "global-chat-drawer", children: _jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [_jsx("div", { className: "shrink-0 px-4 pt-4 pb-3", children: _jsxs("div", { className: "flex items-center gap-2.5", children: [_jsx("div", { className: "bg-primary/10 flex h-7 w-7 items-center justify-center rounded-full", children: _jsx(Bot, { className: "text-primary h-4 w-4" }) }), _jsxs("div", { children: [_jsx("h2", { className: "text-foreground text-base font-semibold tracking-tight", children: "Shep Assistant" }), _jsx("p", { className: "text-muted-foreground text-xs", children: "Global session \u2014 controls all repositories" })] })] }) }), _jsx(Separator, {}), _jsx("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden", children: _jsx(ChatTab, { featureId: "global" }) })] }) }));
}
