import { createRequire as _createRequire } from 'node:module';
const require = _createRequire(import.meta.url);
import {
  executeCommand,
  log
} from "./chunk-YADAW6J5.js";
import {
  ReleaseCommand
} from "./chunk-EV4PGVTA.js";
import "./chunk-IHN2FW6R.js";
import "./chunk-5NDK4PLZ.js";
import "./chunk-DZXZ2KXA.js";
import "./chunk-GCXB5TFI.js";
import "./chunk-4MDS2GRH.js";
import "./chunk-UORYURJB.js";
import "./chunk-P2IYANPF.js";
import "./chunk-IZZQD2TN.js";
import "./chunk-P7IRRCF7.js";
import "./chunk-LRQISX7S.js";
import "./chunk-VW5N5OEP.js";
import "./chunk-BUERPCXB.js";
import {
  CliError,
  CliErrorCode,
  require_react,
  toJsonString
} from "./chunk-3MAOTBCU.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-PVNTYCVR.js.map