import { createRequire as _createRequire } from 'node:module';
const require = _createRequire(import.meta.url);
import {
  executeCommand,
  log
} from "./chunk-SJ252KGM.js";
import {
  ReleaseCommand
} from "./chunk-WKCUWBW2.js";
import "./chunk-AXIU7D45.js";
import "./chunk-UFMEB6C3.js";
import "./chunk-VJQHGLIW.js";
import "./chunk-2XV2WEJF.js";
import "./chunk-SGL2GW25.js";
import "./chunk-DJF3WM6T.js";
import "./chunk-XMB66R6L.js";
import "./chunk-FFQKHYQV.js";
import "./chunk-P7IRRCF7.js";
import "./chunk-EYVDXBYU.js";
import "./chunk-DPOKEVYO.js";
import "./chunk-GLRWNQCR.js";
import {
  CliError,
  CliErrorCode,
  require_react,
  toJsonString
} from "./chunk-NBSLOOJ5.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-RZIISEMQ.js.map