"use client";
/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const require_runtime = require('../../../_virtual/_rolldown/runtime.cjs');
const require_components_client_BottomSheet_useBottomSheetStoreInternal = require('./useBottomSheetStoreInternal.cjs');
let _ariakit_react = require("@ariakit/react");

//#region src/components/client/BottomSheet/useBottomSheetStore.ts
/** @internal */
const BOTTOM_SHEET_INTERNAL_STORE_KEY = "__bottomSheetInternal";
/** @internal */
function getBottomSheetInternal(controller) {
	const internal = controller[BOTTOM_SHEET_INTERNAL_STORE_KEY];
	if (!internal) throw new Error("Invalid BottomSheet controller. Use `useBottomSheetStore()` to create one.");
	return internal;
}
const useBottomSheetStore = ({ animated = true, defaultOpen = false, open: openProp } = {}) => {
	const bottomSheetInternal = require_components_client_BottomSheet_useBottomSheetStoreInternal.useBottomSheetStoreInternal({
		animated,
		open: openProp,
		defaultOpen
	});
	const isOpen = (0, _ariakit_react.useStoreState)(bottomSheetInternal, (state) => state.open);
	return {
		open: bottomSheetInternal.show,
		close: bottomSheetInternal.hide,
		isOpen,
		[BOTTOM_SHEET_INTERNAL_STORE_KEY]: bottomSheetInternal
	};
};

//#endregion
exports.getBottomSheetInternal = getBottomSheetInternal;
exports.useBottomSheetStore = useBottomSheetStore;