import { create } from 'zustand';
import { ChatProps, WarningProps } from 'src/screens/InAppScreens/MessagesScreen/types';

interface ChatStore {
  selectedChat: ChatProps | null;
  setSelectedChat: (chat: ChatProps | null) => void;
  isWarningModalVisible: WarningProps | null;
  setIsWarningModalVisible: (value: WarningProps | null) => void;
}

export const useChatStore = create<ChatStore>((set) => ({
  selectedChat: null,
  setSelectedChat: (chat) => set({ selectedChat: chat }),
  isWarningModalVisible: null,
  setIsWarningModalVisible: (value) => set({ isWarningModalVisible: value })
}));
