import { create } from 'zustand';
import { useGitStore } from './gitStore';
import { useSessionFilesStore } from './sessionFilesStore';
import { useResearchStore } from './researchStore';
import { useSettingsStore } from './settingsStore';
export const useTerminalStore = create((set) => ({
    isExpanded: false,
    selectedTerminalId: null,
    toggleSidebar: () => {
        set((state) => {
            const newExpanded = !state.isExpanded;
            if (newExpanded) {
                useGitStore.getState().collapseSidebar();
                useSessionFilesStore.getState().collapseSidebar();
                useResearchStore.getState().collapseSidebar();
                useSettingsStore.getState().collapseSidebar();
            }
            return { isExpanded: newExpanded };
        });
    },
    expandSidebar: () => set({ isExpanded: true }),
    collapseSidebar: () => set({ isExpanded: false, selectedTerminalId: null }),
    selectTerminal: (id) => set({ selectedTerminalId: id }),
}));
//# sourceMappingURL=terminalStore.js.map