import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { Box, Text, useInput } from 'ink';
import BigText from 'ink-big-text';
import Gradient from 'ink-gradient';
import SelectInput from 'ink-select-input';
import { useMemo, useState } from 'react';
import { StyledSelectInput } from '../../components/ui/styled-select-input.js';
import { TitledBoxWithPreferences } from '../../components/ui/titled-box.js';
import { getCompactToolDisplay, getNanocoderShape, getNotificationsPreference, getPasteThreshold, getReasoningExpanded, updateCompactToolDisplay, updateNanocoderShape, updateNotificationsPreference, updatePasteThreshold, updateReasoningExpanded, updateSelectedTheme, } from '../../config/preferences.js';
import { getThemeColors, themes } from '../../config/themes.js';
import { useResponsiveTerminal } from '../../hooks/useTerminalWidth.js';
import { useTheme } from '../../hooks/useTheme.js';
import { useTitleShape } from '../../hooks/useTitleShape.js';
import { setNotificationsConfig } from '../../utils/notifications.js';
import { DEFAULT_SINGLE_LINE_PASTE_THRESHOLD } from '../../utils/paste-utils.js';
// Main settings menu
function SettingsMainMenu({ onSelect, onCancel, }) {
    const { colors } = useTheme();
    const { boxWidth, isNarrow } = useResponsiveTerminal();
    const items = [
        {
            label: 'Theme',
            value: 'theme',
            description: 'Change color scheme',
        },
        {
            label: 'Title Shape',
            value: 'title-shape',
            description: 'Customize box title styles',
        },
        {
            label: 'Nanocoder Shape',
            value: 'nanocoder-shape',
            description: 'Change welcome banner font',
        },
        {
            label: 'Paste Threshold',
            value: 'paste-threshold',
            description: 'Set single-line paste character limit',
        },
        {
            label: 'Notifications',
            value: 'notifications',
            description: 'Desktop notification preferences',
        },
        {
            label: 'Tool Results and Thinking',
            value: 'display-settings',
            description: 'Set defaults for model thoughts and tool results',
        },
        {
            label: 'Done',
            value: 'done',
            description: 'Exit settings',
        },
    ];
    useInput((_input, key) => {
        if (key.escape) {
            onCancel();
        }
    });
    // Narrow terminal: simplified layout (matches Status component pattern)
    if (isNarrow) {
        return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, borderStyle: "round", borderColor: colors.primary, paddingY: 1, paddingX: 2, width: "100%", children: [_jsx(Text, { color: colors.primary, bold: true, children: "Settings" }), _jsx(Text, { color: colors.text, children: " " }), _jsx(StyledSelectInput, { items: items.map(item => ({
                        label: item.label,
                        value: item.value,
                    })), onSelect: item => {
                        if (item.value === 'done') {
                            onCancel();
                        }
                        else {
                            onSelect(item.value);
                        }
                    } }), _jsx(Box, { marginBottom: 1 }), _jsx(Text, { color: colors.secondary, children: "Enter/Esc" })] }));
    }
    return (_jsxs(TitledBoxWithPreferences, { title: "Settings", width: boxWidth, borderColor: colors.primary, paddingX: 1, paddingY: 1, flexDirection: "column", children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: colors.secondary, children: "Select a setting to configure:" }) }), _jsx(StyledSelectInput, { items: items.map(item => ({
                    label: `${item.label} - ${item.description}`,
                    value: item.value,
                })), onSelect: item => {
                    if (item.value === 'done') {
                        onCancel();
                    }
                    else {
                        onSelect(item.value);
                    }
                } }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: colors.secondary, children: "Enter to select, Esc to exit" }) })] }));
}
function ThemePreviewMessage({ accentColor, baseColor, children, compact = false, }) {
    return (_jsx(Box, { flexDirection: "column", backgroundColor: baseColor, paddingX: 2, paddingY: compact ? 0 : 1, borderStyle: "bold", borderLeft: true, borderRight: false, borderTop: false, borderBottom: false, borderLeftColor: accentColor, children: children }));
}
function ThemeMiniPreview({ colors, compact = false, }) {
    return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Box, { flexDirection: "column", marginBottom: compact ? 0 : 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: colors.primary, bold: true, children: "You:" }) }), _jsx(ThemePreviewMessage, { accentColor: colors.primary, baseColor: colors.base, compact: compact, children: _jsx(Text, { color: colors.text, children: "Refactor this function and show the diff." }) })] }), _jsxs(Box, { flexDirection: "column", marginBottom: compact ? 0 : 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: colors.info, bold: true, children: "Nanocoder:" }) }), _jsx(ThemePreviewMessage, { accentColor: colors.secondary, baseColor: colors.base, compact: compact, children: _jsx(Text, { color: colors.text, children: "I'll inspect the file and make a safe change." }) })] }), _jsxs(Box, { flexDirection: "column", marginBottom: compact ? 0 : 1, children: [_jsx(Text, { color: colors.tool, children: "\u2692 read_file source/app.tsx" }), _jsx(Text, { color: colors.success, children: "\u2692 Completed successfully" }), !compact && (_jsx(Text, { color: colors.warning, children: "\u26A0 Review generated changes before commit" }))] }), _jsxs(Box, { flexDirection: "column", marginTop: compact ? 0 : 1, children: [_jsxs(Box, { children: [_jsx(Text, { color: colors.secondary, children: "1 " }), _jsx(Text, { bold: true, underline: true, backgroundColor: colors.diffRemoved, color: colors.diffRemovedText, children: "- return theme;" })] }), _jsxs(Box, { children: [_jsx(Text, { color: colors.secondary, children: "2 " }), _jsx(Text, { bold: true, underline: true, backgroundColor: colors.diffAdded, color: colors.diffAddedText, children: "+ return formatTheme(theme);" })] })] })] }));
}
// Theme settings panel
function SettingsThemePanel({ onBack, onCancel, }) {
    const { boxWidth, isNarrow } = useResponsiveTerminal();
    const { currentTheme, setCurrentTheme } = useTheme();
    const [originalTheme] = useState(currentTheme);
    const themeList = Object.values(themes);
    const [currentIndex, setCurrentIndex] = useState(() => {
        const index = themeList.findIndex(theme => theme.name === currentTheme);
        return index >= 0 ? index : 0;
    });
    // Preview theme is the one being browsed (for UI only)
    const previewTheme = themeList[currentIndex];
    // Get the colors for the preview theme
    const previewColors = getThemeColors(previewTheme.name);
    useInput((input, key) => {
        if (key.escape) {
            onCancel();
        }
        if (key.shift && key.tab) {
            onBack();
        }
        if (key.upArrow) {
            setCurrentIndex(prev => (prev > 0 ? prev - 1 : themeList.length - 1));
        }
        if (key.downArrow) {
            setCurrentIndex(prev => (prev < themeList.length - 1 ? prev + 1 : 0));
        }
        if (key.return) {
            // Only save to preferences on Enter
            setCurrentTheme(previewTheme.name);
            updateSelectedTheme(previewTheme.name);
            onBack();
        }
    });
    const themeName = `${previewTheme.displayName} [${currentIndex + 1}/${themeList.length}]`;
    const isCurrentTheme = previewTheme.name === originalTheme;
    // Narrow terminal: simplified layout
    if (isNarrow) {
        return (_jsxs(TitledBoxWithPreferences, { title: "Theme", width: "100%", borderColor: previewColors.primary, paddingX: 2, paddingY: 1, flexDirection: "column", marginBottom: 1, children: [_jsxs(Text, { color: previewColors.primary, children: [isCurrentTheme ? '* ' : '', themeName] }), _jsx(ThemeMiniPreview, { colors: previewColors, compact: true }), _jsx(Box, { marginBottom: 1 }), _jsx(Text, { color: previewColors.secondary, children: "\u2191\u2193 navigate \u00B7 Enter select \u00B7 Esc exit" })] }));
    }
    return (_jsxs(TitledBoxWithPreferences, { title: "Theme", width: boxWidth, borderColor: previewColors.primary, paddingX: 2, paddingY: 1, flexDirection: "column", marginBottom: 1, children: [_jsxs(Text, { color: previewColors.primary, bold: true, children: [isCurrentTheme ? '* ' : '', themeName] }), _jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: previewColors.secondary, children: "\u2191\u2193 navigate \u00B7 Enter apply \u00B7 Shift+Tab back \u00B7 Esc exit" }) }), _jsx(ThemeMiniPreview, { colors: previewColors })] }));
}
// Title Shape settings panel
function SettingsTitleShapePanel({ onBack, onCancel, }) {
    const { boxWidth, isNarrow } = useResponsiveTerminal();
    const { colors } = useTheme();
    const { currentTitleShape, setCurrentTitleShape } = useTitleShape();
    const [originalShape] = useState(currentTitleShape);
    useInput((_, key) => {
        if (key.escape) {
            setCurrentTitleShape(originalShape);
            onCancel();
        }
        if (key.shift && key.tab) {
            setCurrentTitleShape(originalShape);
            onBack();
        }
    });
    const shapeOptions = isNarrow
        ? [
            { label: 'Pill', value: 'pill' },
            { label: 'Rounded', value: 'rounded' },
            { label: 'Square', value: 'square' },
            { label: 'Double', value: 'double' },
            { label: 'Arrow Left', value: 'arrow-left' },
            { label: 'Arrow Right', value: 'arrow-right' },
            { label: 'Arrow Double', value: 'arrow-double' },
            { label: 'Angled Box', value: 'angled-box' },
            { label: 'PL Angled', value: 'powerline-angled' },
            { label: 'PL Angled Thin', value: 'powerline-angled-thin' },
            { label: 'PL Block', value: 'powerline-block' },
            { label: 'PL Block Alt', value: 'powerline-block-alt' },
            { label: 'PL Curved', value: 'powerline-curved' },
            { label: 'PL Curved Thin', value: 'powerline-curved-thin' },
            { label: 'PL Flame', value: 'powerline-flame' },
            { label: 'PL Flame Thin', value: 'powerline-flame-thin' },
            { label: 'PL Graph', value: 'powerline-graph' },
            { label: 'PL Ribbon', value: 'powerline-ribbon' },
            { label: 'PL Segment', value: 'powerline-segment' },
            { label: 'PL Segment Thin', value: 'powerline-segment-thin' },
        ]
        : [
            { label: 'Pill :- Demo Title', value: 'pill' },
            { label: 'Rounded :- ╭ Demo Title ╮', value: 'rounded' },
            { label: 'Square :- ┌ Demo Title ┐', value: 'square' },
            { label: 'Double :- ╔ Demo Title ╗', value: 'double' },
            { label: 'Arrow Left :- ← Demo Title →', value: 'arrow-left' },
            { label: 'Arrow Right :- → Demo Title ←', value: 'arrow-right' },
            { label: 'Arrow Double :- « Demo Title »', value: 'arrow-double' },
            { label: 'Angled Box :- ╱ Demo Title ╲', value: 'angled-box' },
            {
                label: 'Powerline Angled (Nerd Fonts)',
                value: 'powerline-angled',
            },
            {
                label: 'Powerline Angled Thin (Nerd Fonts)',
                value: 'powerline-angled-thin',
            },
            {
                label: 'Powerline Block (Nerd Fonts)',
                value: 'powerline-block',
            },
            {
                label: 'Powerline Block Alt (Nerd Fonts)',
                value: 'powerline-block-alt',
            },
            {
                label: 'Powerline Curved (Nerd Fonts)',
                value: 'powerline-curved',
            },
            {
                label: 'Powerline Curved Thin (Nerd Fonts)',
                value: 'powerline-curved-thin',
            },
            {
                label: 'Powerline Flame (Nerd Fonts)',
                value: 'powerline-flame',
            },
            {
                label: 'Powerline Flame Thin (Nerd Fonts)',
                value: 'powerline-flame-thin',
            },
            {
                label: 'Powerline Graph (Nerd Fonts)',
                value: 'powerline-graph',
            },
            {
                label: 'Powerline Ribbon (Nerd Fonts)',
                value: 'powerline-ribbon',
            },
            {
                label: 'Powerline Segment (Nerd Fonts)',
                value: 'powerline-segment',
            },
            {
                label: 'Powerline Segment Thin (Nerd Fonts)',
                value: 'powerline-segment-thin',
            },
        ];
    const initialIndex = useMemo(() => {
        const index = shapeOptions.findIndex(option => option.value === originalShape);
        return index >= 0 ? index : 0;
    }, [originalShape, shapeOptions]);
    const handleSelect = (item) => {
        setCurrentTitleShape(item.value);
        onBack();
    };
    const handleHighlight = (item) => {
        setCurrentTitleShape(item.value);
    };
    // Narrow terminal: use TitledBoxWithPreferences to preview shape changes
    if (isNarrow) {
        return (_jsxs(TitledBoxWithPreferences, { title: "Title Shapes", width: "100%", borderColor: colors.primary, paddingX: 2, paddingY: 1, flexDirection: "column", marginBottom: 1, children: [_jsx(SelectInput, { items: shapeOptions, initialIndex: initialIndex, onSelect: handleSelect, onHighlight: handleHighlight }), _jsx(Box, { marginBottom: 1 }), _jsx(Text, { color: colors.secondary, children: "Enter/Shift+Tab/Esc" })] }));
    }
    return (_jsxs(TitledBoxWithPreferences, { title: "Choose your title shape", width: boxWidth, borderColor: colors.primary, paddingX: 2, paddingY: 1, flexDirection: "column", marginBottom: 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: colors.secondary, children: "Enter to apply, Shift+Tab to go back, Esc to exit" }) }), _jsx(SelectInput, { items: shapeOptions, initialIndex: initialIndex, onSelect: handleSelect, onHighlight: handleHighlight })] }));
}
// Nanocoder Shape settings panel
function SettingsNanocoderShapePanel({ onBack, onCancel, }) {
    const { boxWidth, isNarrow } = useResponsiveTerminal();
    const { colors } = useTheme();
    const savedShape = getNanocoderShape();
    const initialShape = savedShape ?? 'tiny';
    const [originalShape] = useState(initialShape);
    const [previewShape, setPreviewShape] = useState(initialShape);
    useInput((_, key) => {
        if (key.escape) {
            onCancel();
        }
        if (key.shift && key.tab) {
            onBack();
        }
    });
    const shapeOptions = useMemo(() => [
        { label: 'Tiny (default)', value: 'tiny' },
        { label: 'Block', value: 'block' },
        { label: 'Simple', value: 'simple' },
        { label: 'Simple Block', value: 'simpleBlock' },
        { label: 'Slick', value: 'slick' },
        { label: 'Grid', value: 'grid' },
        { label: 'Pallet', value: 'pallet' },
        { label: 'Shade', value: 'shade' },
        { label: '3D', value: '3d' },
        { label: 'Simple 3D', value: 'simple3d' },
        { label: 'Chrome', value: 'chrome' },
        { label: 'Huge', value: 'huge' },
    ], []);
    const initialIndex = useMemo(() => {
        const index = shapeOptions.findIndex(option => option.value === originalShape);
        return index >= 0 ? index : 0;
    }, [originalShape, shapeOptions]);
    const handleSelect = (item) => {
        updateNanocoderShape(item.value);
        onBack();
    };
    const handleHighlight = (item) => {
        setPreviewShape(item.value);
    };
    const displayText = isNarrow ? 'NC' : 'Nanocoder';
    // Narrow terminal: simplified layout with BigText outside box
    if (isNarrow) {
        return (_jsxs(_Fragment, { children: [_jsx(Gradient, { colors: [colors.primary, colors.tool], children: _jsx(BigText, { text: displayText, font: previewShape }) }), _jsxs(TitledBoxWithPreferences, { title: "Nanocoder Shape", width: "100%", borderColor: colors.primary, paddingX: 2, paddingY: 1, flexDirection: "column", marginBottom: 1, children: [_jsx(SelectInput, { items: shapeOptions, initialIndex: initialIndex, onSelect: handleSelect, onHighlight: handleHighlight }), _jsx(Box, { marginBottom: 1 }), _jsx(Text, { color: colors.secondary, children: "Enter/Shift+Tab/Esc" })] })] }));
    }
    return (_jsxs(_Fragment, { children: [_jsx(Box, { marginBottom: 1, children: _jsx(Gradient, { colors: [colors.primary, colors.tool], children: _jsx(BigText, { text: displayText, font: previewShape }) }) }), _jsxs(TitledBoxWithPreferences, { title: "Choose your branding style", width: boxWidth, borderColor: colors.primary, paddingX: 2, paddingY: 1, flexDirection: "column", marginBottom: 1, children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: colors.secondary, children: "Enter to apply, Shift+Tab to go back, Esc to exit" }) }), _jsx(SelectInput, { items: shapeOptions, initialIndex: initialIndex, onSelect: handleSelect, onHighlight: handleHighlight })] })] }));
}
// Paste Threshold settings panel
function SettingsPasteThresholdPanel({ onBack, onCancel, }) {
    const { boxWidth, isNarrow } = useResponsiveTerminal();
    const { colors } = useTheme();
    const currentThreshold = getPasteThreshold() ?? DEFAULT_SINGLE_LINE_PASTE_THRESHOLD;
    const thresholdOptions = useMemo(() => [
        { label: '200', value: 200 },
        { label: '400', value: 400 },
        { label: '600', value: 600 },
        { label: `800 (default)`, value: 800 },
        { label: '1000', value: 1000 },
        { label: '1500', value: 1500 },
        { label: '2000', value: 2000 },
        { label: '5000', value: 5000 },
    ], []);
    const initialIndex = useMemo(() => {
        const index = thresholdOptions.findIndex(option => option.value === currentThreshold);
        return index >= 0 ? index : 3; // default to 800
    }, [currentThreshold, thresholdOptions]);
    useInput((_, key) => {
        if (key.escape) {
            onCancel();
        }
        if (key.shift && key.tab) {
            onBack();
        }
    });
    const handleSelect = (item) => {
        updatePasteThreshold(item.value);
        onBack();
    };
    const title = isNarrow
        ? 'Paste Threshold'
        : 'Set paste threshold (characters)';
    return (_jsxs(TitledBoxWithPreferences, { title: title, width: isNarrow ? '100%' : boxWidth, borderColor: colors.primary, paddingX: 2, paddingY: 1, flexDirection: "column", marginBottom: 1, children: [!isNarrow && (_jsx(Box, { marginBottom: 1, children: _jsxs(Text, { color: colors.secondary, children: ["Single-line pastes above this limit become placeholders. Current:", ' ', currentThreshold, " chars"] }) })), isNarrow && (_jsxs(Text, { color: colors.secondary, children: ["Current: ", currentThreshold] })), _jsx(SelectInput, { items: thresholdOptions.map(opt => ({
                    label: opt.value === currentThreshold
                        ? isNarrow
                            ? `${opt.label} *`
                            : `${opt.label} (current)`
                        : opt.label,
                    value: opt.value,
                })), initialIndex: initialIndex, onSelect: handleSelect }), _jsx(Box, { marginTop: isNarrow ? 0 : 1, children: _jsx(Text, { color: colors.secondary, children: isNarrow
                        ? 'Enter/Shift+Tab/Esc'
                        : 'Enter to apply, Shift+Tab to go back, Esc to exit' }) })] }));
}
// Notifications settings panel
function SettingsNotificationsPanel({ onBack, onCancel, }) {
    const { boxWidth, isNarrow } = useResponsiveTerminal();
    const { colors } = useTheme();
    const saved = getNotificationsPreference();
    const [config, setConfig] = useState(saved ?? {
        enabled: false,
        sound: false,
        events: {
            toolConfirmation: true,
            questionPrompt: true,
            generationComplete: true,
        },
    });
    useInput((_, key) => {
        if (key.escape) {
            onCancel();
        }
        if (key.shift && key.tab) {
            onBack();
        }
    });
    const items = useMemo(() => {
        const isOn = (val) => (val ? 'ON' : 'OFF');
        return [
            {
                label: `Notifications: ${isOn(config.enabled)}`,
                value: 'enabled',
            },
            {
                label: `  Sound: ${isOn(config.sound)}`,
                value: 'sound',
            },
            {
                label: `  Tool Confirmation: ${isOn(config.events?.toolConfirmation)}`,
                value: 'toolConfirmation',
            },
            {
                label: `  Question Prompt: ${isOn(config.events?.questionPrompt)}`,
                value: 'questionPrompt',
            },
            {
                label: `  Generation Complete: ${isOn(config.events?.generationComplete)}`,
                value: 'generationComplete',
            },
        ];
    }, [config]);
    const handleSelect = (item) => {
        const next = { ...config };
        if (item.value === 'enabled') {
            next.enabled = !next.enabled;
        }
        else if (item.value === 'sound') {
            next.sound = !next.sound;
        }
        else {
            next.events = { ...next.events, [item.value]: !next.events?.[item.value] };
        }
        setConfig(next);
        updateNotificationsPreference(next);
        setNotificationsConfig(next);
    };
    const title = isNarrow ? 'Notifications' : 'Desktop Notifications';
    return (_jsxs(TitledBoxWithPreferences, { title: title, width: isNarrow ? '100%' : boxWidth, borderColor: colors.primary, paddingX: 2, paddingY: 1, flexDirection: "column", marginBottom: 1, children: [!isNarrow && (_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: colors.secondary, children: "Toggle settings with Enter. Shift+Tab to go back, Esc to exit" }) })), _jsx(StyledSelectInput, { items: items, onSelect: handleSelect }), isNarrow && (_jsx(Box, { marginTop: 0, children: _jsx(Text, { color: colors.secondary, children: "Enter/Shift+Tab/Esc" }) }))] }));
}
// Display settings panel
function SettingsDisplayPanel({ onBack, onCancel, }) {
    const { boxWidth, isNarrow } = useResponsiveTerminal();
    const { colors } = useTheme();
    const currentReasoningExpanded = getReasoningExpanded();
    const currentCompactToolDisplay = getCompactToolDisplay();
    useInput((_, key) => {
        if (key.escape) {
            onCancel();
        }
        if (key.shift && key.tab) {
            onBack();
        }
    });
    const items = useMemo(() => {
        const isOn = (val) => (val ? 'ON' : 'OFF');
        return [
            {
                label: `Show Thinking by default: ${isOn(currentReasoningExpanded)}`,
                value: 'reasoningExpanded',
            },
            {
                label: `Expand Tool Results by default: ${isOn(currentCompactToolDisplay)}`,
                value: 'compactToolDisplay',
            },
        ];
    }, [currentReasoningExpanded, currentCompactToolDisplay]);
    const handleSelect = (item) => {
        if (item.value === 'reasoningExpanded') {
            const newValue = !currentReasoningExpanded;
            updateReasoningExpanded(newValue);
        }
        else if (item.value === 'compactToolDisplay') {
            const newValue = !currentCompactToolDisplay;
            updateCompactToolDisplay(newValue);
        }
        onBack();
    };
    const title = isNarrow ? 'Display' : 'Display Settings';
    return (_jsxs(TitledBoxWithPreferences, { title: title, width: isNarrow ? '100%' : boxWidth, borderColor: colors.primary, paddingX: 2, paddingY: 1, flexDirection: "column", marginBottom: 1, children: [!isNarrow && (_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: colors.secondary, children: "Toggle settings with Enter. Shift+Tab to go back, Esc to exit" }) })), _jsx(StyledSelectInput, { items: items, onSelect: handleSelect }), isNarrow && (_jsx(Box, { marginTop: 0, children: _jsx(Text, { color: colors.secondary, children: "Enter/Shift+Tab/Esc" }) }))] }));
}
// Main settings selector with step navigation
export function SettingsSelector({ onCancel }) {
    const [step, setStep] = useState('main');
    switch (step) {
        case 'main':
            return _jsx(SettingsMainMenu, { onSelect: setStep, onCancel: onCancel });
        case 'theme':
            return (_jsx(SettingsThemePanel, { onBack: () => setStep('main'), onCancel: onCancel }));
        case 'title-shape':
            return (_jsx(SettingsTitleShapePanel, { onBack: () => setStep('main'), onCancel: onCancel }));
        case 'nanocoder-shape':
            return (_jsx(SettingsNanocoderShapePanel, { onBack: () => setStep('main'), onCancel: onCancel }));
        case 'paste-threshold':
            return (_jsx(SettingsPasteThresholdPanel, { onBack: () => setStep('main'), onCancel: onCancel }));
        case 'notifications':
            return (_jsx(SettingsNotificationsPanel, { onBack: () => setStep('main'), onCancel: onCancel }));
        case 'display-settings':
            return (_jsx(SettingsDisplayPanel, { onBack: () => setStep('main'), onCancel: onCancel }));
    }
}
//# sourceMappingURL=settings-selector.js.map