import { createRequire as _createRequire } from 'node:module';
const require = _createRequire(import.meta.url);
import {
  executeCommand,
  log
} from "./chunk-WYHZYIAR.js";
import {
  PreviewCommand
} from "./chunk-EABE7JPU.js";
import "./chunk-IAE7KO3J.js";
import "./chunk-2XM6MT5L.js";
import "./chunk-ZSOQ5MNN.js";
import "./chunk-ZHCXET6M.js";
import "./chunk-3G4PYNJS.js";
import "./chunk-6UJZO5OI.js";
import "./chunk-ZR3N5INU.js";
import "./chunk-DOUK3ZAF.js";
import "./chunk-4NK5BDKP.js";
import "./chunk-Q22BBPPS.js";
import {
  CliError,
  CliErrorCode,
  require_react
} from "./chunk-A4MGEEM2.js";
import {
  __toESM,
  init_esm_shims
} from "./chunk-PYIAC2GK.js";

// src/non-interactive/preview.tsx
init_esm_shims();
var import_react = __toESM(require_react(), 1);
async function nonInteractivePreview(services, model, options) {
  const { baseUrl, siteId } = options;
  if (!siteId) {
    throw new CliError({
      code: CliErrorCode.SiteConfiguredRequired(),
      cause: null
    });
  }
  const version = await executeCommand(services, model, (resolve) => /* @__PURE__ */ import_react.default.createElement(
    PreviewCommand,
    {
      baseUrl,
      siteIdOverride: siteId,
      onPreviewCreated: resolve
    }
  ));
  log(JSON.stringify({ version }, null, 2));
}
export {
  nonInteractivePreview
};
//# sourceMappingURL=preview-3MVXQOGF.js.map