@oxyhq/services 5.7.5 → 5.8.1

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 (239) hide show
  1. package/README.md +76 -76
  2. package/lib/commonjs/core/index.js +177 -102
  3. package/lib/commonjs/core/index.js.map +1 -1
  4. package/lib/commonjs/index.js +88 -29
  5. package/lib/commonjs/index.js.map +1 -1
  6. package/lib/commonjs/node/createAuth.js +585 -7
  7. package/lib/commonjs/node/createAuth.js.map +1 -1
  8. package/lib/commonjs/node/index.js +38 -1
  9. package/lib/commonjs/node/index.js.map +1 -1
  10. package/lib/commonjs/ui/components/Avatar.js +15 -6
  11. package/lib/commonjs/ui/components/Avatar.js.map +1 -1
  12. package/lib/commonjs/ui/components/GroupedItem.js +58 -13
  13. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
  14. package/lib/commonjs/ui/components/GroupedSection.js +7 -1
  15. package/lib/commonjs/ui/components/GroupedSection.js.map +1 -1
  16. package/lib/commonjs/ui/components/Header.js +322 -0
  17. package/lib/commonjs/ui/components/Header.js.map +1 -0
  18. package/lib/commonjs/ui/components/OxyProvider.js +23 -7
  19. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  20. package/lib/commonjs/ui/components/index.js +7 -0
  21. package/lib/commonjs/ui/components/index.js.map +1 -1
  22. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +1 -1
  23. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
  24. package/lib/commonjs/ui/components/internal/TextField.js +606 -546
  25. package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
  26. package/lib/commonjs/ui/components/internal/TextField.md +436 -0
  27. package/lib/commonjs/ui/context/OxyContext.js +122 -78
  28. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  29. package/lib/commonjs/ui/hooks/useSessionSocket.js +5 -2
  30. package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
  31. package/lib/commonjs/ui/navigation/OxyRouter.js +1 -1
  32. package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
  33. package/lib/commonjs/ui/screens/AccountCenterScreen.js +6 -6
  34. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  35. package/lib/commonjs/ui/screens/AccountManagementDemo.js +3 -3
  36. package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -1
  37. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +241 -598
  38. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  39. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +1151 -406
  40. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  41. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +135 -237
  42. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  43. package/lib/commonjs/ui/screens/AppInfoScreen.js +246 -463
  44. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  45. package/lib/commonjs/ui/screens/FeedbackScreen.js +3 -3
  46. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  47. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +808 -650
  48. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  49. package/lib/commonjs/ui/screens/RecoverAccountScreen.js +51 -72
  50. package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -1
  51. package/lib/commonjs/ui/screens/SessionManagementScreen.js +11 -29
  52. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
  53. package/lib/commonjs/ui/screens/SignInScreen.js +30 -303
  54. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/SignUpScreen.js +4 -4
  56. package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
  57. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +19 -31
  58. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -1
  59. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +7 -10
  60. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  61. package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js +11 -5
  62. package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js.map +1 -1
  63. package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js +11 -4
  64. package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js.map +1 -1
  65. package/lib/commonjs/ui/stores/authStore.js +12 -0
  66. package/lib/commonjs/ui/stores/authStore.js.map +1 -1
  67. package/lib/commonjs/ui/styles/authStyles.js +337 -0
  68. package/lib/commonjs/ui/styles/authStyles.js.map +1 -0
  69. package/lib/commonjs/ui/styles/index.js +11 -0
  70. package/lib/commonjs/ui/styles/index.js.map +1 -1
  71. package/lib/module/core/index.js +177 -41
  72. package/lib/module/core/index.js.map +1 -1
  73. package/lib/module/index.js +26 -4
  74. package/lib/module/index.js.map +1 -1
  75. package/lib/module/node/createAuth.js +584 -7
  76. package/lib/module/node/createAuth.js.map +1 -1
  77. package/lib/module/node/index.js +7 -1
  78. package/lib/module/node/index.js.map +1 -1
  79. package/lib/module/ui/components/Avatar.js +15 -6
  80. package/lib/module/ui/components/Avatar.js.map +1 -1
  81. package/lib/module/ui/components/GroupedItem.js +59 -14
  82. package/lib/module/ui/components/GroupedItem.js.map +1 -1
  83. package/lib/module/ui/components/GroupedSection.js +7 -1
  84. package/lib/module/ui/components/GroupedSection.js.map +1 -1
  85. package/lib/module/ui/components/Header.js +317 -0
  86. package/lib/module/ui/components/Header.js.map +1 -0
  87. package/lib/module/ui/components/OxyProvider.js +25 -9
  88. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  89. package/lib/module/ui/components/index.js +1 -0
  90. package/lib/module/ui/components/index.js.map +1 -1
  91. package/lib/module/ui/components/internal/GroupedPillButtons.js +1 -1
  92. package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
  93. package/lib/module/ui/components/internal/TextField.js +607 -547
  94. package/lib/module/ui/components/internal/TextField.js.map +1 -1
  95. package/lib/module/ui/components/internal/TextField.md +436 -0
  96. package/lib/module/ui/context/OxyContext.js +121 -77
  97. package/lib/module/ui/context/OxyContext.js.map +1 -1
  98. package/lib/module/ui/hooks/useSessionSocket.js +5 -2
  99. package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
  100. package/lib/module/ui/navigation/OxyRouter.js +1 -1
  101. package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
  102. package/lib/module/ui/screens/AccountCenterScreen.js +6 -6
  103. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  104. package/lib/module/ui/screens/AccountManagementDemo.js +3 -3
  105. package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -1
  106. package/lib/module/ui/screens/AccountOverviewScreen.js +242 -597
  107. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  108. package/lib/module/ui/screens/AccountSettingsScreen.js +1152 -407
  109. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  110. package/lib/module/ui/screens/AccountSwitcherScreen.js +135 -237
  111. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  112. package/lib/module/ui/screens/AppInfoScreen.js +248 -465
  113. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  114. package/lib/module/ui/screens/FeedbackScreen.js +3 -3
  115. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  116. package/lib/module/ui/screens/PaymentGatewayScreen.js +809 -651
  117. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  118. package/lib/module/ui/screens/RecoverAccountScreen.js +53 -74
  119. package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -1
  120. package/lib/module/ui/screens/SessionManagementScreen.js +11 -29
  121. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  122. package/lib/module/ui/screens/SignInScreen.js +32 -305
  123. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  124. package/lib/module/ui/screens/SignUpScreen.js +5 -5
  125. package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
  126. package/lib/module/ui/screens/internal/SignInPasswordStep.js +19 -31
  127. package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -1
  128. package/lib/module/ui/screens/internal/SignInUsernameStep.js +7 -10
  129. package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  130. package/lib/module/ui/screens/internal/SignUpIdentityStep.js +11 -5
  131. package/lib/module/ui/screens/internal/SignUpIdentityStep.js.map +1 -1
  132. package/lib/module/ui/screens/internal/SignUpSecurityStep.js +11 -4
  133. package/lib/module/ui/screens/internal/SignUpSecurityStep.js.map +1 -1
  134. package/lib/module/ui/stores/authStore.js +12 -0
  135. package/lib/module/ui/stores/authStore.js.map +1 -1
  136. package/lib/module/ui/styles/authStyles.js +332 -0
  137. package/lib/module/ui/styles/authStyles.js.map +1 -0
  138. package/lib/module/ui/styles/index.js +1 -0
  139. package/lib/module/ui/styles/index.js.map +1 -1
  140. package/lib/typescript/core/index.d.ts +68 -24
  141. package/lib/typescript/core/index.d.ts.map +1 -1
  142. package/lib/typescript/index.d.ts +13 -3
  143. package/lib/typescript/index.d.ts.map +1 -1
  144. package/lib/typescript/node/createAuth.d.ts +112 -0
  145. package/lib/typescript/node/createAuth.d.ts.map +1 -1
  146. package/lib/typescript/node/index.d.ts +2 -0
  147. package/lib/typescript/node/index.d.ts.map +1 -1
  148. package/lib/typescript/ui/components/Avatar.d.ts.map +1 -1
  149. package/lib/typescript/ui/components/GroupedItem.d.ts +6 -0
  150. package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
  151. package/lib/typescript/ui/components/GroupedSection.d.ts +6 -0
  152. package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -1
  153. package/lib/typescript/ui/components/Header.d.ts +22 -0
  154. package/lib/typescript/ui/components/Header.d.ts.map +1 -0
  155. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  156. package/lib/typescript/ui/components/index.d.ts +1 -0
  157. package/lib/typescript/ui/components/index.d.ts.map +1 -1
  158. package/lib/typescript/ui/components/internal/TextField.d.ts +31 -16
  159. package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
  160. package/lib/typescript/ui/context/OxyContext.d.ts +5 -2
  161. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  162. package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -1
  163. package/lib/typescript/ui/navigation/types.d.ts +9 -2
  164. package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
  165. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  166. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  167. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
  168. package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
  169. package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  170. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +5 -1
  171. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -1
  172. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  173. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  174. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +1 -1
  175. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -1
  176. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +0 -1
  177. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -1
  178. package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts.map +1 -1
  179. package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts.map +1 -1
  180. package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
  181. package/lib/typescript/ui/styles/authStyles.d.ts +326 -0
  182. package/lib/typescript/ui/styles/authStyles.d.ts.map +1 -0
  183. package/lib/typescript/ui/styles/index.d.ts +1 -0
  184. package/lib/typescript/ui/styles/index.d.ts.map +1 -1
  185. package/package.json +1 -4
  186. package/src/core/index.ts +195 -41
  187. package/src/index.ts +72 -4
  188. package/src/node/createAuth.ts +623 -7
  189. package/src/node/index.ts +19 -1
  190. package/src/ui/components/Avatar.tsx +11 -5
  191. package/src/ui/components/GroupedItem.tsx +57 -9
  192. package/src/ui/components/GroupedSection.tsx +12 -0
  193. package/src/ui/components/Header.tsx +364 -0
  194. package/src/ui/components/OxyProvider.tsx +31 -15
  195. package/src/ui/components/index.ts +1 -0
  196. package/src/ui/components/internal/GroupedPillButtons.tsx +1 -1
  197. package/src/ui/components/internal/TextField.md +436 -0
  198. package/src/ui/components/internal/TextField.tsx +720 -620
  199. package/src/ui/context/OxyContext.tsx +150 -63
  200. package/src/ui/hooks/useSessionSocket.ts +5 -2
  201. package/src/ui/navigation/OxyRouter.tsx +1 -1
  202. package/src/ui/navigation/types.ts +10 -2
  203. package/src/ui/screens/AccountCenterScreen.tsx +5 -5
  204. package/src/ui/screens/AccountManagementDemo.tsx +9 -9
  205. package/src/ui/screens/AccountOverviewScreen.tsx +265 -414
  206. package/src/ui/screens/AccountSettingsScreen.tsx +1165 -403
  207. package/src/ui/screens/AccountSwitcherScreen.tsx +158 -202
  208. package/src/ui/screens/AppInfoScreen.tsx +270 -497
  209. package/src/ui/screens/FeedbackScreen.tsx +3 -3
  210. package/src/ui/screens/PaymentGatewayScreen.tsx +668 -365
  211. package/src/ui/screens/ProfileScreen.tsx +5 -5
  212. package/src/ui/screens/RecoverAccountScreen.tsx +46 -74
  213. package/src/ui/screens/SessionManagementScreen.tsx +14 -22
  214. package/src/ui/screens/SignInScreen.tsx +27 -294
  215. package/src/ui/screens/SignUpScreen.tsx +5 -5
  216. package/src/ui/screens/internal/SignInPasswordStep.tsx +11 -22
  217. package/src/ui/screens/internal/SignInUsernameStep.tsx +3 -10
  218. package/src/ui/screens/internal/SignUpIdentityStep.tsx +2 -5
  219. package/src/ui/screens/internal/SignUpSecurityStep.tsx +3 -4
  220. package/src/ui/stores/authStore.ts +12 -0
  221. package/src/ui/styles/authStyles.ts +352 -0
  222. package/src/ui/styles/index.ts +1 -0
  223. package/lib/commonjs/core/auth-manager.js +0 -440
  224. package/lib/commonjs/core/auth-manager.js.map +0 -1
  225. package/lib/commonjs/core/use-auth.js +0 -244
  226. package/lib/commonjs/core/use-auth.js.map +0 -1
  227. package/lib/module/core/auth-manager.js +0 -432
  228. package/lib/module/core/auth-manager.js.map +0 -1
  229. package/lib/module/core/use-auth.js +0 -235
  230. package/lib/module/core/use-auth.js.map +0 -1
  231. package/lib/typescript/core/auth-manager.d.ts +0 -136
  232. package/lib/typescript/core/auth-manager.d.ts.map +0 -1
  233. package/lib/typescript/core/use-auth.d.ts +0 -79
  234. package/lib/typescript/core/use-auth.d.ts.map +0 -1
  235. package/src/__tests__/middleware.test.ts +0 -105
  236. package/src/__tests__/setup.ts +0 -10
  237. package/src/__tests__/zero-config-auth.test.ts +0 -607
  238. package/src/core/auth-manager.ts +0 -500
  239. package/src/core/use-auth.tsx +0 -245
@@ -11,6 +11,7 @@ var _Avatar = _interopRequireDefault(require("../components/Avatar"));
11
11
  var _OxyIcon = _interopRequireDefault(require("../components/icon/OxyIcon"));
12
12
  var _sonner = require("../../lib/sonner");
13
13
  var _confirmAction = require("../utils/confirmAction");
14
+ var _components = require("../components");
14
15
  var _jsxRuntime = require("react/jsx-runtime");
15
16
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
17
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
@@ -22,8 +23,8 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
22
23
  * - useMemo for additional accounts filtering (only recalculates when dependencies change)
23
24
  * - useCallback for event handlers to prevent unnecessary re-renders
24
25
  * - React.memo wrapper to prevent re-renders when props haven't changed
25
- */
26
- const AccountOverviewScreen = ({
26
+ * - GroupedSection components for better organization and cleaner code
27
+ */const AccountOverviewScreen = ({
27
28
  onClose,
28
29
  theme,
29
30
  navigate
@@ -159,545 +160,259 @@ const AccountOverviewScreen = ({
159
160
  style: [styles.container, {
160
161
  backgroundColor: '#f2f2f2'
161
162
  }],
162
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
163
- style: styles.header,
164
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
165
- style: styles.headerTitle,
166
- children: "Account"
167
- }), onClose && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
168
- style: styles.closeButton,
169
- onPress: onClose,
170
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
171
- style: styles.closeButtonText,
172
- children: "\xD7"
173
- })
174
- })]
163
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Header, {
164
+ title: "Account",
165
+ theme: theme,
166
+ onBack: onClose,
167
+ variant: "minimal",
168
+ elevation: "subtle"
175
169
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
176
170
  style: styles.content,
177
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
178
- style: styles.section,
179
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
180
- style: styles.sectionTitle,
181
- children: "Profile"
182
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
183
- style: [styles.settingItem, styles.firstSettingItem, styles.lastSettingItem],
184
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
185
- style: styles.userIcon,
186
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
187
- uri: user?.avatar?.url,
188
- name: user?.name?.full,
189
- size: 40,
190
- theme: theme
191
- })
192
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
193
- style: styles.settingInfo,
194
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
195
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
196
- style: styles.settingLabel,
197
- children: user ? typeof user.name === 'string' ? user.name : user.name?.full || user.name?.first || user.username : 'Loading...'
198
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
199
- style: styles.settingDescription,
200
- children: user ? user.email || user.username : 'Loading...'
171
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Section, {
172
+ title: "Profile",
173
+ theme: theme,
174
+ isFirst: true,
175
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
176
+ items: [{
177
+ id: 'profile-info',
178
+ icon: 'person',
179
+ iconColor: '#007AFF',
180
+ title: user ? typeof user.name === 'string' ? user.name : user.name?.full || user.name?.first || user.username : 'Loading...',
181
+ subtitle: user ? user.email || user.username : 'Loading...',
182
+ onPress: () => _sonner.toast.info('Manage your Oxy Account feature coming soon!'),
183
+ customContent: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
184
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
185
+ style: styles.userIcon,
186
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.default, {
187
+ uri: user?.avatar?.url,
188
+ name: user?.name?.full,
189
+ size: 40,
190
+ theme: theme
191
+ })
192
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
193
+ style: styles.manageButton,
194
+ onPress: () => _sonner.toast.info('Manage your Oxy Account feature coming soon!'),
195
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
196
+ style: styles.manageButtonText,
197
+ children: "Manage"
198
+ })
201
199
  })]
202
200
  })
203
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
204
- style: styles.manageButton,
205
- onPress: () => _sonner.toast.info('Manage your Oxy Account feature coming soon!'),
206
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
207
- style: styles.manageButtonText,
208
- children: "Manage"
201
+ }],
202
+ theme: theme
203
+ })
204
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Section, {
205
+ title: "Account Settings",
206
+ theme: theme,
207
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
208
+ items: [{
209
+ id: 'edit-profile',
210
+ icon: 'person-circle',
211
+ iconColor: '#007AFF',
212
+ title: 'Edit Profile',
213
+ subtitle: 'Update your personal information',
214
+ onPress: () => navigate?.('EditProfile', {
215
+ activeTab: 'profile'
209
216
  })
210
- })]
211
- })]
212
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
213
- style: styles.section,
214
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
215
- style: styles.sectionTitle,
216
- children: "Account Settings"
217
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
218
- style: [styles.settingItem, styles.firstSettingItem],
219
- onPress: () => navigate?.('AccountSettings', {
220
- activeTab: 'profile'
221
- }),
222
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
223
- style: styles.settingInfo,
224
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
225
- name: "person-circle",
226
- size: 20,
227
- color: "#007AFF",
228
- style: styles.settingIcon
229
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
230
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
231
- style: styles.settingLabel,
232
- children: "Edit Profile"
233
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
234
- style: styles.settingDescription,
235
- children: "Update your personal information"
236
- })]
237
- })]
238
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
239
- name: "chevron-forward",
240
- size: 16,
241
- color: "#ccc"
242
- })]
243
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
244
- style: styles.settingItem,
245
- onPress: () => navigate?.('AccountSettings', {
246
- activeTab: 'password'
247
- }),
248
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
249
- style: styles.settingInfo,
250
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
251
- name: "shield-checkmark",
252
- size: 20,
253
- color: "#30D158",
254
- style: styles.settingIcon
255
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
256
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
257
- style: styles.settingLabel,
258
- children: "Security & Privacy"
259
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
260
- style: styles.settingDescription,
261
- children: "Password, 2FA, and privacy settings"
262
- })]
263
- })]
264
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
265
- name: "chevron-forward",
266
- size: 16,
267
- color: "#ccc"
268
- })]
269
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
270
- style: styles.settingItem,
271
- onPress: () => navigate?.('AccountSettings', {
272
- activeTab: 'notifications'
273
- }),
274
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
275
- style: styles.settingInfo,
276
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
277
- name: "notifications",
278
- size: 20,
279
- color: "#FF9500",
280
- style: styles.settingIcon
281
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
282
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
283
- style: styles.settingLabel,
284
- children: "Notifications"
285
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
286
- style: styles.settingDescription,
287
- children: "Manage your notification preferences"
288
- })]
289
- })]
290
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
291
- name: "chevron-forward",
292
- size: 16,
293
- color: "#ccc"
294
- })]
295
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
296
- style: [styles.settingItem],
297
- onPress: () => navigate?.('PremiumSubscription'),
298
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
299
- style: styles.settingInfo,
300
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
301
- name: "star",
302
- size: 20,
303
- color: "#FFD700",
304
- style: styles.settingIcon
305
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
306
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
307
- style: styles.settingLabel,
308
- children: "Oxy+ Subscriptions"
309
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
310
- style: styles.settingDescription,
311
- children: user?.isPremium ? 'Manage your premium plan' : 'Upgrade to premium features'
312
- })]
313
- })]
314
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
315
- name: "chevron-forward",
316
- size: 16,
317
- color: "#ccc"
318
- })]
319
- }), user?.isPremium && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
320
- style: [styles.settingItem, styles.lastSettingItem],
321
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
322
- style: styles.settingInfo,
323
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
324
- name: "card",
325
- size: 20,
326
- color: "#34C759",
327
- style: styles.settingIcon
328
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
329
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
330
- style: styles.settingLabel,
331
- children: "Billing Management"
217
+ }, {
218
+ id: 'security-privacy',
219
+ icon: 'shield-checkmark',
220
+ iconColor: '#30D158',
221
+ title: 'Security & Privacy',
222
+ subtitle: 'Password, 2FA, and privacy settings',
223
+ onPress: () => navigate?.('EditProfile', {
224
+ activeTab: 'password'
225
+ })
226
+ }, {
227
+ id: 'notifications',
228
+ icon: 'notifications',
229
+ iconColor: '#FF9500',
230
+ title: 'Notifications',
231
+ subtitle: 'Manage your notification preferences',
232
+ onPress: () => navigate?.('EditProfile', {
233
+ activeTab: 'notifications'
234
+ })
235
+ }, {
236
+ id: 'premium-subscription',
237
+ icon: 'star',
238
+ iconColor: '#FFD700',
239
+ title: 'Oxy+ Subscriptions',
240
+ subtitle: user?.isPremium ? 'Manage your premium plan' : 'Upgrade to premium features',
241
+ onPress: () => navigate?.('PremiumSubscription')
242
+ }, ...(user?.isPremium ? [{
243
+ id: 'billing-management',
244
+ icon: 'card',
245
+ iconColor: '#34C759',
246
+ title: 'Billing Management',
247
+ subtitle: 'Payment methods and invoices',
248
+ onPress: () => _sonner.toast.info('Billing management feature coming soon!')
249
+ }] : [])],
250
+ theme: theme
251
+ })
252
+ }), showMoreAccounts && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Section, {
253
+ title: `Additional Accounts${additionalAccountsData.length > 0 ? ` (${additionalAccountsData.length})` : ''}`,
254
+ theme: theme,
255
+ children: loadingAdditionalAccounts ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
256
+ items: [{
257
+ id: 'loading-accounts',
258
+ icon: 'sync',
259
+ iconColor: '#007AFF',
260
+ title: 'Loading accounts...',
261
+ subtitle: 'Please wait while we load your additional accounts',
262
+ customContent: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
263
+ style: styles.loadingContainer,
264
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
265
+ size: "small",
266
+ color: "#007AFF"
332
267
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
333
- style: styles.settingDescription,
334
- children: "Payment methods and invoices"
268
+ style: styles.loadingText,
269
+ children: "Loading accounts..."
335
270
  })]
336
- })]
337
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
338
- name: "chevron-forward",
339
- size: 16,
340
- color: "#ccc"
341
- })]
342
- })]
343
- }), showMoreAccounts && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
344
- style: styles.section,
345
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
346
- style: styles.sectionTitle,
347
- children: ["Additional Accounts", additionalAccountsData.length > 0 ? ` (${additionalAccountsData.length})` : '']
348
- }), loadingAdditionalAccounts ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
349
- style: [styles.settingItem, styles.firstSettingItem, styles.lastSettingItem],
350
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
351
- style: styles.loadingContainer,
352
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
353
- size: "small",
354
- color: "#007AFF"
355
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
356
- style: styles.loadingText,
357
- children: "Loading accounts..."
358
- })]
359
- })
360
- }) : additionalAccountsData.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
361
- children: additionalAccountsData.map((account, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
362
- style: [styles.settingItem, index === 0 && styles.firstSettingItem, index === additionalAccountsData.length - 1 && styles.lastSettingItem],
271
+ })
272
+ }],
273
+ theme: theme
274
+ }) : additionalAccountsData.length > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
275
+ items: additionalAccountsData.map((account, index) => ({
276
+ id: `account-${account.id}`,
277
+ icon: 'person',
278
+ iconColor: '#5856D6',
279
+ title: typeof account.name === 'object' ? account.name?.full || account.name?.first || account.username : account.name || account.username,
280
+ subtitle: account.email || account.username,
363
281
  onPress: () => {
364
282
  _sonner.toast.info(`Switch to ${account.username}?`);
365
283
  // TODO: Implement account switching logic
366
284
  // switchSession(account.sessionId);
367
285
  },
368
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
369
- style: styles.userIcon,
370
- children: account.avatar?.url ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
371
- source: {
372
- uri: account.avatar.url
373
- },
374
- style: styles.accountAvatarImage
375
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
376
- style: styles.accountAvatarFallback,
377
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
378
- style: styles.accountAvatarText,
379
- children: account.username?.charAt(0).toUpperCase() || '?'
286
+ customContent: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
287
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
288
+ style: styles.userIcon,
289
+ children: account.avatar?.url ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
290
+ source: {
291
+ uri: account.avatar.url
292
+ },
293
+ style: styles.accountAvatarImage
294
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
295
+ style: styles.accountAvatarFallback,
296
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
297
+ style: styles.accountAvatarText,
298
+ children: account.username?.charAt(0).toUpperCase() || '?'
299
+ })
380
300
  })
381
- })
382
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
383
- style: styles.settingInfo,
384
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
385
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
386
- style: styles.settingLabel,
387
- children: typeof account.name === 'object' ? account.name?.full || account.name?.first || account.username : account.name || account.username
388
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
389
- style: styles.settingDescription,
390
- children: account.email || account.username
391
- })]
392
- })
393
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
394
- name: "chevron-forward",
395
- size: 16,
396
- color: "#ccc"
397
- })]
398
- }, account.id))
399
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
400
- style: [styles.settingItem, styles.firstSettingItem, styles.lastSettingItem],
401
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
402
- style: styles.settingInfo,
403
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
404
- name: "person-outline",
405
- size: 20,
406
- color: "#ccc",
407
- style: styles.settingIcon
408
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
409
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
410
- style: styles.settingLabel,
411
- children: "No other accounts"
412
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
413
- style: styles.settingDescription,
414
- children: "Add another account to switch between them"
415
- })]
416
- })]
417
- })
418
- })]
419
- }), showMoreAccounts && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
420
- style: styles.section,
421
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
422
- style: styles.sectionTitle,
423
- children: "Account Management"
424
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
425
- style: [styles.settingItem, styles.firstSettingItem],
426
- onPress: handleAddAccount,
427
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
428
- style: styles.settingInfo,
429
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
430
- name: "add",
431
- size: 20,
432
- color: "#007AFF",
433
- style: styles.settingIcon
434
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
435
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
436
- style: styles.settingLabel,
437
- children: "Add another account"
438
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
439
- style: styles.settingDescription,
440
- children: "Sign in with a different account"
441
- })]
442
- })]
443
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
444
- name: "chevron-forward",
445
- size: 16,
446
- color: "#ccc"
447
- })]
448
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
449
- style: [styles.settingItem, styles.lastSettingItem],
450
- onPress: handleSignOutAll,
451
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
452
- style: styles.settingInfo,
453
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
454
- name: "log-out",
455
- size: 20,
456
- color: "#FF3B30",
457
- style: styles.settingIcon
458
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
459
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
460
- style: styles.settingLabel,
461
- children: "Sign out of all accounts"
462
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
463
- style: styles.settingDescription,
464
- children: "Remove all accounts from this device"
465
- })]
466
- })]
467
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
468
- name: "chevron-forward",
469
- size: 16,
470
- color: "#ccc"
471
- })]
472
- })]
473
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
474
- style: styles.section,
475
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
476
- style: styles.sectionTitle,
477
- children: "Quick Actions"
478
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
479
- style: [styles.settingItem, styles.firstSettingItem],
480
- onPress: () => setShowMoreAccounts(!showMoreAccounts),
481
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
482
- style: styles.settingInfo,
483
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
484
- name: "people",
485
- size: 20,
486
- color: "#5856D6",
487
- style: styles.settingIcon
488
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
489
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
490
- style: styles.settingLabel,
491
- children: [showMoreAccounts ? 'Hide' : 'Show', " Account Switcher"]
492
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
493
- style: styles.settingDescription,
494
- children: showMoreAccounts ? 'Hide account switcher' : additionalAccountsData.length > 0 ? `Switch between ${additionalAccountsData.length + 1} accounts` : loadingAdditionalAccounts ? 'Loading additional accounts...' : 'Manage multiple accounts'
495
- })]
496
- })]
497
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
498
- name: "chevron-forward",
499
- size: 16,
500
- color: "#ccc"
501
- })]
502
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
503
- style: styles.settingItem,
504
- onPress: () => _sonner.toast.info('Download account data feature coming soon!'),
505
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
506
- style: styles.settingInfo,
507
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
508
- name: "download",
509
- size: 20,
510
- color: "#34C759",
511
- style: styles.settingIcon
512
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
513
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
514
- style: styles.settingLabel,
515
- children: "Download My Data"
516
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
517
- style: styles.settingDescription,
518
- children: "Export your account information"
519
- })]
520
- })]
521
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
522
- name: "chevron-forward",
523
- size: 16,
524
- color: "#ccc"
525
- })]
526
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
527
- style: [styles.settingItem, styles.lastSettingItem],
528
- onPress: () => _sonner.toast.info('Delete account feature coming soon!'),
529
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
530
- style: styles.settingInfo,
531
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
532
- name: "trash",
533
- size: 20,
534
- color: "#FF3B30",
535
- style: styles.settingIcon
536
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
537
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
538
- style: styles.settingLabel,
539
- children: "Delete Account"
540
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
541
- style: styles.settingDescription,
542
- children: "Permanently delete your account"
543
- })]
544
- })]
545
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
546
- name: "chevron-forward",
547
- size: 16,
548
- color: "#ccc"
549
- })]
550
- })]
551
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
552
- style: styles.section,
553
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
554
- style: styles.sectionTitle,
555
- children: "Support & Settings"
556
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
557
- style: [styles.settingItem, styles.firstSettingItem],
558
- onPress: () => _sonner.toast.info('Account preferences coming soon!'),
559
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
560
- style: styles.settingInfo,
561
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
562
- name: "settings",
563
- size: 20,
564
- color: "#8E8E93",
565
- style: styles.settingIcon
566
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
567
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
568
- style: styles.settingLabel,
569
- children: "Account Preferences"
570
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
571
- style: styles.settingDescription,
572
- children: "Customize your account experience"
573
- })]
574
- })]
575
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
576
- name: "chevron-forward",
577
- size: 16,
578
- color: "#ccc"
579
- })]
580
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
581
- style: styles.settingItem,
582
- onPress: () => _sonner.toast.info('Help & support feature coming soon!'),
583
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
584
- style: styles.settingInfo,
585
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
586
- name: "help-circle",
587
- size: 20,
588
- color: "#007AFF",
589
- style: styles.settingIcon
590
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
591
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
592
- style: styles.settingLabel,
593
- children: "Help & Support"
594
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
595
- style: styles.settingDescription,
596
- children: "Get help with your account"
301
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
302
+ name: "chevron-forward",
303
+ size: 16,
304
+ color: "#ccc"
597
305
  })]
598
- })]
599
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
600
- name: "chevron-forward",
601
- size: 16,
602
- color: "#ccc"
603
- })]
604
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
605
- style: styles.settingItem,
606
- onPress: () => _sonner.toast.info('Connected apps feature coming soon!'),
607
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
608
- style: styles.settingInfo,
609
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
610
- name: "link",
611
- size: 20,
612
- color: "#32D74B",
613
- style: styles.settingIcon
614
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
615
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
616
- style: styles.settingLabel,
617
- children: "Connected Apps"
618
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
619
- style: styles.settingDescription,
620
- children: "Manage third-party app access"
621
- })]
622
- })]
623
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
624
- name: "chevron-forward",
625
- size: 16,
626
- color: "#ccc"
627
- })]
628
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
629
- style: styles.settingItem,
630
- onPress: () => _sonner.toast.info('Privacy Policy feature coming soon!'),
631
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
632
- style: styles.settingInfo,
633
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
634
- name: "document-lock",
635
- size: 20,
636
- color: "#FF9F0A",
637
- style: styles.settingIcon
638
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
639
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
640
- style: styles.settingLabel,
641
- children: "Privacy Policy"
642
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
643
- style: styles.settingDescription,
644
- children: "Learn about data protection"
645
- })]
646
- })]
647
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
648
- name: "chevron-forward",
649
- size: 16,
650
- color: "#ccc"
651
- })]
652
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
653
- style: [styles.settingItem, styles.lastSettingItem],
654
- onPress: () => _sonner.toast.info('Terms of Service feature coming soon!'),
655
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
656
- style: styles.settingInfo,
657
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
658
- name: "document-text",
659
- size: 20,
660
- color: "#5856D6",
661
- style: styles.settingIcon
662
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
663
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
664
- style: styles.settingLabel,
665
- children: "Terms of Service"
666
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
667
- style: styles.settingDescription,
668
- children: "Read our terms and conditions"
669
- })]
670
- })]
671
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
672
- name: "chevron-forward",
673
- size: 16,
674
- color: "#ccc"
675
- })]
676
- })]
677
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
678
- style: styles.section,
679
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
680
- style: [styles.settingItem, styles.firstSettingItem, styles.lastSettingItem, styles.signOutButton],
306
+ })
307
+ })),
308
+ theme: theme
309
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
310
+ items: [{
311
+ id: 'no-accounts',
312
+ icon: 'person-outline',
313
+ iconColor: '#ccc',
314
+ title: 'No other accounts',
315
+ subtitle: 'Add another account to switch between them'
316
+ }],
317
+ theme: theme
318
+ })
319
+ }), showMoreAccounts && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Section, {
320
+ title: "Account Management",
321
+ theme: theme,
322
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
323
+ items: [{
324
+ id: 'add-account',
325
+ icon: 'add',
326
+ iconColor: '#007AFF',
327
+ title: 'Add another account',
328
+ subtitle: 'Sign in with a different account',
329
+ onPress: handleAddAccount
330
+ }, {
331
+ id: 'sign-out-all',
332
+ icon: 'log-out',
333
+ iconColor: '#FF3B30',
334
+ title: 'Sign out of all accounts',
335
+ subtitle: 'Remove all accounts from this device',
336
+ onPress: handleSignOutAll
337
+ }],
338
+ theme: theme
339
+ })
340
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Section, {
341
+ title: "Quick Actions",
342
+ theme: theme,
343
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
344
+ items: [{
345
+ id: 'account-switcher',
346
+ icon: 'people',
347
+ iconColor: '#5856D6',
348
+ title: `${showMoreAccounts ? 'Hide' : 'Show'} Account Switcher`,
349
+ subtitle: showMoreAccounts ? 'Hide account switcher' : additionalAccountsData.length > 0 ? `Switch between ${additionalAccountsData.length + 1} accounts` : loadingAdditionalAccounts ? 'Loading additional accounts...' : 'Manage multiple accounts',
350
+ onPress: () => setShowMoreAccounts(!showMoreAccounts)
351
+ }, {
352
+ id: 'download-data',
353
+ icon: 'download',
354
+ iconColor: '#34C759',
355
+ title: 'Download My Data',
356
+ subtitle: 'Export your account information',
357
+ onPress: () => _sonner.toast.info('Download account data feature coming soon!')
358
+ }, {
359
+ id: 'delete-account',
360
+ icon: 'trash',
361
+ iconColor: '#FF3B30',
362
+ title: 'Delete Account',
363
+ subtitle: 'Permanently delete your account',
364
+ onPress: () => _sonner.toast.info('Delete account feature coming soon!')
365
+ }],
366
+ theme: theme
367
+ })
368
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Section, {
369
+ title: "Support & Settings",
370
+ theme: theme,
371
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedSection, {
372
+ items: [{
373
+ id: 'account-preferences',
374
+ icon: 'settings',
375
+ iconColor: '#8E8E93',
376
+ title: 'Account Preferences',
377
+ subtitle: 'Customize your account experience',
378
+ onPress: () => _sonner.toast.info('Account preferences coming soon!')
379
+ }, {
380
+ id: 'help-support',
381
+ icon: 'help-circle',
382
+ iconColor: '#007AFF',
383
+ title: 'Help & Support',
384
+ subtitle: 'Get help with your account',
385
+ onPress: () => _sonner.toast.info('Help & support feature coming soon!')
386
+ }, {
387
+ id: 'connected-apps',
388
+ icon: 'link',
389
+ iconColor: '#32D74B',
390
+ title: 'Connected Apps',
391
+ subtitle: 'Manage third-party app access',
392
+ onPress: () => _sonner.toast.info('Connected apps feature coming soon!')
393
+ }, {
394
+ id: 'about',
395
+ icon: 'information-circle',
396
+ iconColor: '#8E8E93',
397
+ title: 'About',
398
+ subtitle: 'App version and information',
399
+ onPress: () => navigate?.('AppInfo')
400
+ }],
401
+ theme: theme
402
+ })
403
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Section, {
404
+ title: "Account Actions",
405
+ theme: theme,
406
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.GroupedItem, {
407
+ icon: "log-out",
408
+ iconColor: "#FF3B30",
409
+ title: "Sign Out",
410
+ subtitle: "Sign out of your current account",
411
+ theme: theme,
681
412
  onPress: confirmLogout,
682
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
683
- style: styles.settingInfo,
684
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyIcon.default, {
685
- name: "log-out",
686
- size: 20,
687
- color: "#ff4757",
688
- style: styles.settingIcon
689
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
690
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
691
- style: [styles.settingLabel, {
692
- color: '#ff4757'
693
- }],
694
- children: "Sign Out"
695
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
696
- style: styles.settingDescription,
697
- children: "Sign out of your account"
698
- })]
699
- })]
700
- })
413
+ isFirst: true,
414
+ isLast: true,
415
+ showChevron: false
701
416
  })
702
417
  })]
703
418
  })]
@@ -708,78 +423,10 @@ const styles = _reactNative.StyleSheet.create({
708
423
  flex: 1,
709
424
  backgroundColor: '#f2f2f2'
710
425
  },
711
- header: {
712
- paddingHorizontal: 20,
713
- paddingTop: 60,
714
- paddingBottom: 16,
715
- backgroundColor: '#fff',
716
- borderBottomWidth: 1,
717
- borderBottomColor: '#e0e0e0',
718
- flexDirection: 'row',
719
- justifyContent: 'space-between',
720
- alignItems: 'center'
721
- },
722
- headerTitle: {
723
- fontSize: 24,
724
- fontWeight: 'bold',
725
- color: '#000'
726
- },
727
- closeButton: {
728
- padding: 8
729
- },
730
- closeButtonText: {
731
- fontSize: 24,
732
- color: '#000',
733
- fontWeight: '300'
734
- },
735
426
  content: {
736
427
  flex: 1,
737
428
  padding: 16
738
429
  },
739
- section: {
740
- marginBottom: 24
741
- },
742
- sectionTitle: {
743
- fontSize: 16,
744
- fontWeight: '600',
745
- color: '#333',
746
- marginBottom: 12
747
- },
748
- settingItem: {
749
- backgroundColor: '#fff',
750
- padding: 16,
751
- flexDirection: 'row',
752
- alignItems: 'center',
753
- justifyContent: 'space-between',
754
- marginBottom: 2
755
- },
756
- firstSettingItem: {
757
- borderTopLeftRadius: 24,
758
- borderTopRightRadius: 24
759
- },
760
- lastSettingItem: {
761
- borderBottomLeftRadius: 24,
762
- borderBottomRightRadius: 24,
763
- marginBottom: 8
764
- },
765
- settingInfo: {
766
- flexDirection: 'row',
767
- alignItems: 'center',
768
- flex: 1
769
- },
770
- settingIcon: {
771
- marginRight: 12
772
- },
773
- settingLabel: {
774
- fontSize: 16,
775
- fontWeight: '500',
776
- color: '#333',
777
- marginBottom: 2
778
- },
779
- settingDescription: {
780
- fontSize: 14,
781
- color: '#666'
782
- },
783
430
  userIcon: {
784
431
  marginRight: 12
785
432
  },
@@ -812,10 +459,6 @@ const styles = _reactNative.StyleSheet.create({
812
459
  fontSize: 18,
813
460
  fontWeight: 'bold'
814
461
  },
815
- signOutButton: {
816
- borderWidth: 1,
817
- borderColor: '#ff4757'
818
- },
819
462
  message: {
820
463
  fontSize: 16,
821
464
  textAlign: 'center',