import { createRequire as _createRequire } from 'node:module';
const require = _createRequire(import.meta.url);
import {
  executeCommand,
  log
} from "./chunk-AI5QEOWV.js";
import {
  PreviewCommand
} from "./chunk-LOFEDPQQ.js";
import "./chunk-Y4ZNGR2E.js";
import "./chunk-4PYDGLO5.js";
import "./chunk-44QES6WV.js";
import "./chunk-55VAR4ZF.js";
import "./chunk-M2HWGRZ6.js";
import "./chunk-D5VSKJX4.js";
import "./chunk-GWE3BRHX.js";
import "./chunk-JGTPSHBA.js";
import "./chunk-PM5KYXD2.js";
import "./chunk-4SVKU2EF.js";
import {
  CliError,
  CliErrorCode,
  require_react
} from "./chunk-EUAUZCCH.js";
import {
  __toESM,
  init_esm_shims
} from "./chunk-4EFJZ3GQ.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 data = await executeCommand(services, model, (resolve) => /* @__PURE__ */ import_react.default.createElement(
    PreviewCommand,
    {
      baseUrl,
      siteIdOverride: siteId,
      onPreviewCreated: resolve
    }
  ));
  log(JSON.stringify({ version: data.armTag }, null, 2));
}
export {
  nonInteractivePreview
};
//# sourceMappingURL=preview-VMB53A77.js.map