import {
  register as _register,
  resetPassword as _resetPassword,
  login,
  requestPasswordReset,
  verifyUserEmail,
  updateUser
} from '../../../core/users/auth.js';
import { sendPasswordChangedEmail } from './email.js';

// Inject email sending into register (verification email) — kept here because
// it depends on JSX templates that live in features/auth.
export function register(userData) {
  return _register(userData);
}

// Inject sendPasswordChangedEmail — the template lives in features/auth.
export function resetPassword(resetData) {
  return _resetPassword(resetData, { onPasswordChanged: sendPasswordChangedEmail });
}

export { login, requestPasswordReset, verifyUserEmail, updateUser };
