import { atom } from 'recoil'; export const $searchQuery = atom({ key: 'SEARCH_QUERY', default: '', }); export const $jwtToken = atom({ key: 'JWT_TOKEN', default: null, }); // conversation id export const $selectedConversation = atom({ key: 'SELECTED_CONVERSATION', default: null, }); // new convo page trigger export const $newConvoPage = atom({ key: 'NEW_CONVO_PAGE', default: false, }); // number of active lines export const $numberActiveLines = atom({ key: 'NUMBER_ACTIVE_LINES', default: 0, }); // max number of active streams export const $maxNumberActiveStreams = atom({ key: 'MAX_NUMBER_ACTIVE_STREAMS', default: 0, }); // ============ type DesktopMode = 'flowState' | 'overlayOnly' | 'terminal'; export const $desktopMode = atom({ key: 'DESKTOP_MODE', default: 'terminal', }); export const $selectedLineId = atom({ key: 'SELECTED_LINE_ID', default: null, }); interface MediaSettings { mode: 'audio' | 'video' | 'screen'; isMuted: boolean; } export const $mediaSettings = atom({ key: 'MEDIA_SETTINGS', default: { isMuted: false, mode: 'audio' }, });