import { getMergedEmbedOption as y, wistiaPlayerStyleBlock as h, isString as f } from "./chunk-FSLSW5KG.es.js";
import { forwardRef as w, Suspense as b, lazy as g, Fragment as u } from "react";
import { jsx as t, jsxs as S } from "react/jsx-runtime";
var W = g(
  async () => import("./WistiaPlayerWrapper-KYHM7EWK.es.js").then((e) => ({
    default: e.WistiaPlayerWrapper
  }))
), x = w(
  (e, o) => {
    const { aspect: r, children: l, embedHost: a, mediaId: i, swatch: d, style: c } = e, s = y(i, "embedHost", a != null ? a : void 0), n = f(s) ? s : "fast.wistia.com", m = r !== void 0, p = h({
      mediaId: i,
      embedHost: n,
      aspect: r,
      shouldLoadSwatch: d
    });
    return /* @__PURE__ */ t(
      b,
      {
        fallback: m && /* @__PURE__ */ S(u, { children: [
          /* @__PURE__ */ t("style", { children: p }),
          /* @__PURE__ */ t("wistia-player", { "media-id": i, style: c, children: l })
        ] }),
        children: /* @__PURE__ */ t(W, { ref: o, ...e })
      }
    );
  }
);
export {
  x as WistiaPlayer
};
