import { create } from 'zustand';

export const useChatStore = create<{
  // UI state
  isPhoneCallMode: boolean;
  setIsPhoneCallMode: (isPhoneCallMode: boolean) => void;
  settingOpen: boolean;
  setSettingOpen: (settingOpen: boolean) => void;
  isPortraitMode: boolean;
  setIsPortraitMode: (isPortraitMode: boolean) => void;
  leftTabActiveKey: 'info' | 'history';
  setLeftTabActiveKey: (leftTabActiveKey: 'info' | 'history') => void;
  historyListOpen: boolean;
  setHistoryListOpen: (historyListOpen: boolean) => void;
  // data state
}>((set) => ({
  isPhoneCallMode: false,
  setIsPhoneCallMode: (isPhoneCallMode) => set({ isPhoneCallMode }),
  settingOpen: false,
  setSettingOpen: (settingOpen) => set({ settingOpen }),
  isPortraitMode: false,
  setIsPortraitMode: (isPortraitMode) => set({ isPortraitMode }),
  leftTabActiveKey: 'info',
  setLeftTabActiveKey: (leftTabActiveKey) => set({ leftTabActiveKey }),
  historyListOpen: false,
  setHistoryListOpen: (historyListOpen) => set({ historyListOpen }),
}));
