export function notifyInventoryChanged() {
  if (typeof window === 'undefined') return;
  window.dispatchEvent(new Event('inventory:changed'));
}

export function onInventoryChanged(handler) {
  if (typeof window === 'undefined') return () => {};
  window.addEventListener('inventory:changed', handler);
  return () => window.removeEventListener('inventory:changed', handler);
}
