function add_navigation_callback(callbacks, callback) {
	onMount(() => {
		callbacks.add(callback);

		return () => {
			callbacks.delete(callback);
		};
	});
}
@template {Function} T
@param {Set<T>} callbacks
@param {T} callback