import { atom } from 'jotai';
import { SettingsPages } from '../features/settings/Settings';

// Open state for the mobile bottom-up Settings sheet. Mirror of
// `userRoomProfileAtom` (top-down user-card horseshoe). Desktop uses
// the `/settings` route directly; mobile uses this atom so the sheet
// overlays the DM list with a visible void gap, instead of route-
// swapping away from the underlying content. `/settings` deep-links
// on mobile (push notifications, bookmarks) redirect to `/direct/`
// and set this atom so the surface looks identical to a self-row tap.
export type SettingsSheetState = {
  page?: SettingsPages;
};

export const settingsSheetAtom = atom<SettingsSheetState | undefined>(undefined);
