import React from 'react';
import { InfoMessage } from '../components/message-box.js';
import { getShutdownManager } from '../utils/shutdown/index.js';
function createExitCommand(name, description) {
    return {
        name,
        description,
        handler: (_args, _messages, _metadata) => {
            // Return InfoMessage component first, then trigger graceful shutdown
            void getShutdownManager().gracefulShutdown(0);
            return Promise.resolve(React.createElement(InfoMessage, {
                message: 'Goodbye! 👋',
                hideTitle: true,
            }));
        },
    };
}
export const exitCommand = createExitCommand('exit', 'Exit the application');
export const quitCommand = createExitCommand('quit', 'Quit the application');
//# sourceMappingURL=exit.js.map