const LEFT_TABS = new Set(["thumbnail", "outline", "bookmarks", "layers", "attachments", "fonts"]);
export function isLeftPanelTab(tab) {
    return LEFT_TABS.has(tab);
}
/** Returns format-specific view mode defaults */
export function getFormatDefaults(format) {
    switch (format) {
        case "pdf":
        case "docx":
        case "xlsx":
            return { scrollMode: "continuous", zoomMode: "fit-spread-width-max" };
        case "pptx":
        case "image":
            return { scrollMode: "spread", zoomMode: "fit-spread" };
    }
}
/** Default zoom steps for zoom in/out actions */
export const DEFAULT_ZOOM_STEPS = [0.1, 0.25, 0.5, 0.75, 1, 1.25, 1.5, 2, 3, 4, 5];
// -----------------------------------------------------------------------------
// DPI and scaling constants
// -----------------------------------------------------------------------------
/** PDF points are defined at 72 DPI */
export const PDF_DPI = 72;
/** Default display DPI (CSS standard) */
export const DEFAULT_DPI = 96;
/** Scale factor to convert PDF points to pixels at 100% zoom */
export const POINTS_TO_PIXELS = DEFAULT_DPI / PDF_DPI; // 1.333...
/** Calculate the scale factor for a given display DPI */
export function getPointsToPixels(dpi) {
    return dpi / PDF_DPI;
}
export const initialState = {
    doc: null,
    page: 1,
    pageCount: 0,
    pageInfos: [],
    needsPassword: false,
    passwordError: null,
    isAuthenticating: false,
    outline: null,
    outlineLoading: false,
    visibilityGroups: null,
    visibilityGroupsLoading: false,
    pageAnnotations: new Map(),
    annotationsLoading: new Set(),
    pageText: new Map(),
    textLoading: new Set(),
    textFailed: new Set(),
    navigationTarget: null,
    navigationScrollAlignment: "top",
    searchScrollAlignment: "nearest",
    scrollMode: "continuous",
    layoutMode: "single-page",
    zoomMode: "fit-spread-width",
    zoom: 1,
    effectiveZoom: null,
    zoomSteps: DEFAULT_ZOOM_STEPS,
    pageRotation: 0,
    spacingMode: "all",
    dpi: DEFAULT_DPI,
    pageSpacing: 20,
    spreadSpacing: 20,
    thumbnailWidth: 150,
    activePanel: null,
    leftPanelWidth: null,
    rightPanelWidth: null,
    toolbarVisible: true,
    floatingToolbarVisible: true,
    leftPanelVisible: true,
    rightPanelVisible: true,
    disabledPanels: new Set(),
    fullscreenButtonVisible: true,
    downloadButtonVisible: true,
    printButtonVisible: true,
    theme: "light",
    themeSwitchingDisabled: false,
    textSelectionDisabled: false,
    transitionsEnabled: false,
    minZoom: DEFAULT_ZOOM_STEPS[0],
    maxZoom: DEFAULT_ZOOM_STEPS[DEFAULT_ZOOM_STEPS.length - 1],
    highlightedAnnotation: null,
    isFullscreen: false,
    searchQuery: "",
    searchCaseSensitive: false,
    searchMatches: [],
    searchActiveIndex: -1,
    searchNavGen: 0,
    searchNavScrollAlignment: null,
    searchTextLoaded: false,
    searchTextLoading: false,
    isDownloading: false,
    downloadLoaded: 0,
    downloadTotal: 0,
    isProcessing: false,
    isPrinting: false,
    printCurrentPage: 0,
    printTotalPages: 0,
    showPrintDialog: false,
    panelTransitionsDisabled: false,
};
//# sourceMappingURL=state.js.map