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