/**
 * /mog slash command handler.
 *
 * Toggles the Mog headless spreadsheet engine on or off.
 * Requires a restart to take effect.
 */
export async function handleMogCommand(showStatus, select, settingsManager, policy = {}) {
    const current = settingsManager.getNewSheet();
    const menuOptions = [
        current ? 'Enable (current)' : 'Enable',
        current ? 'Disable' : 'Disable (current)',
        'Cancel'
    ];
    const choice = await select('Mog Spreadsheet Engine', menuOptions);
    if (!choice || choice === 'Cancel')
        return true;
    const enable = choice.startsWith('Enable');
    if (enable && !current && policy.enableDisabledReason) {
        showStatus(policy.enableDisabledReason);
        return true;
    }
    if (enable !== current) {
        settingsManager.setNewSheet(enable);
        const suffix = policy.forceEnabled ? ' (forced by SHORTCUT_NEW_SHEET)' : '';
        showStatus(`Mog ${enable ? 'enabled' : 'disabled'}${suffix} — restart session to take effect`);
    }
    return true;
}
//# sourceMappingURL=mog-command.js.map