import { createRequire as _createRequire } from 'node:module';
const require = _createRequire(import.meta.url);
import {
  executeCommand,
  log
} from "./chunk-IXQRKQML.js";
import {
  ReleaseCommand
} from "./chunk-K2JIVS7H.js";
import "./chunk-2QKXHQB4.js";
import "./chunk-AMTFUUHP.js";
import "./chunk-3X2VYRBF.js";
import "./chunk-AKB7SZX3.js";
import "./chunk-7LM5BPFT.js";
import "./chunk-3PES4EH3.js";
import "./chunk-X3LNVOM3.js";
import "./chunk-RUFFFFJT.js";
import "./chunk-ZR3N5INU.js";
import "./chunk-K3AHKA4U.js";
import "./chunk-EDZ42Y6V.js";
import "./chunk-LXBQAX52.js";
import {
  CliError,
  CliErrorCode,
  require_react,
  toJsonString
} from "./chunk-PVENT7M4.js";
import {
  __toESM,
  init_esm_shims
} from "./chunk-PYIAC2GK.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-CP3WXFQ7.js.map