const defaultState = {
    onCreateAgent: undefined,
};
let state = defaultState;
const listeners = new Set();
function emit() {
    listeners.forEach((listener) => listener());
}
export function subscribeAgentsNav(listener) {
    listeners.add(listener);
    return () => listeners.delete(listener);
}
export function getAgentsNavSnapshot() {
    return state;
}
export function setAgentsNavState(partial) {
    state = { ...state, ...partial };
    emit();
}
export function resetAgentsNavState() {
    state = defaultState;
    emit();
}
//# sourceMappingURL=agentsNavStore.js.map