import { create } from 'zustand';

export type MobileView = 'sidebar' | 'chat' | 'members';

interface LayoutState {
  isDM: boolean;
  setDM: (value: boolean) => void;
  mobileView: MobileView;
  setMobileView: (view: MobileView) => void;
}

export const useLayoutStore = create<LayoutState>((set) => ({
  isDM: false,
  setDM: (value) => set({ isDM: value }),
  mobileView: 'chat',
  setMobileView: (view) => set({ mobileView: view }),
}));
