import { create } from 'zustand';
import type { Conversation } from '@/types';

interface AppState {
  selectedAccountId: string | null;
  setSelectedAccountId: (id: string | null) => void;
  conversations: Conversation[];
  setConversations: (list: Conversation[]) => void;
}

export const useAppStore = create<AppState>((set) => ({
  selectedAccountId: null,
  setSelectedAccountId: (id) => set({ selectedAccountId: id }),
  conversations: [],
  setConversations: (list) => set({ conversations: list }),
}));
