import 'package:flutter_modular/flutter_modular.dart';
import '../../domain/ui_entities/auth_mode.dart';

/// Extension on [IModularNavigator] to provide strongly-typed navigation
/// for the staff authentication feature.
extension AuthNavigator on IModularNavigator {
  /// Navigates to the phone verification page.
  void pushPhoneVerification(AuthMode mode) {
    pushNamed('./phone-verification', arguments: <String, String>{'mode': mode.name});
  }

  /// Navigates to the profile setup page, replacing the current route.
  void pushReplacementProfileSetup() {
    pushReplacementNamed('./profile-setup');
  }

  /// Navigates to the worker home (external to this module).
  void pushWorkerHome() {
    pushNamed('/worker-main/home');
  }
}
