require("./chunk-9hOWP6kD.cjs");
let react = require("react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region ../core/src/widgets-api-context.ts
const WidgetsApiContext = (0, react.createContext)(null);
const WidgetsApiProvider = WidgetsApiContext.Provider;
function useWidgetsApi() {
	const api = (0, react.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__ */ (0, react_jsx_runtime.jsxs)("div", {
		className: "flex min-h-[120px] flex-col items-center justify-center p-6 text-center",
		children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
			className: "text-lg font-semibold",
			children: "Something Went Wrong"
		}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
			className: "text-muted-foreground text-sm",
			children: "Please contact a company admin for help"
		})]
	});
}
//#endregion
Object.defineProperty(exports, "ErrorState", {
	enumerable: true,
	get: function() {
		return ErrorState;
	}
});
Object.defineProperty(exports, "WidgetsApiProvider", {
	enumerable: true,
	get: function() {
		return WidgetsApiProvider;
	}
});
Object.defineProperty(exports, "useWidgetsApi", {
	enumerable: true,
	get: function() {
		return useWidgetsApi;
	}
});

//# sourceMappingURL=error-state-Du7X9xIM.cjs.map