import { createRequire as _createRequire } from 'node:module';
const require = _createRequire(import.meta.url);
import {
  executeCommand,
  log
} from "./chunk-HJXYDXED.js";
import {
  ReleaseCommand
} from "./chunk-HNIJZROR.js";
import "./chunk-6X7N6N75.js";
import "./chunk-GFXZXRO4.js";
import "./chunk-5ZI5USPK.js";
import "./chunk-VJAMKDBT.js";
import "./chunk-PSN6WZCB.js";
import "./chunk-EH63OURU.js";
import "./chunk-MK5OQBNN.js";
import "./chunk-EC7IFTLG.js";
import "./chunk-GWE3BRHX.js";
import "./chunk-657KFISY.js";
import "./chunk-OSDDOY2U.js";
import "./chunk-AKBVXZXO.js";
import {
  CliError,
  CliErrorCode,
  require_react,
  toJsonString
} from "./chunk-VCFM6SMQ.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-YOEGOFAT.js.map