/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
"use client";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../../../_virtual/_rolldown/runtime.cjs");
let react = require("react");
let react_jsx_runtime = require("react/jsx-runtime");
//#region src/components/client/BottomSheet/UDSBottomSheetConfigProvider.tsx
const BottomSheetContext = (0, react.createContext)(void 0);
const UDSBottomSheetConfigProvider = ({ children, value }) => {
	const existingContext = (0, react.useContext)(BottomSheetContext);
	const isMerge = typeof value === "object" && "type" in value && value.type === "merge";
	if (isMerge && !existingContext) throw new Error("Cannot merge context values without an existing BottomSheetContext");
	const finalValue = isMerge ? {
		...existingContext,
		...value.value
	} : value;
	return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BottomSheetContext.Provider, {
		value: finalValue,
		children
	});
};
UDSBottomSheetConfigProvider.displayName = "UDSBottomSheetConfigProvider";
function useBottomSheetConfig() {
	const context = (0, react.useContext)(BottomSheetContext);
	if (!context) throw new Error("useBottomSheetConfig must be used within a UDSBottomSheetConfigProvider");
	return context;
}
//#endregion
exports.UDSBottomSheetConfigProvider = UDSBottomSheetConfigProvider;
exports.useBottomSheetConfig = useBottomSheetConfig;
