import { createRequire as _createRequire } from 'node:module';
const require = _createRequire(import.meta.url);
import {
  executeCommand,
  log
} from "./chunk-VYF545YB.js";
import {
  ReleaseCommand
} from "./chunk-ACB7OBCE.js";
import "./chunk-HMG4DFXD.js";
import "./chunk-SQXH36LF.js";
import "./chunk-4PYDGLO5.js";
import "./chunk-WTMAL7BB.js";
import "./chunk-U6KJH6N4.js";
import "./chunk-IROH2FJD.js";
import "./chunk-HOMQRE7V.js";
import "./chunk-7GWVUZY7.js";
import "./chunk-P7IRRCF7.js";
import "./chunk-YK7MFBWK.js";
import "./chunk-XOF7D3BV.js";
import "./chunk-LB22QT2K.js";
import {
  CliError,
  CliErrorCode,
  require_react,
  toJsonString
} from "./chunk-766KRJ2V.js";
import {
  __toESM,
  init_esm_shims
} from "./chunk-4EFJZ3GQ.js";

// src/non-interactive/release.tsx
init_esm_shims();
var import_react = __toESM(require_react(), 1);
async function nonInteractiveRelease(services, model, releaseProps) {
  const { preEnteredComment, preSelectedVersionType } = releaseProps;
  if (!preSelectedVersionType) {
    throw new CliError({
      code: CliErrorCode.InsufficientNonInterractiveReleaseParameters(),
      cause: null
    });
  }
  const version = await executeCommand(services, model, (resolve) => /* @__PURE__ */ import_react.default.createElement(
    ReleaseCommand,
    {
      ...releaseProps,
      preEnteredComment: preEnteredComment ?? "",
      onReleaseDraftCreated: (version2) => {
        resolve(version2);
      }
    }
  ));
  log(toJsonString({ version }, { spaces: 2 }).trimEnd());
}
export {
  nonInteractiveRelease
};
//# sourceMappingURL=release-4KDRTKBC.js.map