const actionRegistry = /* @__PURE__ */ new Map();
function registerScheduledAction(name, handler, options) {
  if (actionRegistry.has(name)) {
    console.warn(`[ScheduledActions] Action '${name}' is already registered. Overwriting.`);
  }
  actionRegistry.set(name, {
    name,
    handler,
    description: options == null ? void 0 : options.description,
    timeout: options == null ? void 0 : options.timeout
  });
  console.log(`[ScheduledActions] Registered action: ${name}`);
}
function getActionHandler(name) {
  return actionRegistry.get(name);
}
function getAllRegisteredActions() {
  return Array.from(actionRegistry.keys());
}
function isActionRegistered(name) {
  return actionRegistry.has(name);
}
function clearActionRegistry() {
  actionRegistry.clear();
  console.log("[ScheduledActions] Registry cleared");
}
export {
  clearActionRegistry,
  getActionHandler,
  getAllRegisteredActions,
  isActionRegistered,
  registerScheduledAction
};
