import { enableAutostart, disableAutostart, autostartStatus } from "../../services/autostart.js";
/**
 * Handle the `pocketcoder enable-autostart` CLI command.
 * Configures platform-specific automatic startup on login.
 */
export async function enableAutostartCommand() {
    try {
        const result = await enableAutostart();
        console.log(result);
    }
    catch (err) {
        const message = err instanceof Error ? err.message : String(err);
        console.error(`Failed to enable autostart: ${message}`);
        process.exitCode = 1;
    }
}
/**
 * Handle the `pocketcoder disable-autostart` CLI command.
 * Removes platform-specific autostart configuration.
 */
export async function disableAutostartCommand() {
    try {
        const result = await disableAutostart();
        console.log(result);
    }
    catch (err) {
        const message = err instanceof Error ? err.message : String(err);
        console.error(`Failed to disable autostart: ${message}`);
        process.exitCode = 1;
    }
}
/**
 * Handle the `pocketcoder autostart-status` CLI command.
 * Shows whether autostart is currently configured.
 */
export async function autostartStatusCommand() {
    try {
        const result = await autostartStatus();
        console.log(result);
    }
    catch (err) {
        const message = err instanceof Error ? err.message : String(err);
        console.error(`Failed to check autostart status: ${message}`);
        process.exitCode = 1;
    }
}
//# sourceMappingURL=autostart.js.map