export class QueryStatusUseCase {
    deps;
    constructor(deps) {
        this.deps = deps;
    }
    execute() {
        const pidContent = this.deps.readPidFile();
        if (!pidContent) {
            return { status: 'stopped' };
        }
        if (!this.deps.isProcessRunning(pidContent.pid)) {
            this.deps.removePidFile();
            return { status: 'stopped' };
        }
        return {
            status: 'running',
            pid: pidContent.pid,
            port: pidContent.port,
            startedAt: pidContent.startedAt,
        };
    }
}
//# sourceMappingURL=queryStatus.usecase.js.map