/**
 * Copyright IBM Corp. 2020, 2026
 *
 * This source code is licensed under the Apache-2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 */

const require_runtime = require('../../../../../../_virtual/_rolldown/runtime.js');
const require_FilterProvider = require('../FilterProvider.js');
let react = require("react");

//#region src/components/Datagrid/Datagrid/addons/Filtering/hooks/useFilterContext.ts
/**
* Copyright IBM Corp. 2023, 2024
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
const useFilterContext = () => {
	const context = (0, react.useContext)(require_FilterProvider.FilterContext);
	if (Object.entries(context).length === 0) throw new Error("useFilterContext was used outside of its Provider");
	return context;
};

//#endregion
exports.default = useFilterContext;