"use strict";
/**
 * Type definitions for markdown editor feature
 *
 * @module types/markdown-editor
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_LAYOUT_STATE = exports.MAX_SPLIT_RATIO = exports.MIN_SPLIT_RATIO = exports.DEFAULT_SPLIT_RATIO = exports.FILE_SIZE_LIMITS = exports.PREVIEW_DEBOUNCE_MS = exports.LOCAL_STORAGE_KEY_MAXIMIZED = exports.LOCAL_STORAGE_KEY_SPLIT_RATIO = exports.LOCAL_STORAGE_KEY = exports.VIEW_MODE_STRATEGIES = void 0;
exports.isValidSplitRatio = isValidSplitRatio;
exports.isValidBoolean = isValidBoolean;
/**
 * View mode strategies lookup
 */
exports.VIEW_MODE_STRATEGIES = {
    split: {
        showEditor: true,
        showPreview: true,
        editorWidth: 'w-1/2',
        previewWidth: 'w-1/2',
    },
    editor: {
        showEditor: true,
        showPreview: false,
        editorWidth: 'w-full',
        previewWidth: 'w-0',
    },
    preview: {
        showEditor: false,
        showPreview: true,
        editorWidth: 'w-0',
        previewWidth: 'w-full',
    },
};
/**
 * Local storage key for view mode persistence
 */
exports.LOCAL_STORAGE_KEY = 'commandmate:md-editor-view-mode';
/**
 * Local storage key for split ratio persistence
 */
exports.LOCAL_STORAGE_KEY_SPLIT_RATIO = 'commandmate:md-editor-split-ratio';
/**
 * Local storage key for maximized state persistence
 */
exports.LOCAL_STORAGE_KEY_MAXIMIZED = 'commandmate:md-editor-maximized';
/**
 * Default debounce delay for preview updates (in milliseconds)
 */
exports.PREVIEW_DEBOUNCE_MS = 300;
/**
 * File size thresholds
 */
exports.FILE_SIZE_LIMITS = {
    /** Warning threshold (500KB) */
    WARNING_THRESHOLD: 500 * 1024,
    /** Maximum file size (1MB) */
    MAX_SIZE: 1024 * 1024,
};
/**
 * Default split ratio (50:50)
 */
exports.DEFAULT_SPLIT_RATIO = 0.5;
/**
 * Minimum split ratio (10%)
 */
exports.MIN_SPLIT_RATIO = 0.1;
/**
 * Maximum split ratio (90%)
 */
exports.MAX_SPLIT_RATIO = 0.9;
/**
 * Default editor layout state
 */
exports.DEFAULT_LAYOUT_STATE = {
    viewMode: 'split',
    isMaximized: false,
    splitRatio: exports.DEFAULT_SPLIT_RATIO,
};
/**
 * Validate split ratio value
 * @param value - Value to validate
 * @returns true if valid split ratio (0.1-0.9)
 */
function isValidSplitRatio(value) {
    return typeof value === 'number' && value >= exports.MIN_SPLIT_RATIO && value <= exports.MAX_SPLIT_RATIO;
}
/**
 * Validate boolean value from localStorage
 * @param value - Value to validate
 * @returns true if valid boolean
 */
function isValidBoolean(value) {
    return typeof value === 'boolean';
}
