import { createRequire as _createRequire } from 'node:module';
const require = _createRequire(import.meta.url);
import {
  executeCommand,
  log
} from "./chunk-YADAW6J5.js";
import {
  PreviewCommand
} from "./chunk-IHN2FW6R.js";
import "./chunk-5NDK4PLZ.js";
import "./chunk-DZXZ2KXA.js";
import "./chunk-GCXB5TFI.js";
import "./chunk-4MDS2GRH.js";
import "./chunk-P2IYANPF.js";
import "./chunk-IZZQD2TN.js";
import "./chunk-P7IRRCF7.js";
import "./chunk-LRQISX7S.js";
import "./chunk-VW5N5OEP.js";
import "./chunk-BUERPCXB.js";
import {
  CliError,
  CliErrorCode,
  require_react
} from "./chunk-3MAOTBCU.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-2KZIFOU5.js.map