import { createRequire as _createRequire } from 'node:module';
const require = _createRequire(import.meta.url);
import {
  executeCommand
} from "./chunk-LLHBMTXU.js";
import {
  log
} from "./chunk-35LXVE2A.js";
import {
  PreviewCommand
} from "./chunk-FYSBORKA.js";
import "./chunk-4LXQCSMI.js";
import "./chunk-BQGAAIC6.js";
import "./chunk-VKQEX5GC.js";
import "./chunk-ZY7YHRZR.js";
import "./chunk-DLEBD2WZ.js";
import "./chunk-RTNIG6ZW.js";
import "./chunk-O6HC4AYN.js";
import "./chunk-QRGKMYDD.js";
import "./chunk-M6WJXTS4.js";
import "./chunk-FEA7FYAB.js";
import "./chunk-RF4NA2OH.js";
import "./chunk-NMCF7XG5.js";
import "./chunk-MHV22UIU.js";
import "./chunk-RDF2RA4E.js";
import "./chunk-AAUVYJJT.js";
import "./chunk-K6JLY75P.js";
import "./chunk-WFQIXGJV.js";
import "./chunk-ECBO3UFC.js";
import "./chunk-YNEGRO3E.js";
import "./chunk-VC5Q2AI5.js";
import "./chunk-HWT3LUJJ.js";
import "./chunk-TOBTRYZF.js";
import "./chunk-7WVNO7VU.js";
import "./chunk-RPTAJN5Y.js";
import "./chunk-YL4347CI.js";
import {
  require_react
} from "./chunk-TODKQSCF.js";
import "./chunk-AFPDHQYI.js";
import "./chunk-HYKBBZLS.js";
import "./chunk-C5RTKQVL.js";
import "./chunk-SVUXJRFD.js";
import "./chunk-YT5BPQDJ.js";
import "./chunk-LU3R3EBR.js";
import "./chunk-XZUGLEBK.js";
import "./chunk-VASURI4S.js";
import "./chunk-SDLCFZRL.js";
import "./chunk-MTT3QXBC.js";
import {
  __toESM,
  init_esm_shims
} from "./chunk-EXLZF52D.js";

// ../cli-astro-commands/src/non-interactive/preview.tsx
init_esm_shims();
var import_react = __toESM(require_react(), 1);
async function nonInteractivePreview(services, model, options) {
  const { baseUrl, label } = options;
  const { previewId, previewUrl } = await executeCommand(
    services,
    model,
    (resolve) => /* @__PURE__ */ import_react.default.createElement(
      PreviewCommand,
      {
        baseUrl,
        onPreviewCreated: resolve,
        environment: "preview",
        label
      }
    )
  );
  log(JSON.stringify({ previewId, previewUrl }, null, 2));
}
export {
  nonInteractivePreview
};
//# sourceMappingURL=preview-S2TH45K2.js.map