import 'package:eatvio_app/features/profile/models/profile_model.dart'; import 'package:eatvio_app/features/settings/models/profile_settings_model.dart'; import 'package:eatvio_app/features/settings/services/settings_service.dart'; class SettingsRepository { final SettingsService settingsService; const SettingsRepository({required this.settingsService}); Future getProfileSettings() async { try { return await settingsService.getProfileSettings(); } catch (e) { rethrow; } } Future updateProfileSettings({ required ProfileSettingsModel profileSettingsModel, }) async { try { return await settingsService.updateProfileSettings( data: profileSettingsModel.toJson(), ); } catch (e) { rethrow; } } Future updateProfileDetails({ required ProfileDetailsModel profileDetailsModel, }) async { try { return await settingsService.updateProfileDetails( data: profileDetailsModel.toJson(), ); } catch (e) { rethrow; } } Future sendEmailCodeForPasswordChange(String email) async { try { return await settingsService.sendEmailCodeForPasswordChange( data: { 'email': email, }, ); } catch (e) { rethrow; } } Future confirmPasswordChange( String code, String password, String passwordConfirmation, String email, ) async { try { return await settingsService.confirmPasswordChange( data: { 'code': code, 'password': password, 'password_confirmation': passwordConfirmation, 'email': email, }, ); } catch (e) { rethrow; } } }