/*!
 * KoliBri - The accessible HTML-Standard
 */
let currentLocation;
const subscribers = [];
export const setCurrentLocation = (location) => {
    currentLocation = location;
    subscribers.forEach((subscriber) => {
        subscriber(location);
    });
};
export const onLocationChange = (callback, eager = true) => {
    if (eager && typeof currentLocation === 'string') {
        callback(currentLocation);
    }
    subscribers.push(callback);
    return () => {
        const index = subscribers.indexOf(callback);
        if (index >= 0) {
            subscribers.splice(index, 1);
        }
    };
};
//# sourceMappingURL=ariaCurrentService.js.map
