import { TaonBaseClass } from 'taon/lib';
import { _ } from 'tnp-core/lib';
export class BaseCliWorkerConfigGetContextOptions {
}
/**
 * Default mode: DETACHED_CHILD_PROCESS
 */
export var BaseCLiWorkerStartMode;
(function (BaseCLiWorkerStartMode) {
    BaseCLiWorkerStartMode["CHILD_PROCESS"] = "child";
    BaseCLiWorkerStartMode["IN_CURRENT_PROCESS"] = "process";
    BaseCLiWorkerStartMode["DETACHED_WINDOW"] = "window";
})(BaseCLiWorkerStartMode || (BaseCLiWorkerStartMode = {}));
export class BaseCLiWorkerStartParams {
}
export class BaseCliMethodOptions extends TaonBaseClass {
    static from(opt) {
        opt = opt ?? {};
        opt.cliParams = opt.cliParams ?? {};
        opt.connectionOptions = opt.connectionOptions ?? {};
        const res = new BaseCliMethodOptions().clone(opt);
        res.cliParams = _.merge(new BaseCLiWorkerStartParams(), opt.cliParams);
        res.cliParams.mode =
            res.cliParams.mode || BaseCLiWorkerStartMode.CHILD_PROCESS;
        res.connectionOptions = _.merge(new BaseCliWorkerConfigGetContextOptions(), opt.connectionOptions);
        return res;
    }
}
//# sourceMappingURL=base-cli-worker.models.js.map