const metadata = {
  event: "customer_accounts.user.created",
  persistent: true,
  id: "customer_accounts:notify-staff-on-signup"
};
async function handle(payload, ctx) {
  const data = payload;
  const userId = data?.id;
  const email = data?.email;
  const tenantId = data?.tenantId;
  const organizationId = data?.organizationId;
  if (!userId || !email || !tenantId || !organizationId) return;
  try {
    const eventBus = ctx.resolve("eventBus");
    await eventBus.emitEvent("notifications.create", {
      type: "customer_accounts.user.signup",
      tenantId,
      organizationId,
      sourceEntityId: userId,
      data: { userId, email }
    });
  } catch {
  }
}
export {
  handle as default,
  metadata
};
//# sourceMappingURL=notifyStaffOnSignup.js.map
