import { atom } from 'jotai';

// The event-id of the bubble-layout (1:1 DM) message whose action rail is
// currently open via tap — or null when none is open. Single-open: tapping a
// message sets this, tapping it again clears it, tapping another switches.
// RoomTimeline resets it on room change and on an outside click. Subscribed
// per-row through `selectAtom(openMessageIdAtom, id => id === eventId)` so a tap
// only re-renders the two rows whose open-ness actually flips.
export const openMessageIdAtom = atom<string | null>(null);
