import { createRequire as _createRequire } from 'node:module';
const require = _createRequire(import.meta.url);
import {
  executeCommand,
  log
} from "./chunk-HZRR55O6.js";
import {
  PreviewCommand
} from "./chunk-2C46UXV3.js";
import "./chunk-YLGWO3AM.js";
import "./chunk-QBRIDBYB.js";
import "./chunk-LZ4AU27B.js";
import "./chunk-7YSL7XU7.js";
import "./chunk-V2MHHSRR.js";
import "./chunk-37V57F6S.js";
import "./chunk-GWE3BRHX.js";
import "./chunk-MXJB23DQ.js";
import "./chunk-OAQNC62W.js";
import "./chunk-QNKJT2WR.js";
import {
  CliError,
  CliErrorCode,
  require_react
} from "./chunk-HPSJVSZT.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-MM4FR3B3.js.map