import 'package:eatvio_app/features/profile/models/profile_model.dart'; import 'package:eatvio_app/features/settings/models/oauth_account_model.dart'; import 'package:eatvio_app/features/settings/models/oauth_attach_request.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 getOAuthAccounts() async { try { return await settingsService.getOAuthAccounts(); } catch (e) { rethrow; } } Future linkOAuthAccount({required OAuthAttachRequest request}) async { try { return await settingsService.linkOAuthAccount(request); } catch (e) { rethrow; } } Future unlinkOAuthAccount({required String provider}) async { try { return await settingsService.unlinkOAuthAccount(provider); } catch (e) { rethrow; } } }