/**
 * Shared locator state. Every widget reads the current query + results from this
 * context and writes filter changes back to it; LocatorApp owns the actual
 * fetching so a change in any widget refreshes the whole page.
 */
import { createContext, useContext } from '@wordpress/element';

export const LocatorContext = createContext( null );

export const useLocator = () => useContext( LocatorContext );
