import { jsx, jsxs } from "react/jsx-runtime";
import styled from "styled-components";
import { ErrorToast } from "../error-toast/index.js";
import { WaitMessage as DefaultWaitMessage } from "../wait-message/index.js";
import { useBreakpoint } from "../breakpoint/use-breakpoint.js";
import { useWindowSizeChange } from "../use-window-size-change.js";
import { useHTMLWaitMessage } from "../wait-message/use-html-wait-message.js";
import GlobalStyle from "./style.js";
const Div = styled.div`
  height: 100%;
`;
const HostedApp = ({ WaitMessage, children }) => {
  useBreakpoint();
  useHTMLWaitMessage(true);
  useWindowSizeChange();
  return /* @__PURE__ */ jsxs(Div, { children: [
    /* @__PURE__ */ jsx(GlobalStyle, {}),
    WaitMessage || /* @__PURE__ */ jsx(DefaultWaitMessage, {}),
    /* @__PURE__ */ jsx(ErrorToast, {}),
    children
  ] });
};
export {
  HostedApp
};
