import { createRequire as _createRequire } from 'node:module';
const require = _createRequire(import.meta.url);
import {
  executeCommand,
  log
} from "./chunk-VDQEUTFT.js";
import {
  ReleaseCommand
} from "./chunk-LQZSH33G.js";
import "./chunk-QQ4OBBX7.js";
import "./chunk-UJ4SA2PC.js";
import "./chunk-ZHQREOZP.js";
import "./chunk-GNL53AZS.js";
import "./chunk-KHUHWBJD.js";
import "./chunk-FWRUE2NB.js";
import "./chunk-JYZ5QJ5C.js";
import "./chunk-DK2KK5UN.js";
import "./chunk-GWE3BRHX.js";
import "./chunk-IIF6P6XG.js";
import "./chunk-PREYTA74.js";
import "./chunk-NJXD2TTX.js";
import {
  CliError,
  CliErrorCode,
  require_react,
  toJsonString
} from "./chunk-ESTYQVMX.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-RFFKID6V.js.map