feat(auth): Implement AuthViewModel and Factory
What does this MR do?
- Implements the
AuthViewModel, which will serve as the brain for the login and registration UI. - Introduces an
AuthStatesealed class to represent the UI state (Idle, Loading, Authenticated, Error). - Follows a TDD approach by including a unit test (
AuthViewModelTest) that verifies the login logic using a mock repository. - Adds a basic
ViewModelFactoryto handle the creation of ViewModels that have constructor dependencies.
Why was this change needed?
This ViewModel acts as the crucial bridge between the authentication UI and the user data layer. By merging this now, the logic is ready to be connected to the LoginFragment as soon as its UI refactoring is complete, enabling a fully functional login flow.