import { createRequire as _createRequire } from 'node:module';
const require = _createRequire(import.meta.url);
import {
  executeCommand,
  log
} from "./chunk-BF2CCJUT.js";
import {
  ReleaseCommand
} from "./chunk-RLHA3UAH.js";
import "./chunk-Q7LNEGNO.js";
import "./chunk-KWB3327X.js";
import "./chunk-ZHQREOZP.js";
import "./chunk-D6P2B2RR.js";
import "./chunk-UJBOMZKS.js";
import "./chunk-7XUJK7BC.js";
import "./chunk-GCZRVTB7.js";
import "./chunk-X6TKNDXI.js";
import "./chunk-GWE3BRHX.js";
import "./chunk-Q7CP2YC6.js";
import "./chunk-CFOD3ZLE.js";
import "./chunk-72D56F6B.js";
import {
  CliError,
  CliErrorCode,
  require_react,
  toJsonString
} from "./chunk-WC3XAEDD.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-LCQLEXIR.js.map