import { spawn, execFile } from 'node:child_process';
import { EditorType } from '../../../domain/generated/output.js';
export class ZedLauncher {
    name = 'Zed';
    editorId = EditorType.Zed;
    binary = 'zed';
    async launch(path) {
        const child = spawn(this.binary, [path], {
            detached: true,
            stdio: 'ignore',
        });
        child.unref();
    }
    checkAvailable() {
        return new Promise((resolve) => {
            execFile('which', [this.binary], (err) => {
                resolve(!err);
            });
        });
    }
}
