import { createContext, use } from "react";
import { jsx, jsxs } from "react/jsx-runtime";
//#region ../core/src/widgets-api-context.ts
const WidgetsApiContext = createContext(null);
const WidgetsApiProvider = WidgetsApiContext.Provider;
function useWidgetsApi() {
	const api = use(WidgetsApiContext);
	if (!api) throw new Error("useWidgetsApi must be used within a WidgetsApiProvider");
	return api;
}
//#endregion
//#region ../widgets/src/components/error-state.tsx
function ErrorState() {
	return /* @__PURE__ */ jsxs("div", {
		className: "flex min-h-[120px] flex-col items-center justify-center p-6 text-center",
		children: [/* @__PURE__ */ jsx("p", {
			className: "text-lg font-semibold",
			children: "Something Went Wrong"
		}), /* @__PURE__ */ jsx("p", {
			className: "text-muted-foreground text-sm",
			children: "Please contact a company admin for help"
		})]
	});
}
//#endregion
export { WidgetsApiProvider as n, useWidgetsApi as r, ErrorState as t };

//# sourceMappingURL=error-state-BMPrAS3n.mjs.map