import { jsx as _jsx } from "react/jsx-runtime";
// (C) 2024-2025 GoodData Corporation
import { createContext, useContext } from "react";
/**
 * Internal context used to provide header search drop-down state to the components.
 * @internal
 */
const headerSearchContext = createContext({
    isOpen: false,
    toggleOpen: () => { },
});
/**
 * Internal context Provider used to provide header search drop-down state to the components.
 * @internal
 */
export function HeaderSearchProvider({ children, ...rest }) {
    const Provider = headerSearchContext.Provider;
    return _jsx(Provider, { value: rest, children: children });
}
/**
 * Internal context hook used to provide header search drop-down state to the components.
 * @internal
 */
export const useHeaderSearch = () => useContext(headerSearchContext);
