/*!
 * KoliBri - The accessible HTML-Standard
 */
let currentLocation;
const subscribers = [];
const setCurrentLocation = (location) => {
    currentLocation = location;
    subscribers.forEach((subscriber) => {
        subscriber(location);
    });
};
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);
        }
    };
};

export { onLocationChange as o, setCurrentLocation as s };
//# sourceMappingURL=ariaCurrentService.js.map

//# sourceMappingURL=ariaCurrentService.js.map