import { pubSubService as i, PUB_SUB_EVENTS as t } from "./index-pub-sub.js";
class d {
  setFooter(r) {
    i.$pub(t.reactActionBarSetFooter, {
      actionBarProps: r
    });
  }
  hideFooter() {
    i.$pub(t.reactActionBarHideFooter);
  }
  addMessage(r, e = {}) {
    return e.id === void 0 && (e.id = `ACTION_BAR_${Date.now()}${Math.random()}`), e.priority === void 0 && (r.type === "error" ? e.priority = 0 : r.type === "warning" ? e.priority = 10 : r.type === "success" ? e.priority = 20 : r.type === "info" && (e.priority = 30)), i.$pub(t.reactActionBarAddMessage, {
      id: e.id,
      priority: e.priority,
      props: r
    }), e;
  }
  removeMessage(r) {
    i.$pub(t.reactActionBarRemoveMessage, {
      id: r
    });
  }
}
const y = new d();
export {
  y as actionBarService
};
