import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { memo } from 'react';
import { Terminal } from 'lucide-react';
import { useTerminalStore } from '../../stores/terminalStore';
import { useTerminals } from '../../hooks/useTerminals';
export const TerminalsSidebarToggle = memo(function TerminalsSidebarToggle() {
    const isExpanded = useTerminalStore((state) => state.isExpanded);
    const toggleSidebar = useTerminalStore((state) => state.toggleSidebar);
    const { data } = useTerminals();
    const terminalCount = data?.count ?? 0;
    return (_jsxs("button", { type: "button", onClick: toggleSidebar, className: `relative h-14 w-full transition-colors touch-manipulation flex items-center justify-center ${isExpanded ? 'bg-muted border-r-2 border-primary' : 'hover:bg-muted/50'}`, title: "Terminals", children: [_jsx(Terminal, { className: "w-5 h-5 text-muted-foreground mx-auto" }), terminalCount > 0 && (_jsx("span", { className: "absolute top-1 right-1 w-5 h-5 bg-primary text-primary-foreground text-xs rounded-full flex items-center justify-center font-semibold", children: terminalCount > 9 ? '9+' : terminalCount }))] }));
});
//# sourceMappingURL=TerminalsSidebarToggle.js.map