UNPKG

@nextcloud/vue

Version:
23 lines (22 loc) 702 B
import { l as logger } from "../../chunks/logger-D3RVzcfQ.mjs"; function registerContactsMenuAction(action) { window._nc_contacts_menu_hooks ??= {}; if (window._nc_contacts_menu_hooks[action.id]) { logger.error(`ContactsMenu action for id ${action.id} has already been registered`, { action }); return; } window._nc_contacts_menu_hooks[action.id] = action; } function getEnabledContactsMenuActions(entry) { if (!window._nc_contacts_menu_hooks) { return []; } return Object.values(window._nc_contacts_menu_hooks).filter((action) => action.enabled(entry)); } export { getEnabledContactsMenuActions, registerContactsMenuAction }; //# sourceMappingURL=index.mjs.map