import { createRequire as _createRequire } from 'node:module';
const require = _createRequire(import.meta.url);
import {
  executeCommand,
  log
} from "./chunk-R757CCGQ.js";
import {
  ReleaseCommand
} from "./chunk-IS67UOJH.js";
import "./chunk-7BXUQDFN.js";
import "./chunk-6WQ5Y5ED.js";
import "./chunk-3QFT6UQF.js";
import "./chunk-52EVQPCN.js";
import "./chunk-KIPXBXRF.js";
import "./chunk-Q7EV72HF.js";
import "./chunk-6OXUUHLF.js";
import "./chunk-MWQVV34T.js";
import "./chunk-P7IRRCF7.js";
import "./chunk-6FRZJY6S.js";
import "./chunk-DDMJ6J7I.js";
import "./chunk-ITMZKQBI.js";
import {
  CliError,
  CliErrorCode,
  require_react,
  toJsonString
} from "./chunk-ELQAJWWK.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-33TVXU5L.js.map