@oxyhq/services 6.10.7 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (454) hide show
  1. package/lib/commonjs/index.js +211 -49
  2. package/lib/commonjs/index.js.map +1 -1
  3. package/lib/commonjs/ui/client.js +25 -4
  4. package/lib/commonjs/ui/client.js.map +1 -1
  5. package/lib/commonjs/ui/components/AccountMenu.js +485 -0
  6. package/lib/commonjs/ui/components/AccountMenu.js.map +1 -0
  7. package/lib/commonjs/ui/components/AccountMenuButton.js +120 -0
  8. package/lib/commonjs/ui/components/AccountMenuButton.js.map +1 -0
  9. package/lib/commonjs/ui/components/ActingAsBanner.js +2 -2
  10. package/lib/commonjs/ui/components/ActingAsBanner.js.map +1 -1
  11. package/lib/commonjs/ui/components/ProfileCard.js +2 -2
  12. package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
  13. package/lib/commonjs/ui/components/StepBasedScreen.js +2 -2
  14. package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
  15. package/lib/commonjs/ui/components/accountMenuRows.js +45 -0
  16. package/lib/commonjs/ui/components/accountMenuRows.js.map +1 -0
  17. package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +5 -5
  18. package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
  19. package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +3 -2
  20. package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -1
  21. package/lib/commonjs/ui/components/theming.js +2 -2
  22. package/lib/commonjs/ui/components/theming.js.map +1 -1
  23. package/lib/commonjs/ui/context/OxyContext.js +211 -21
  24. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  25. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +36 -2
  26. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  27. package/lib/commonjs/ui/hooks/mutations/mutationKeys.js +6 -0
  28. package/lib/commonjs/ui/hooks/mutations/mutationKeys.js.map +1 -1
  29. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +138 -1
  30. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  31. package/lib/commonjs/ui/hooks/queries/queryKeys.js +67 -2
  32. package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
  33. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +27 -2
  34. package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
  35. package/lib/commonjs/ui/hooks/useAuth.js +13 -2
  36. package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
  37. package/lib/commonjs/ui/hooks/useSessionManagement.js +30 -0
  38. package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
  39. package/lib/commonjs/ui/index.js +132 -85
  40. package/lib/commonjs/ui/index.js.map +1 -1
  41. package/lib/commonjs/ui/navigation/routes.js +6 -7
  42. package/lib/commonjs/ui/navigation/routes.js.map +1 -1
  43. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +3 -2
  44. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
  45. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +202 -0
  46. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -0
  47. package/lib/commonjs/ui/screens/CreateManagedAccountScreen.js +3 -2
  48. package/lib/commonjs/ui/screens/CreateManagedAccountScreen.js.map +1 -1
  49. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +3 -2
  50. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  51. package/lib/commonjs/ui/screens/FAQScreen.js +7 -4
  52. package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
  53. package/lib/commonjs/ui/screens/FeedbackScreen.js +21 -16
  54. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/HelpSupportScreen.js +3 -2
  56. package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
  57. package/lib/commonjs/ui/screens/HistoryViewScreen.js +7 -4
  58. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  59. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +3 -2
  60. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  61. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +6 -4
  62. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
  63. package/lib/commonjs/ui/screens/ManageAccountScreen.js +780 -0
  64. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -0
  65. package/lib/commonjs/ui/screens/NotificationsScreen.js +175 -0
  66. package/lib/commonjs/ui/screens/NotificationsScreen.js.map +1 -0
  67. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +18 -12
  68. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  69. package/lib/commonjs/ui/screens/PreferencesScreen.js +220 -0
  70. package/lib/commonjs/ui/screens/PreferencesScreen.js.map +1 -0
  71. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +14 -10
  72. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  73. package/lib/commonjs/ui/screens/ProfileScreen.js +3 -3
  74. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  75. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +8 -5
  76. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  77. package/lib/commonjs/ui/screens/SearchSettingsScreen.js +6 -4
  78. package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
  79. package/lib/commonjs/ui/screens/UserLinksScreen.js +3 -2
  80. package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
  81. package/lib/commonjs/ui/screens/UserListScreen.js +2 -2
  82. package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
  83. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +3 -2
  84. package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  85. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +3 -2
  86. package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
  87. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +2 -2
  88. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  89. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +4 -3
  90. package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  91. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +3 -2
  92. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
  93. package/lib/commonjs/ui/utils/activeAuthuser.js +85 -0
  94. package/lib/commonjs/ui/utils/activeAuthuser.js.map +1 -0
  95. package/lib/module/index.js +58 -16
  96. package/lib/module/index.js.map +1 -1
  97. package/lib/module/ui/client.js +5 -3
  98. package/lib/module/ui/client.js.map +1 -1
  99. package/lib/module/ui/components/AccountMenu.js +480 -0
  100. package/lib/module/ui/components/AccountMenu.js.map +1 -0
  101. package/lib/module/ui/components/AccountMenuButton.js +115 -0
  102. package/lib/module/ui/components/AccountMenuButton.js.map +1 -0
  103. package/lib/module/ui/components/ActingAsBanner.js +2 -2
  104. package/lib/module/ui/components/ActingAsBanner.js.map +1 -1
  105. package/lib/module/ui/components/ProfileCard.js +1 -1
  106. package/lib/module/ui/components/ProfileCard.js.map +1 -1
  107. package/lib/module/ui/components/StepBasedScreen.js +1 -1
  108. package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
  109. package/lib/module/ui/components/accountMenuRows.js +41 -0
  110. package/lib/module/ui/components/accountMenuRows.js.map +1 -0
  111. package/lib/module/ui/components/payment/PaymentDetailsStep.js +1 -1
  112. package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
  113. package/lib/module/ui/components/payment/PaymentMethodStep.js +1 -1
  114. package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -1
  115. package/lib/module/ui/components/theming.js +1 -1
  116. package/lib/module/ui/components/theming.js.map +1 -1
  117. package/lib/module/ui/context/OxyContext.js +211 -21
  118. package/lib/module/ui/context/OxyContext.js.map +1 -1
  119. package/lib/module/ui/context/hooks/useAuthOperations.js +36 -2
  120. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  121. package/lib/module/ui/hooks/mutations/mutationKeys.js +6 -0
  122. package/lib/module/ui/hooks/mutations/mutationKeys.js.map +1 -1
  123. package/lib/module/ui/hooks/mutations/useAccountMutations.js +135 -1
  124. package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  125. package/lib/module/ui/hooks/queries/queryKeys.js +60 -1
  126. package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
  127. package/lib/module/ui/hooks/queries/useAccountQueries.js +24 -0
  128. package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
  129. package/lib/module/ui/hooks/useAuth.js +13 -2
  130. package/lib/module/ui/hooks/useAuth.js.map +1 -1
  131. package/lib/module/ui/hooks/useSessionManagement.js +30 -0
  132. package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
  133. package/lib/module/ui/index.js +34 -78
  134. package/lib/module/ui/index.js.map +1 -1
  135. package/lib/module/ui/navigation/routes.js +6 -7
  136. package/lib/module/ui/navigation/routes.js.map +1 -1
  137. package/lib/module/ui/screens/AccountVerificationScreen.js +1 -1
  138. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
  139. package/lib/module/ui/screens/ConnectedAppsScreen.js +198 -0
  140. package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -0
  141. package/lib/module/ui/screens/CreateManagedAccountScreen.js +1 -1
  142. package/lib/module/ui/screens/CreateManagedAccountScreen.js.map +1 -1
  143. package/lib/module/ui/screens/EditProfileFieldScreen.js +1 -1
  144. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  145. package/lib/module/ui/screens/FAQScreen.js +3 -1
  146. package/lib/module/ui/screens/FAQScreen.js.map +1 -1
  147. package/lib/module/ui/screens/FeedbackScreen.js +6 -2
  148. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  149. package/lib/module/ui/screens/HelpSupportScreen.js +1 -1
  150. package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
  151. package/lib/module/ui/screens/HistoryViewScreen.js +3 -1
  152. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  153. package/lib/module/ui/screens/LanguageSelectorScreen.js +1 -1
  154. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  155. package/lib/module/ui/screens/LegalDocumentsScreen.js +2 -1
  156. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
  157. package/lib/module/ui/screens/ManageAccountScreen.js +775 -0
  158. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -0
  159. package/lib/module/ui/screens/NotificationsScreen.js +169 -0
  160. package/lib/module/ui/screens/NotificationsScreen.js.map +1 -0
  161. package/lib/module/ui/screens/PaymentGatewayScreen.js +9 -3
  162. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  163. package/lib/module/ui/screens/PreferencesScreen.js +214 -0
  164. package/lib/module/ui/screens/PreferencesScreen.js.map +1 -0
  165. package/lib/module/ui/screens/PrivacySettingsScreen.js +4 -1
  166. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  167. package/lib/module/ui/screens/ProfileScreen.js +2 -2
  168. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  169. package/lib/module/ui/screens/SavesCollectionsScreen.js +3 -1
  170. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  171. package/lib/module/ui/screens/SearchSettingsScreen.js +2 -1
  172. package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
  173. package/lib/module/ui/screens/UserLinksScreen.js +1 -1
  174. package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
  175. package/lib/module/ui/screens/UserListScreen.js +1 -1
  176. package/lib/module/ui/screens/UserListScreen.js.map +1 -1
  177. package/lib/module/ui/screens/karma/KarmaAboutScreen.js +1 -1
  178. package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
  179. package/lib/module/ui/screens/karma/KarmaFAQScreen.js +1 -1
  180. package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
  181. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +1 -1
  182. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  183. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +1 -1
  184. package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
  185. package/lib/module/ui/screens/karma/KarmaRulesScreen.js +1 -1
  186. package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
  187. package/lib/module/ui/utils/activeAuthuser.js +79 -0
  188. package/lib/module/ui/utils/activeAuthuser.js.map +1 -0
  189. package/lib/typescript/commonjs/index.d.ts +23 -6
  190. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  191. package/lib/typescript/commonjs/ui/client.d.ts +7 -2
  192. package/lib/typescript/commonjs/ui/client.d.ts.map +1 -1
  193. package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts +23 -0
  194. package/lib/typescript/commonjs/ui/components/AccountMenu.d.ts.map +1 -0
  195. package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts +19 -0
  196. package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts.map +1 -0
  197. package/lib/typescript/commonjs/ui/components/accountMenuRows.d.ts +27 -0
  198. package/lib/typescript/commonjs/ui/components/accountMenuRows.d.ts.map +1 -0
  199. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  200. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  201. package/lib/typescript/commonjs/ui/hooks/mutations/mutationKeys.d.ts +5 -0
  202. package/lib/typescript/commonjs/ui/hooks/mutations/mutationKeys.d.ts.map +1 -1
  203. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +26 -1
  204. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  205. package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +32 -3
  206. package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
  207. package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts +10 -1
  208. package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  209. package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts +1 -1
  210. package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
  211. package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +8 -2
  212. package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
  213. package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
  214. package/lib/typescript/commonjs/ui/index.d.ts +32 -18
  215. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
  216. package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
  217. package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
  218. package/lib/typescript/{module/ui/screens/AccountOverviewScreen.d.ts → commonjs/ui/screens/ConnectedAppsScreen.d.ts} +1 -1
  219. package/lib/typescript/commonjs/ui/screens/ConnectedAppsScreen.d.ts.map +1 -0
  220. package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +1 -1
  221. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
  222. package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  223. package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  224. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts +13 -0
  225. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -0
  226. package/lib/typescript/commonjs/ui/screens/{AccountOverviewScreen.d.ts → NotificationsScreen.d.ts} +1 -1
  227. package/lib/typescript/commonjs/ui/screens/NotificationsScreen.d.ts.map +1 -0
  228. package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts +1 -1
  229. package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  230. package/lib/typescript/commonjs/ui/screens/{AccountSettingsScreen.d.ts → PreferencesScreen.d.ts} +2 -5
  231. package/lib/typescript/commonjs/ui/screens/PreferencesScreen.d.ts.map +1 -0
  232. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  233. package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  234. package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  235. package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts +42 -0
  236. package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts.map +1 -0
  237. package/lib/typescript/module/index.d.ts +23 -6
  238. package/lib/typescript/module/index.d.ts.map +1 -1
  239. package/lib/typescript/module/ui/client.d.ts +7 -2
  240. package/lib/typescript/module/ui/client.d.ts.map +1 -1
  241. package/lib/typescript/module/ui/components/AccountMenu.d.ts +23 -0
  242. package/lib/typescript/module/ui/components/AccountMenu.d.ts.map +1 -0
  243. package/lib/typescript/module/ui/components/AccountMenuButton.d.ts +19 -0
  244. package/lib/typescript/module/ui/components/AccountMenuButton.d.ts.map +1 -0
  245. package/lib/typescript/module/ui/components/accountMenuRows.d.ts +27 -0
  246. package/lib/typescript/module/ui/components/accountMenuRows.d.ts.map +1 -0
  247. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  248. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  249. package/lib/typescript/module/ui/hooks/mutations/mutationKeys.d.ts +5 -0
  250. package/lib/typescript/module/ui/hooks/mutations/mutationKeys.d.ts.map +1 -1
  251. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +26 -1
  252. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  253. package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +32 -3
  254. package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
  255. package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts +10 -1
  256. package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
  257. package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts +1 -1
  258. package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
  259. package/lib/typescript/module/ui/hooks/useAuth.d.ts +8 -2
  260. package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
  261. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
  262. package/lib/typescript/module/ui/index.d.ts +32 -18
  263. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  264. package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
  265. package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
  266. package/lib/typescript/module/ui/screens/{AccountSettingsScreen.d.ts → ConnectedAppsScreen.d.ts} +2 -5
  267. package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -0
  268. package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
  269. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
  270. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  271. package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
  272. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +13 -0
  273. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -0
  274. package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts +5 -0
  275. package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -0
  276. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts +1 -1
  277. package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  278. package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts +5 -0
  279. package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -0
  280. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  281. package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
  282. package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
  283. package/lib/typescript/module/ui/utils/activeAuthuser.d.ts +42 -0
  284. package/lib/typescript/module/ui/utils/activeAuthuser.d.ts.map +1 -0
  285. package/package.json +20 -9
  286. package/src/index.ts +141 -47
  287. package/src/ui/client.ts +7 -2
  288. package/src/ui/components/AccountMenu.tsx +534 -0
  289. package/src/ui/components/AccountMenuButton.tsx +113 -0
  290. package/src/ui/components/ActingAsBanner.tsx +2 -2
  291. package/src/ui/components/ProfileCard.tsx +1 -1
  292. package/src/ui/components/StepBasedScreen.tsx +1 -1
  293. package/src/ui/components/accountMenuRows.ts +60 -0
  294. package/src/ui/components/payment/PaymentDetailsStep.tsx +1 -1
  295. package/src/ui/components/payment/PaymentMethodStep.tsx +1 -1
  296. package/src/ui/components/theming.tsx +1 -1
  297. package/src/ui/context/OxyContext.tsx +204 -18
  298. package/src/ui/context/hooks/useAuthOperations.ts +36 -2
  299. package/src/ui/hooks/mutations/mutationKeys.ts +11 -0
  300. package/src/ui/hooks/mutations/useAccountMutations.ts +154 -2
  301. package/src/ui/hooks/queries/queryKeys.ts +54 -4
  302. package/src/ui/hooks/queries/useAccountQueries.ts +25 -1
  303. package/src/ui/hooks/useAuth.ts +23 -4
  304. package/src/ui/hooks/useSessionManagement.ts +29 -0
  305. package/src/ui/index.ts +37 -98
  306. package/src/ui/navigation/routes.ts +9 -11
  307. package/src/ui/screens/AccountVerificationScreen.tsx +1 -1
  308. package/src/ui/screens/ConnectedAppsScreen.tsx +225 -0
  309. package/src/ui/screens/CreateManagedAccountScreen.tsx +1 -1
  310. package/src/ui/screens/EditProfileFieldScreen.tsx +1 -1
  311. package/src/ui/screens/FAQScreen.tsx +3 -1
  312. package/src/ui/screens/FeedbackScreen.tsx +6 -10
  313. package/src/ui/screens/HelpSupportScreen.tsx +1 -1
  314. package/src/ui/screens/HistoryViewScreen.tsx +3 -1
  315. package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
  316. package/src/ui/screens/LegalDocumentsScreen.tsx +2 -1
  317. package/src/ui/screens/ManageAccountScreen.tsx +1102 -0
  318. package/src/ui/screens/NotificationsScreen.tsx +189 -0
  319. package/src/ui/screens/PaymentGatewayScreen.tsx +10 -12
  320. package/src/ui/screens/PreferencesScreen.tsx +263 -0
  321. package/src/ui/screens/PrivacySettingsScreen.tsx +4 -1
  322. package/src/ui/screens/ProfileScreen.tsx +2 -2
  323. package/src/ui/screens/SavesCollectionsScreen.tsx +3 -1
  324. package/src/ui/screens/SearchSettingsScreen.tsx +2 -1
  325. package/src/ui/screens/UserLinksScreen.tsx +1 -1
  326. package/src/ui/screens/UserListScreen.tsx +1 -1
  327. package/src/ui/screens/karma/KarmaAboutScreen.tsx +1 -1
  328. package/src/ui/screens/karma/KarmaFAQScreen.tsx +1 -1
  329. package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +1 -1
  330. package/src/ui/screens/karma/KarmaRewardsScreen.tsx +1 -1
  331. package/src/ui/screens/karma/KarmaRulesScreen.tsx +1 -1
  332. package/src/ui/utils/activeAuthuser.ts +78 -0
  333. package/lib/commonjs/ui/components/feedback/index.js +0 -54
  334. package/lib/commonjs/ui/components/feedback/index.js.map +0 -1
  335. package/lib/commonjs/ui/components/icon/index.js +0 -21
  336. package/lib/commonjs/ui/components/icon/index.js.map +0 -1
  337. package/lib/commonjs/ui/components/index.js +0 -104
  338. package/lib/commonjs/ui/components/index.js.map +0 -1
  339. package/lib/commonjs/ui/components/modals/index.js +0 -14
  340. package/lib/commonjs/ui/components/modals/index.js.map +0 -1
  341. package/lib/commonjs/ui/components/payment/index.js +0 -80
  342. package/lib/commonjs/ui/components/payment/index.js.map +0 -1
  343. package/lib/commonjs/ui/hooks/index.js +0 -92
  344. package/lib/commonjs/ui/hooks/index.js.map +0 -1
  345. package/lib/commonjs/ui/hooks/mutations/index.js +0 -68
  346. package/lib/commonjs/ui/hooks/mutations/index.js.map +0 -1
  347. package/lib/commonjs/ui/hooks/queries/index.js +0 -155
  348. package/lib/commonjs/ui/hooks/queries/index.js.map +0 -1
  349. package/lib/commonjs/ui/screens/AccountCenterScreen.js +0 -344
  350. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +0 -1
  351. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +0 -724
  352. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +0 -1
  353. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +0 -643
  354. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +0 -1
  355. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +0 -1029
  356. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +0 -1
  357. package/lib/commonjs/ui/screens/SessionManagementScreen.js +0 -512
  358. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +0 -1
  359. package/lib/commonjs/ui/styles/index.js +0 -39
  360. package/lib/commonjs/ui/styles/index.js.map +0 -1
  361. package/lib/module/ui/components/feedback/index.js +0 -8
  362. package/lib/module/ui/components/feedback/index.js.map +0 -1
  363. package/lib/module/ui/components/icon/index.js +0 -5
  364. package/lib/module/ui/components/icon/index.js.map +0 -1
  365. package/lib/module/ui/components/index.js +0 -18
  366. package/lib/module/ui/components/index.js.map +0 -1
  367. package/lib/module/ui/components/modals/index.js +0 -4
  368. package/lib/module/ui/components/modals/index.js.map +0 -1
  369. package/lib/module/ui/components/payment/index.js +0 -10
  370. package/lib/module/ui/components/payment/index.js.map +0 -1
  371. package/lib/module/ui/hooks/index.js +0 -11
  372. package/lib/module/ui/hooks/index.js.map +0 -1
  373. package/lib/module/ui/hooks/mutations/index.js +0 -15
  374. package/lib/module/ui/hooks/mutations/index.js.map +0 -1
  375. package/lib/module/ui/hooks/queries/index.js +0 -26
  376. package/lib/module/ui/hooks/queries/index.js.map +0 -1
  377. package/lib/module/ui/screens/AccountCenterScreen.js +0 -339
  378. package/lib/module/ui/screens/AccountCenterScreen.js.map +0 -1
  379. package/lib/module/ui/screens/AccountOverviewScreen.js +0 -719
  380. package/lib/module/ui/screens/AccountOverviewScreen.js.map +0 -1
  381. package/lib/module/ui/screens/AccountSettingsScreen.js +0 -638
  382. package/lib/module/ui/screens/AccountSettingsScreen.js.map +0 -1
  383. package/lib/module/ui/screens/AccountSwitcherScreen.js +0 -1024
  384. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +0 -1
  385. package/lib/module/ui/screens/SessionManagementScreen.js +0 -508
  386. package/lib/module/ui/screens/SessionManagementScreen.js.map +0 -1
  387. package/lib/module/ui/styles/index.js +0 -6
  388. package/lib/module/ui/styles/index.js.map +0 -1
  389. package/lib/typescript/commonjs/ui/components/feedback/index.d.ts +0 -7
  390. package/lib/typescript/commonjs/ui/components/feedback/index.d.ts.map +0 -1
  391. package/lib/typescript/commonjs/ui/components/icon/index.d.ts +0 -4
  392. package/lib/typescript/commonjs/ui/components/icon/index.d.ts.map +0 -1
  393. package/lib/typescript/commonjs/ui/components/index.d.ts +0 -13
  394. package/lib/typescript/commonjs/ui/components/index.d.ts.map +0 -1
  395. package/lib/typescript/commonjs/ui/components/modals/index.d.ts +0 -2
  396. package/lib/typescript/commonjs/ui/components/modals/index.d.ts.map +0 -1
  397. package/lib/typescript/commonjs/ui/components/payment/index.d.ts +0 -9
  398. package/lib/typescript/commonjs/ui/components/payment/index.d.ts.map +0 -1
  399. package/lib/typescript/commonjs/ui/hooks/index.d.ts +0 -9
  400. package/lib/typescript/commonjs/ui/hooks/index.d.ts.map +0 -1
  401. package/lib/typescript/commonjs/ui/hooks/mutations/index.d.ts +0 -9
  402. package/lib/typescript/commonjs/ui/hooks/mutations/index.d.ts.map +0 -1
  403. package/lib/typescript/commonjs/ui/hooks/queries/index.d.ts +0 -13
  404. package/lib/typescript/commonjs/ui/hooks/queries/index.d.ts.map +0 -1
  405. package/lib/typescript/commonjs/ui/screens/AccountCenterScreen.d.ts +0 -5
  406. package/lib/typescript/commonjs/ui/screens/AccountCenterScreen.d.ts.map +0 -1
  407. package/lib/typescript/commonjs/ui/screens/AccountOverviewScreen.d.ts.map +0 -1
  408. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +0 -1
  409. package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts +0 -5
  410. package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts.map +0 -1
  411. package/lib/typescript/commonjs/ui/screens/SessionManagementScreen.d.ts +0 -5
  412. package/lib/typescript/commonjs/ui/screens/SessionManagementScreen.d.ts.map +0 -1
  413. package/lib/typescript/commonjs/ui/styles/index.d.ts +0 -4
  414. package/lib/typescript/commonjs/ui/styles/index.d.ts.map +0 -1
  415. package/lib/typescript/module/ui/components/feedback/index.d.ts +0 -7
  416. package/lib/typescript/module/ui/components/feedback/index.d.ts.map +0 -1
  417. package/lib/typescript/module/ui/components/icon/index.d.ts +0 -4
  418. package/lib/typescript/module/ui/components/icon/index.d.ts.map +0 -1
  419. package/lib/typescript/module/ui/components/index.d.ts +0 -13
  420. package/lib/typescript/module/ui/components/index.d.ts.map +0 -1
  421. package/lib/typescript/module/ui/components/modals/index.d.ts +0 -2
  422. package/lib/typescript/module/ui/components/modals/index.d.ts.map +0 -1
  423. package/lib/typescript/module/ui/components/payment/index.d.ts +0 -9
  424. package/lib/typescript/module/ui/components/payment/index.d.ts.map +0 -1
  425. package/lib/typescript/module/ui/hooks/index.d.ts +0 -9
  426. package/lib/typescript/module/ui/hooks/index.d.ts.map +0 -1
  427. package/lib/typescript/module/ui/hooks/mutations/index.d.ts +0 -9
  428. package/lib/typescript/module/ui/hooks/mutations/index.d.ts.map +0 -1
  429. package/lib/typescript/module/ui/hooks/queries/index.d.ts +0 -13
  430. package/lib/typescript/module/ui/hooks/queries/index.d.ts.map +0 -1
  431. package/lib/typescript/module/ui/screens/AccountCenterScreen.d.ts +0 -5
  432. package/lib/typescript/module/ui/screens/AccountCenterScreen.d.ts.map +0 -1
  433. package/lib/typescript/module/ui/screens/AccountOverviewScreen.d.ts.map +0 -1
  434. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +0 -1
  435. package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts +0 -5
  436. package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts.map +0 -1
  437. package/lib/typescript/module/ui/screens/SessionManagementScreen.d.ts +0 -5
  438. package/lib/typescript/module/ui/screens/SessionManagementScreen.d.ts.map +0 -1
  439. package/lib/typescript/module/ui/styles/index.d.ts +0 -4
  440. package/lib/typescript/module/ui/styles/index.d.ts.map +0 -1
  441. package/src/ui/components/feedback/index.ts +0 -6
  442. package/src/ui/components/icon/index.ts +0 -3
  443. package/src/ui/components/index.ts +0 -15
  444. package/src/ui/components/modals/index.ts +0 -1
  445. package/src/ui/components/payment/index.ts +0 -9
  446. package/src/ui/hooks/index.ts +0 -13
  447. package/src/ui/hooks/mutations/index.ts +0 -25
  448. package/src/ui/hooks/queries/index.ts +0 -61
  449. package/src/ui/screens/AccountCenterScreen.tsx +0 -182
  450. package/src/ui/screens/AccountOverviewScreen.tsx +0 -696
  451. package/src/ui/screens/AccountSettingsScreen.tsx +0 -620
  452. package/src/ui/screens/AccountSwitcherScreen.tsx +0 -1003
  453. package/src/ui/screens/SessionManagementScreen.tsx +0 -477
  454. package/src/ui/styles/index.ts +0 -3
@@ -0,0 +1,780 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _vectorIcons = require("@expo/vector-icons");
10
+ var _bloom = require("@oxyhq/bloom");
11
+ var _theme = require("@oxyhq/bloom/theme");
12
+ var _settingsList = require("@oxyhq/bloom/settings-list");
13
+ var _core = require("@oxyhq/core");
14
+ var _Header = _interopRequireDefault(require("../components/Header.js"));
15
+ var _Avatar = _interopRequireDefault(require("../components/Avatar.js"));
16
+ var _SettingsIcon = require("../components/SettingsIcon.js");
17
+ var _DeleteAccountModal = _interopRequireDefault(require("../components/modals/DeleteAccountModal.js"));
18
+ var _OxyContext = require("../context/OxyContext.js");
19
+ var _useI18n = require("../hooks/useI18n.js");
20
+ var _useAccountQueries = require("../hooks/queries/useAccountQueries.js");
21
+ var _usePaymentQueries = require("../hooks/queries/usePaymentQueries.js");
22
+ var _useServicesQueries = require("../hooks/queries/useServicesQueries.js");
23
+ var _useColorScheme = require("../hooks/useColorScheme.js");
24
+ var _theme2 = require("../constants/theme.js");
25
+ var _themeUtils = require("../utils/themeUtils.js");
26
+ var _spacing = require("../constants/spacing.js");
27
+ var _jsxRuntime = require("react/jsx-runtime");
28
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
29
+ const formatRelative = dateString => {
30
+ if (!dateString) {
31
+ return '—';
32
+ }
33
+ const date = new Date(dateString);
34
+ const now = new Date();
35
+ const diffMs = date.getTime() - now.getTime();
36
+ const absMin = Math.abs(diffMs) / 60000;
37
+ const isFuture = diffMs > 0;
38
+ if (absMin < 1) {
39
+ return isFuture ? 'in moments' : 'just now';
40
+ }
41
+ if (absMin < 60) {
42
+ const v = Math.floor(absMin);
43
+ return isFuture ? `in ${v}m` : `${v}m ago`;
44
+ }
45
+ const hrs = absMin / 60;
46
+ if (hrs < 24) {
47
+ const v = Math.floor(hrs);
48
+ return isFuture ? `in ${v}h` : `${v}h ago`;
49
+ }
50
+ const days = hrs / 24;
51
+ if (days < 7) {
52
+ const v = Math.floor(days);
53
+ return isFuture ? `in ${v}d` : `${v}d ago`;
54
+ }
55
+ return date.toLocaleDateString();
56
+ };
57
+
58
+ /**
59
+ * Unified "Manage your Oxy Account" screen.
60
+ *
61
+ * Replaces AccountOverview + AccountSettings + the per-account half of
62
+ * SessionManagement. Lists ONLY the active user's profile, sessions on this
63
+ * device, and security/destructive actions for THIS account. Multi-account
64
+ * surface lives in {@link AccountMenu} — keep these concerns separate.
65
+ */
66
+ const ManageAccountScreen = ({
67
+ onClose,
68
+ goBack,
69
+ navigate,
70
+ theme
71
+ }) => {
72
+ const bloomTheme = (0, _theme.useTheme)();
73
+ const {
74
+ t,
75
+ locale
76
+ } = (0, _useI18n.useI18n)();
77
+ const colorScheme = (0, _useColorScheme.useColorScheme)();
78
+ const palette = (0, _react.useMemo)(() => _theme2.Colors[(0, _themeUtils.normalizeColorScheme)(colorScheme, (0, _themeUtils.normalizeTheme)(theme))], [colorScheme, theme]);
79
+ const {
80
+ user: contextUser,
81
+ isAuthenticated,
82
+ oxyServices,
83
+ activeSessionId,
84
+ logout,
85
+ openAvatarPicker,
86
+ managedAccounts
87
+ } = (0, _OxyContext.useOxy)();
88
+ const {
89
+ data: userFromQuery,
90
+ isLoading: userLoading
91
+ } = (0, _useAccountQueries.useCurrentUser)({
92
+ enabled: isAuthenticated
93
+ });
94
+ const user = userFromQuery ?? contextUser;
95
+ const {
96
+ data: subscription
97
+ } = (0, _usePaymentQueries.useUserSubscription)({
98
+ enabled: isAuthenticated
99
+ });
100
+ const {
101
+ data: deviceSessions,
102
+ isLoading: deviceSessionsLoading,
103
+ refetch: refetchDeviceSessions,
104
+ isRefetching: deviceSessionsRefetching
105
+ } = (0, _useServicesQueries.useDeviceSessions)({
106
+ enabled: isAuthenticated && !!activeSessionId
107
+ });
108
+ const signOutDialog = (0, _bloom.useDialogControl)();
109
+ const signOutAllDevicesDialog = (0, _bloom.useDialogControl)();
110
+ const removeDeviceDialog = (0, _bloom.useDialogControl)();
111
+ const downloadDataDialog = (0, _bloom.useDialogControl)();
112
+ const deleteAccountDialog = (0, _bloom.useDialogControl)();
113
+ const [pendingRemoveDevice, setPendingRemoveDevice] = (0, _react.useState)(null);
114
+ const [removingDeviceId, setRemovingDeviceId] = (0, _react.useState)(null);
115
+ const [signingOutAllDevices, setSigningOutAllDevices] = (0, _react.useState)(false);
116
+ const [signingOut, setSigningOut] = (0, _react.useState)(false);
117
+ const displayName = (0, _react.useMemo)(() => (0, _core.getAccountDisplayName)(user, locale), [user, locale]);
118
+ const handle = (0, _react.useMemo)(() => (0, _core.getAccountFallbackHandle)(user), [user]);
119
+ const avatarUri = (0, _react.useMemo)(() => {
120
+ return user?.avatar ? oxyServices.getFileDownloadUrl(user.avatar, 'thumb') : undefined;
121
+ }, [user?.avatar, oxyServices]);
122
+ const handleSignOut = (0, _react.useCallback)(async () => {
123
+ if (signingOut) {
124
+ return;
125
+ }
126
+ setSigningOut(true);
127
+ try {
128
+ await logout();
129
+ _bloom.toast.success(t('common.actions.signedOut') || 'Signed out');
130
+ onClose?.();
131
+ } catch (error) {
132
+ _core.logger.warn('Sign out failed', {
133
+ component: 'ManageAccountScreen'
134
+ }, error);
135
+ _bloom.toast.error(t('common.errors.signOutFailed') || 'Failed to sign out');
136
+ } finally {
137
+ setSigningOut(false);
138
+ }
139
+ }, [signingOut, logout, t, onClose]);
140
+ const confirmRemoveDevice = (0, _react.useCallback)(device => {
141
+ setPendingRemoveDevice(device);
142
+ removeDeviceDialog.open();
143
+ }, [removeDeviceDialog]);
144
+ const handleRemoveDevice = (0, _react.useCallback)(async () => {
145
+ if (!pendingRemoveDevice || !activeSessionId) {
146
+ return;
147
+ }
148
+ const target = pendingRemoveDevice;
149
+ setRemovingDeviceId(target.sessionId);
150
+ try {
151
+ await oxyServices.logoutSession(activeSessionId, target.sessionId);
152
+ await refetchDeviceSessions();
153
+ _bloom.toast.success(t('manageAccount.toasts.deviceRemoved', {
154
+ name: target.deviceName
155
+ }) || `Signed out from ${target.deviceName}`);
156
+ } catch (error) {
157
+ _core.logger.warn('Remove device failed', {
158
+ component: 'ManageAccountScreen'
159
+ }, error);
160
+ _bloom.toast.error(t('manageAccount.toasts.deviceRemoveFailed') || 'Failed to remove device');
161
+ } finally {
162
+ setRemovingDeviceId(null);
163
+ setPendingRemoveDevice(null);
164
+ }
165
+ }, [pendingRemoveDevice, activeSessionId, oxyServices, refetchDeviceSessions, t]);
166
+ const handleSignOutAllDevices = (0, _react.useCallback)(async () => {
167
+ if (!activeSessionId || signingOutAllDevices) {
168
+ return;
169
+ }
170
+ setSigningOutAllDevices(true);
171
+ try {
172
+ await oxyServices.logoutAllDeviceSessions(activeSessionId);
173
+ await refetchDeviceSessions();
174
+ _bloom.toast.success(t('manageAccount.toasts.allDevicesSignedOut') || 'Signed out from all other devices');
175
+ } catch (error) {
176
+ _core.logger.warn('Sign out all devices failed', {
177
+ component: 'ManageAccountScreen'
178
+ }, error);
179
+ _bloom.toast.error(t('manageAccount.toasts.allDevicesFailed') || 'Failed to sign out from other devices');
180
+ } finally {
181
+ setSigningOutAllDevices(false);
182
+ }
183
+ }, [activeSessionId, signingOutAllDevices, oxyServices, refetchDeviceSessions, t]);
184
+ const performDownload = (0, _react.useCallback)(async format => {
185
+ if (!user) {
186
+ _bloom.toast.error(t('accountOverview.items.downloadData.error') || 'Service not available');
187
+ return;
188
+ }
189
+ try {
190
+ _bloom.toast.info(t('accountOverview.items.downloadData.downloading') || 'Preparing download...');
191
+ const blob = await oxyServices.downloadAccountData(format);
192
+ if (_reactNative.Platform.OS === 'web') {
193
+ const url = URL.createObjectURL(blob);
194
+ const link = document.createElement('a');
195
+ link.href = url;
196
+ link.download = `account-data-${Date.now()}.${format}`;
197
+ document.body.appendChild(link);
198
+ link.click();
199
+ document.body.removeChild(link);
200
+ URL.revokeObjectURL(url);
201
+ }
202
+ _bloom.toast.success(t('accountOverview.items.downloadData.success') || 'Data downloaded successfully');
203
+ } catch (error) {
204
+ _core.logger.warn('Download account data failed', {
205
+ component: 'ManageAccountScreen'
206
+ }, error);
207
+ _bloom.toast.error((error instanceof Error ? error.message : null) || t('accountOverview.items.downloadData.error') || 'Failed to download data');
208
+ }
209
+ }, [oxyServices, user, t]);
210
+ const handleConfirmDelete = (0, _react.useCallback)(async confirmText => {
211
+ if (!user) {
212
+ throw new Error(t('accountOverview.items.deleteAccount.error') || 'Service not available');
213
+ }
214
+ await oxyServices.deleteAccount(confirmText);
215
+ _bloom.toast.success(t('accountOverview.items.deleteAccount.success') || 'Account deleted successfully');
216
+ deleteAccountDialog.close();
217
+ await logout();
218
+ onClose?.();
219
+ }, [oxyServices, user, logout, onClose, t, deleteAccountDialog]);
220
+ const handleDownloadData = (0, _react.useCallback)(() => {
221
+ if (!user) {
222
+ _bloom.toast.error(t('accountOverview.items.downloadData.error') || 'Service not available');
223
+ return;
224
+ }
225
+ downloadDataDialog.open();
226
+ }, [user, t, downloadDataDialog]);
227
+ const handleDeleteAccount = (0, _react.useCallback)(() => {
228
+ if (!user) {
229
+ _bloom.toast.error(t('accountOverview.items.deleteAccount.error') || 'User not available');
230
+ return;
231
+ }
232
+ deleteAccountDialog.open();
233
+ }, [user, t, deleteAccountDialog]);
234
+ if (!isAuthenticated) {
235
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
236
+ style: [styles.container, {
237
+ backgroundColor: bloomTheme.colors.background
238
+ }],
239
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Header.default, {
240
+ title: t('manageAccount.title') || 'Manage your Oxy Account',
241
+ onBack: goBack || onClose,
242
+ elevation: "subtle"
243
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
244
+ style: styles.center,
245
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
246
+ style: [styles.notSignedIn, {
247
+ color: bloomTheme.colors.text
248
+ }],
249
+ children: t('common.status.notSignedIn') || 'Not signed in'
250
+ })
251
+ })]
252
+ });
253
+ }
254
+ if (userLoading && !user) {
255
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
256
+ style: [styles.container, {
257
+ backgroundColor: bloomTheme.colors.background
258
+ }],
259
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Header.default, {
260
+ title: t('manageAccount.title') || 'Manage your Oxy Account',
261
+ onBack: goBack || onClose,
262
+ elevation: "subtle"
263
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
264
+ style: styles.center,
265
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
266
+ color: bloomTheme.colors.primary,
267
+ size: "large"
268
+ })
269
+ })]
270
+ });
271
+ }
272
+ const deviceRows = deviceSessions ?? [];
273
+ const otherDevices = deviceRows.filter(d => !d.isCurrent);
274
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
275
+ style: [styles.container, {
276
+ backgroundColor: bloomTheme.colors.background
277
+ }],
278
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Header.default, {
279
+ title: t('manageAccount.title') || 'Manage your Oxy Account',
280
+ onBack: goBack || onClose,
281
+ elevation: "subtle"
282
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
283
+ style: styles.scroll,
284
+ contentContainerStyle: styles.scrollContent,
285
+ refreshControl: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.RefreshControl, {
286
+ refreshing: deviceSessionsRefetching,
287
+ onRefresh: refetchDeviceSessions,
288
+ tintColor: bloomTheme.colors.primary
289
+ }),
290
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
291
+ style: [styles.profileCard, {
292
+ backgroundColor: bloomTheme.colors.card
293
+ }],
294
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
295
+ onPress: openAvatarPicker,
296
+ accessibilityRole: "button",
297
+ accessibilityLabel: t('editProfile.changeAvatar') || 'Change avatar',
298
+ style: styles.avatarTouchable,
299
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
300
+ uri: avatarUri,
301
+ name: displayName,
302
+ size: 88
303
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
304
+ style: [styles.avatarBadge, {
305
+ backgroundColor: bloomTheme.colors.primary
306
+ }],
307
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
308
+ name: "camera",
309
+ size: 14,
310
+ color: bloomTheme.colors.negativeForeground
311
+ })
312
+ })]
313
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
314
+ style: [styles.displayName, {
315
+ color: bloomTheme.colors.text
316
+ }],
317
+ numberOfLines: 1,
318
+ children: displayName
319
+ }), handle ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
320
+ style: [styles.handle, {
321
+ color: bloomTheme.colors.textSecondary
322
+ }],
323
+ numberOfLines: 1,
324
+ children: user?.username ? `@${handle}` : handle
325
+ }) : null, user?.email ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
326
+ style: [styles.email, {
327
+ color: bloomTheme.colors.textSecondary
328
+ }],
329
+ numberOfLines: 1,
330
+ children: user.email
331
+ }) : null]
332
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_settingsList.SettingsListGroup, {
333
+ title: t('manageAccount.sections.profile') || 'Profile',
334
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
335
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
336
+ name: "account-circle",
337
+ color: palette.iconPersonalInfo
338
+ }),
339
+ title: t('manageAccount.items.editProfile.title') || 'Edit profile',
340
+ description: t('manageAccount.items.editProfile.subtitle') || 'Name, username, bio, links',
341
+ onPress: () => navigate?.('EditProfileField', {
342
+ field: 'username'
343
+ })
344
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
345
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
346
+ name: "palette",
347
+ color: palette.iconData
348
+ }),
349
+ title: t('manageAccount.items.theme.title') || 'Theme color',
350
+ description: t('manageAccount.items.theme.subtitle') || 'Personalize your Bloom color',
351
+ onPress: () => navigate?.('EditProfileField', {
352
+ field: 'color'
353
+ })
354
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
355
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
356
+ name: "eye",
357
+ color: palette.iconHome
358
+ }),
359
+ title: t('editProfile.items.previewProfile.title') || 'Preview profile',
360
+ description: t('editProfile.items.previewProfile.subtitle') || 'See how your profile looks to others',
361
+ onPress: () => user?.id ? navigate?.('Profile', {
362
+ userId: user.id
363
+ }) : undefined,
364
+ disabled: !user?.id
365
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
366
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
367
+ name: "check-circle",
368
+ color: palette.iconPersonalInfo
369
+ }),
370
+ title: t('editProfile.items.verifyAccount.title') || 'Verify account',
371
+ description: t('editProfile.items.verifyAccount.subtitle') || 'Get a verified badge',
372
+ onPress: () => navigate?.('AccountVerification')
373
+ })]
374
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_settingsList.SettingsListGroup, {
375
+ title: t('manageAccount.sections.sessions') || 'Sessions & devices',
376
+ children: [deviceSessionsLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
377
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
378
+ name: "sync",
379
+ color: bloomTheme.colors.primary
380
+ }),
381
+ title: t('manageAccount.sessions.loading') || 'Loading sessions…',
382
+ rightElement: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
383
+ color: bloomTheme.colors.primary,
384
+ size: "small"
385
+ }),
386
+ showChevron: false,
387
+ disabled: true
388
+ }) : deviceRows.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
389
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
390
+ name: "cellphone",
391
+ color: bloomTheme.colors.textTertiary
392
+ }),
393
+ title: t('manageAccount.sessions.empty') || 'No active sessions',
394
+ showChevron: false,
395
+ disabled: true
396
+ }) : deviceRows.map(device => /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
397
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
398
+ name: device.isCurrent ? 'cellphone' : 'cellphone-basic',
399
+ color: device.isCurrent ? bloomTheme.colors.success : bloomTheme.colors.primary
400
+ }),
401
+ title: `${device.deviceName}${device.isCurrent ? ` (${t('manageAccount.sessions.thisDevice') || 'This device'})` : ''}`,
402
+ description: t('manageAccount.sessions.lastActive', {
403
+ relative: formatRelative(device.lastActive)
404
+ }) || `Last active ${formatRelative(device.lastActive)}`,
405
+ onPress: device.isCurrent ? undefined : () => confirmRemoveDevice(device),
406
+ disabled: device.isCurrent || removingDeviceId === device.sessionId,
407
+ rightElement: !device.isCurrent ? removingDeviceId === device.sessionId ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
408
+ color: bloomTheme.colors.error,
409
+ size: "small"
410
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
411
+ name: "log-out-outline",
412
+ size: 18,
413
+ color: bloomTheme.colors.error
414
+ }) : undefined,
415
+ showChevron: false
416
+ }, `device-${device.sessionId}`)), otherDevices.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
417
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
418
+ name: "logout",
419
+ color: bloomTheme.colors.error
420
+ }),
421
+ title: t('manageAccount.sessions.signOutAllOnThisDevice') || 'Sign out of all other devices',
422
+ description: t('manageAccount.sessions.signOutAllSubtitle', {
423
+ count: otherDevices.length
424
+ }) || `End ${otherDevices.length} other device session(s)`,
425
+ onPress: () => signOutAllDevicesDialog.open(),
426
+ destructive: true,
427
+ showChevron: false,
428
+ disabled: signingOutAllDevices,
429
+ rightElement: signingOutAllDevices ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
430
+ color: bloomTheme.colors.error,
431
+ size: "small"
432
+ }) : undefined
433
+ }) : null]
434
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_settingsList.SettingsListGroup, {
435
+ title: t('manageAccount.sections.security') || 'Security',
436
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
437
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
438
+ name: "shield-check",
439
+ color: palette.iconSecurity
440
+ }),
441
+ title: t('manageAccount.items.security.title') || 'Security settings',
442
+ description: t('manageAccount.items.security.subtitle') || 'Password, 2FA, recovery',
443
+ onPress: () => navigate?.('PrivacySettings')
444
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
445
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
446
+ name: "star",
447
+ color: palette.iconPayments
448
+ }),
449
+ title: t('accountOverview.items.premium.title') || 'Oxy+',
450
+ description: user?.isPremium ? t('accountOverview.items.premium.manage') || 'Manage your premium plan' : t('accountOverview.items.premium.upgrade') || 'Upgrade to premium features',
451
+ onPress: () => navigate?.('PremiumSubscription')
452
+ }), user?.isPremium || subscription?.status === 'active' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
453
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
454
+ name: "credit-card",
455
+ color: palette.iconPersonalInfo
456
+ }),
457
+ title: t('manageAccount.items.billing.title') || 'Billing',
458
+ description: t('manageAccount.items.billing.subtitle') || 'Manage subscription and payment methods',
459
+ onPress: () => navigate?.('PaymentGateway')
460
+ }) : null]
461
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_settingsList.SettingsListGroup, {
462
+ title: t('accountOverview.sections.quickActions') || 'Account & data',
463
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
464
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
465
+ name: "clock",
466
+ color: palette.iconSecurity
467
+ }),
468
+ title: t('accountOverview.items.history.title') || 'History',
469
+ description: t('accountOverview.items.history.subtitle') || 'View and manage your search history',
470
+ onPress: () => navigate?.('HistoryView')
471
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
472
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
473
+ name: "bookmark",
474
+ color: palette.iconStorage
475
+ }),
476
+ title: t('accountOverview.items.saves.title') || 'Saves & Collections',
477
+ description: t('accountOverview.items.saves.subtitle') || 'View your saved items and collections',
478
+ onPress: () => navigate?.('SavesCollections')
479
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
480
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
481
+ name: "folder",
482
+ color: palette.iconStorage
483
+ }),
484
+ title: t('accountCenter.items.fileManagement.title') || 'Files',
485
+ description: t('accountCenter.items.fileManagement.subtitle') || 'Upload, download, and manage your files',
486
+ onPress: () => navigate?.('FileManagement')
487
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
488
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
489
+ name: "download",
490
+ color: palette.iconPersonalInfo
491
+ }),
492
+ title: t('accountOverview.items.downloadData.title') || 'Download your data',
493
+ description: t('accountOverview.items.downloadData.subtitle') || 'Export a copy of your account data',
494
+ onPress: handleDownloadData
495
+ })]
496
+ }), managedAccounts.length > 0 || isAuthenticated ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_settingsList.SettingsListGroup, {
497
+ title: t('accountCenter.sections.managedAccounts') || 'Managed accounts',
498
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
499
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
500
+ name: "account-switch",
501
+ color: palette.iconStorage
502
+ }),
503
+ title: t('accountCenter.items.manageIdentities.title') || 'Manage identities',
504
+ description: managedAccounts.length > 0 ? t('accountCenter.items.manageIdentities.count', {
505
+ count: managedAccounts.length
506
+ }) || `${managedAccounts.length} managed ${managedAccounts.length === 1 ? 'identity' : 'identities'}` : t('accountCenter.items.manageIdentities.empty') || 'Sub-accounts you control',
507
+ onPress: () => navigate?.('CreateManagedAccount')
508
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
509
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
510
+ name: "account-plus",
511
+ color: palette.iconPersonalInfo
512
+ }),
513
+ title: t('accountCenter.items.createIdentity.title') || 'Create new identity',
514
+ description: t('accountCenter.items.createIdentity.subtitle') || 'Add a managed sub-account',
515
+ onPress: () => navigate?.('CreateManagedAccount')
516
+ })]
517
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_settingsList.SettingsListGroup, {
518
+ title: t('manageAccount.sections.preferences') || 'Preferences',
519
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
520
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
521
+ name: "cog",
522
+ color: palette.iconData
523
+ }),
524
+ title: t('preferences.title') || 'Preferences',
525
+ description: t('preferences.subtitle') || 'Theme, motion, and regional settings',
526
+ onPress: () => navigate?.('Preferences')
527
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
528
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
529
+ name: "bell",
530
+ color: palette.iconPersonalInfo
531
+ }),
532
+ title: t('notifications.title') || 'Notifications',
533
+ description: t('notifications.subtitle') || 'Manage push, email, and security alerts',
534
+ onPress: () => navigate?.('Notifications')
535
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
536
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
537
+ name: "translate",
538
+ color: palette.iconPersonalInfo
539
+ }),
540
+ title: t('language.title') || 'Language',
541
+ description: t('language.subtitle') || 'Choose your preferred language',
542
+ onPress: () => navigate?.('LanguageSelector')
543
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
544
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
545
+ name: "apps",
546
+ color: palette.iconData
547
+ }),
548
+ title: t('connectedApps.title') || 'Connected apps',
549
+ description: t('connectedApps.subtitle') || 'Manage third-party app access',
550
+ onPress: () => navigate?.('ConnectedApps')
551
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
552
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
553
+ name: "magnify",
554
+ color: palette.iconSecurity
555
+ }),
556
+ title: t('accountOverview.items.searchSettings.title') || 'Search settings',
557
+ description: t('accountOverview.items.searchSettings.subtitle') || 'SafeSearch and personalization',
558
+ onPress: () => navigate?.('SearchSettings')
559
+ })]
560
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_settingsList.SettingsListGroup, {
561
+ title: t('accountOverview.sections.support') || 'Support',
562
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
563
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
564
+ name: "help-circle",
565
+ color: palette.iconSecurity
566
+ }),
567
+ title: t('accountOverview.items.help.title') || 'Help & support',
568
+ description: t('accountOverview.items.help.subtitle') || 'Get help and contact support',
569
+ onPress: () => navigate?.('HelpSupport')
570
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
571
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
572
+ name: "message-text",
573
+ color: palette.iconData
574
+ }),
575
+ title: t('feedback.title') || 'Send feedback',
576
+ description: t('feedback.subtitle') || 'Tell us what you think',
577
+ onPress: () => navigate?.('Feedback')
578
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
579
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
580
+ name: "information",
581
+ color: palette.iconHome
582
+ }),
583
+ title: t('accountOverview.items.about.title') || 'About',
584
+ description: t('accountOverview.items.about.subtitle') || 'Version and system details',
585
+ onPress: () => navigate?.('AppInfo')
586
+ })]
587
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_settingsList.SettingsListGroup, {
588
+ title: t('manageAccount.sections.legal') || 'Legal',
589
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
590
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
591
+ name: "shield-check",
592
+ color: palette.iconPersonalInfo
593
+ }),
594
+ title: t('accountOverview.items.privacyPolicy.title') || 'Privacy policy',
595
+ description: t('accountOverview.items.privacyPolicy.subtitle') || 'How we handle your data',
596
+ onPress: () => navigate?.('LegalDocuments', {
597
+ initialStep: 1
598
+ })
599
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
600
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
601
+ name: "file-document",
602
+ color: palette.iconSecurity
603
+ }),
604
+ title: t('accountOverview.items.termsOfService.title') || 'Terms of service',
605
+ description: t('accountOverview.items.termsOfService.subtitle') || 'Terms and conditions of use',
606
+ onPress: () => navigate?.('LegalDocuments', {
607
+ initialStep: 2
608
+ })
609
+ })]
610
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListGroup, {
611
+ title: t('manageAccount.sections.dangerZone') || 'Danger zone',
612
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
613
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
614
+ name: "delete",
615
+ color: bloomTheme.colors.error
616
+ }),
617
+ title: t('accountOverview.items.deleteAccount.title') || 'Delete account',
618
+ description: t('accountOverview.items.deleteAccount.subtitle') || 'Permanently delete your account and all data',
619
+ onPress: handleDeleteAccount,
620
+ destructive: true
621
+ })
622
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListGroup, {
623
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_settingsList.SettingsListItem, {
624
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingsIcon.SettingsIcon, {
625
+ name: "logout",
626
+ color: bloomTheme.colors.error
627
+ }),
628
+ title: t('manageAccount.signOutOfThisAccount') || 'Sign out of this account',
629
+ onPress: () => signOutDialog.open(),
630
+ destructive: true,
631
+ showChevron: false,
632
+ disabled: signingOut,
633
+ rightElement: signingOut ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
634
+ color: bloomTheme.colors.error,
635
+ size: "small"
636
+ }) : undefined
637
+ })
638
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
639
+ style: styles.versionContainer,
640
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
641
+ style: [styles.versionText, {
642
+ color: bloomTheme.colors.textTertiary
643
+ }],
644
+ children: t('accountCenter.version', {
645
+ version: _core.packageInfo.version
646
+ }) || `Version ${_core.packageInfo.version}`
647
+ })
648
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
649
+ style: styles.footerSpacer
650
+ })]
651
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bloom.Dialog, {
652
+ control: signOutDialog,
653
+ title: t('common.actions.signOut') || 'Sign out',
654
+ description: t('common.confirms.signOut') || 'Are you sure you want to sign out?',
655
+ actions: [{
656
+ label: t('common.actions.signOut') || 'Sign out',
657
+ color: 'destructive',
658
+ onPress: handleSignOut
659
+ }, {
660
+ label: t('common.cancel') || 'Cancel',
661
+ color: 'cancel'
662
+ }]
663
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bloom.Dialog, {
664
+ control: signOutAllDevicesDialog,
665
+ title: t('manageAccount.confirms.signOutAllDevicesTitle') || 'Sign out of all other devices',
666
+ description: t('manageAccount.confirms.signOutAllDevices', {
667
+ count: otherDevices.length
668
+ }) || `End ${otherDevices.length} other device session(s)? This won't sign you out here.`,
669
+ actions: [{
670
+ label: t('common.actions.signOut') || 'Sign out',
671
+ color: 'destructive',
672
+ onPress: handleSignOutAllDevices
673
+ }, {
674
+ label: t('common.cancel') || 'Cancel',
675
+ color: 'cancel'
676
+ }]
677
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bloom.Dialog, {
678
+ control: removeDeviceDialog,
679
+ title: t('manageAccount.confirms.removeDeviceTitle') || 'Remove device',
680
+ description: pendingRemoveDevice ? t('manageAccount.confirms.removeDevice', {
681
+ name: pendingRemoveDevice.deviceName
682
+ }) || `Sign out from "${pendingRemoveDevice.deviceName}"?` : '',
683
+ actions: [{
684
+ label: t('common.remove') || 'Remove',
685
+ color: 'destructive',
686
+ onPress: handleRemoveDevice
687
+ }, {
688
+ label: t('common.cancel') || 'Cancel',
689
+ color: 'cancel'
690
+ }]
691
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_bloom.Dialog, {
692
+ control: downloadDataDialog,
693
+ title: t('accountOverview.items.downloadData.confirmTitle') || 'Download account data',
694
+ description: t('accountOverview.items.downloadData.confirmMessage') || 'Choose the format for your account data export:',
695
+ actions: [{
696
+ label: 'JSON',
697
+ onPress: () => performDownload('json')
698
+ }, {
699
+ label: 'CSV',
700
+ onPress: () => performDownload('csv')
701
+ }, {
702
+ label: t('common.cancel') || 'Cancel',
703
+ color: 'cancel'
704
+ }]
705
+ }), user ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_DeleteAccountModal.default, {
706
+ control: deleteAccountDialog,
707
+ username: user.username || '',
708
+ onDelete: handleConfirmDelete,
709
+ t: t
710
+ }) : null]
711
+ });
712
+ };
713
+ const styles = _reactNative.StyleSheet.create({
714
+ container: {
715
+ flex: 1
716
+ },
717
+ center: {
718
+ flex: 1,
719
+ alignItems: 'center',
720
+ justifyContent: 'center'
721
+ },
722
+ notSignedIn: {
723
+ fontSize: 16
724
+ },
725
+ scroll: {
726
+ flex: 1
727
+ },
728
+ scrollContent: {
729
+ ..._spacing.screenContentStyle,
730
+ paddingTop: 0
731
+ },
732
+ profileCard: {
733
+ alignItems: 'center',
734
+ paddingVertical: 24,
735
+ paddingHorizontal: 20,
736
+ borderRadius: 24,
737
+ marginBottom: 16
738
+ },
739
+ avatarTouchable: {
740
+ position: 'relative',
741
+ marginBottom: 12
742
+ },
743
+ avatarBadge: {
744
+ position: 'absolute',
745
+ right: 0,
746
+ bottom: 0,
747
+ width: 28,
748
+ height: 28,
749
+ borderRadius: 14,
750
+ alignItems: 'center',
751
+ justifyContent: 'center',
752
+ borderWidth: 2,
753
+ borderColor: '#fff'
754
+ },
755
+ displayName: {
756
+ fontSize: 22,
757
+ fontWeight: '700',
758
+ marginBottom: 4
759
+ },
760
+ handle: {
761
+ fontSize: 14,
762
+ marginBottom: 2
763
+ },
764
+ email: {
765
+ fontSize: 14
766
+ },
767
+ footerSpacer: {
768
+ height: 24
769
+ },
770
+ versionContainer: {
771
+ alignItems: 'center',
772
+ marginTop: 12,
773
+ marginBottom: 8
774
+ },
775
+ versionText: {
776
+ fontSize: 12
777
+ }
778
+ });
779
+ var _default = exports.default = ManageAccountScreen;
780
+ //# sourceMappingURL=ManageAccountScreen.js.map