import React from 'react' import { RelayPool } from 'applesauce-relay' import { IEventStore } from 'applesauce-core' import { BookmarkList } from './BookmarkList' import ContentPanel from './ContentPanel' import { HighlightsPanel } from './HighlightsPanel' import Settings from './Settings' import Toast from './Toast' import { HighlightButton } from './HighlightButton' import { RelayStatusIndicator } from './RelayStatusIndicator' import { ViewMode } from './Bookmarks' import { Bookmark } from '../types/bookmarks' import { Highlight } from '../types/highlights' import { ReadableContent } from '../services/readerService' import { UserSettings } from '../services/settingsService' import { HighlightVisibility } from './HighlightsPanel' import { HighlightButtonRef } from './HighlightButton' import { BookmarkReference } from '../utils/contentLoader' interface ThreePaneLayoutProps { // Layout state isCollapsed: boolean isHighlightsCollapsed: boolean showSettings: boolean // Bookmarks pane bookmarks: Bookmark[] bookmarksLoading: boolean viewMode: ViewMode isRefreshing: boolean onToggleSidebar: () => void onLogout: () => void onViewModeChange: (mode: ViewMode) => void onOpenSettings: () => void onRefresh: () => void relayPool: RelayPool | null eventStore: IEventStore | null // Content pane readerLoading: boolean readerContent?: ReadableContent selectedUrl?: string settings: UserSettings onSaveSettings: (settings: UserSettings) => Promise onCloseSettings: () => void classifiedHighlights: Highlight[] showHighlights: boolean selectedHighlightId?: string highlightVisibility: HighlightVisibility onHighlightClick: (id: string) => void onTextSelection: (text: string) => void onClearSelection: () => void currentUserPubkey?: string followedPubkeys: Set // Highlights pane highlights: Highlight[] highlightsLoading: boolean onToggleHighlightsPanel: () => void onSelectUrl: (url: string, bookmark?: BookmarkReference) => void onToggleHighlights: (show: boolean) => void onRefreshHighlights: () => void onHighlightVisibilityChange: (visibility: HighlightVisibility) => void // Highlight button highlightButtonRef: React.RefObject onCreateHighlight: (text: string) => void hasActiveAccount: boolean // Toast toastMessage?: string toastType?: 'success' | 'error' onClearToast: () => void } const ThreePaneLayout: React.FC = (props) => { return ( <>
{props.showSettings ? ( ) : ( )}
{props.hasActiveAccount && ( )} {props.toastMessage && ( )} ) } export default ThreePaneLayout