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

// Inject sendPasswordChangedEmail — the JSX template lives in features/auth so
// the auth feature stays self-contained and core/users can remain pure server
// logic without JSX.
export function register(userData) {
  return _register(userData);
}

export function resetPassword(resetData) {
  return _resetPassword(resetData, { onPasswordChanged: sendPasswordChangedEmail });
}

export { login, requestPasswordReset, verifyUserEmail, updateUser, completeAccountSetup };
