@oxyhq/services 5.4.3 → 5.4.5

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 (233) hide show
  1. package/README.md +14 -0
  2. package/lib/commonjs/assets/assets/illustrations/HighFive.tsx +41 -0
  3. package/lib/commonjs/assets/icons/OxyServices.js +1 -1
  4. package/lib/commonjs/assets/illustrations/HighFive.js +61 -0
  5. package/lib/commonjs/assets/illustrations/HighFive.js.map +1 -0
  6. package/lib/commonjs/core/index.js +24 -5
  7. package/lib/commonjs/core/index.js.map +1 -1
  8. package/lib/commonjs/index.js +72 -23
  9. package/lib/commonjs/index.js.map +1 -1
  10. package/lib/commonjs/node/createAuth.js +95 -0
  11. package/lib/commonjs/node/createAuth.js.map +1 -0
  12. package/lib/commonjs/node/index.js +15 -6
  13. package/lib/commonjs/node/index.js.map +1 -1
  14. package/lib/commonjs/package.json +1 -0
  15. package/lib/commonjs/ui/components/Avatar.js +3 -3
  16. package/lib/commonjs/ui/components/Avatar.js.map +1 -1
  17. package/lib/commonjs/ui/components/FollowButton.js +82 -34
  18. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  19. package/lib/commonjs/ui/components/GroupedSection.js +1 -1
  20. package/lib/commonjs/ui/components/OxyLogo.js +1 -1
  21. package/lib/commonjs/ui/components/OxyProvider.js +146 -141
  22. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  23. package/lib/commonjs/ui/components/OxySignInButton.js +4 -4
  24. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
  25. package/lib/commonjs/ui/components/ProfileCard.js +2 -2
  26. package/lib/commonjs/ui/components/Section.js +1 -1
  27. package/lib/commonjs/ui/components/SectionTitle.js +1 -1
  28. package/lib/commonjs/ui/components/icon/index.js +1 -1
  29. package/lib/commonjs/ui/components/index.js +12 -12
  30. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +213 -0
  31. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -0
  32. package/lib/commonjs/ui/components/internal/TextField.js +576 -0
  33. package/lib/commonjs/ui/components/internal/TextField.js.map +1 -0
  34. package/lib/commonjs/ui/context/OxyContext.js +12 -2
  35. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  36. package/lib/commonjs/ui/hooks/index.js +13 -0
  37. package/lib/commonjs/ui/hooks/index.js.map +1 -0
  38. package/lib/commonjs/ui/hooks/useFollow.js +184 -0
  39. package/lib/commonjs/ui/hooks/useFollow.js.map +1 -0
  40. package/lib/commonjs/ui/index.js +44 -12
  41. package/lib/commonjs/ui/index.js.map +1 -1
  42. package/lib/commonjs/ui/navigation/OxyRouter.js +23 -18
  43. package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
  44. package/lib/commonjs/ui/screens/AccountCenterScreen.js +21 -20
  45. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  46. package/lib/commonjs/ui/screens/AccountManagementDemo.js +3 -3
  47. package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -1
  48. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +11 -10
  49. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  50. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +8 -7
  51. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  52. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +6 -5
  53. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  54. package/lib/commonjs/ui/screens/AppInfoScreen.js +12 -14
  55. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  56. package/lib/commonjs/ui/screens/BillingManagementScreen.js +3 -3
  57. package/lib/commonjs/ui/screens/FeedbackScreen.js +1169 -0
  58. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -0
  59. package/lib/commonjs/ui/screens/FileManagementScreen.js +3 -3
  60. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +3 -3
  61. package/lib/commonjs/ui/screens/ProfileScreen.js +2 -2
  62. package/lib/commonjs/ui/screens/SessionManagementScreen.js +2 -2
  63. package/lib/commonjs/ui/screens/SignInScreen.js +183 -305
  64. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
  65. package/lib/commonjs/ui/screens/SignUpScreen.js +811 -712
  66. package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
  67. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +8 -7
  68. package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  69. package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +2 -2
  70. package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +1 -1
  71. package/lib/commonjs/ui/store/index.js +267 -0
  72. package/lib/commonjs/ui/store/index.js.map +1 -0
  73. package/lib/commonjs/ui/styles/index.js +2 -2
  74. package/lib/commonjs/ui/styles/theme.js +1 -1
  75. package/lib/commonjs/utils/index.js +1 -1
  76. package/lib/module/assets/assets/illustrations/HighFive.tsx +41 -0
  77. package/lib/module/assets/icons/OxyServices.js +1 -1
  78. package/lib/module/assets/icons/OxyServices.js.map +1 -1
  79. package/lib/module/assets/illustrations/HighFive.js +55 -0
  80. package/lib/module/assets/illustrations/HighFive.js.map +1 -0
  81. package/lib/module/core/index.js +24 -5
  82. package/lib/module/core/index.js.map +1 -1
  83. package/lib/module/index.js +15 -11
  84. package/lib/module/index.js.map +1 -1
  85. package/lib/module/node/createAuth.js +90 -0
  86. package/lib/module/node/createAuth.js.map +1 -0
  87. package/lib/module/node/index.js +8 -4
  88. package/lib/module/node/index.js.map +1 -1
  89. package/lib/module/package.json +1 -0
  90. package/lib/module/ui/components/Avatar.js +2 -2
  91. package/lib/module/ui/components/Avatar.js.map +1 -1
  92. package/lib/module/ui/components/FollowButton.js +83 -35
  93. package/lib/module/ui/components/FollowButton.js.map +1 -1
  94. package/lib/module/ui/components/GroupedSection.js +1 -1
  95. package/lib/module/ui/components/GroupedSection.js.map +1 -1
  96. package/lib/module/ui/components/OxyLogo.js +1 -1
  97. package/lib/module/ui/components/OxyLogo.js.map +1 -1
  98. package/lib/module/ui/components/OxyProvider.js +143 -138
  99. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  100. package/lib/module/ui/components/OxySignInButton.js +4 -4
  101. package/lib/module/ui/components/OxySignInButton.js.map +1 -1
  102. package/lib/module/ui/components/ProfileCard.js +2 -2
  103. package/lib/module/ui/components/ProfileCard.js.map +1 -1
  104. package/lib/module/ui/components/Section.js +1 -1
  105. package/lib/module/ui/components/Section.js.map +1 -1
  106. package/lib/module/ui/components/SectionTitle.js +1 -1
  107. package/lib/module/ui/components/SectionTitle.js.map +1 -1
  108. package/lib/module/ui/components/icon/index.js +1 -1
  109. package/lib/module/ui/components/icon/index.js.map +1 -1
  110. package/lib/module/ui/components/index.js +12 -12
  111. package/lib/module/ui/components/index.js.map +1 -1
  112. package/lib/module/ui/components/internal/GroupedPillButtons.js +208 -0
  113. package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -0
  114. package/lib/module/ui/components/internal/TextField.js +571 -0
  115. package/lib/module/ui/components/internal/TextField.js.map +1 -0
  116. package/lib/module/ui/context/OxyContext.js +12 -2
  117. package/lib/module/ui/context/OxyContext.js.map +1 -1
  118. package/lib/module/ui/hooks/index.js +4 -0
  119. package/lib/module/ui/hooks/index.js.map +1 -0
  120. package/lib/module/ui/hooks/useFollow.js +180 -0
  121. package/lib/module/ui/hooks/useFollow.js.map +1 -0
  122. package/lib/module/ui/index.js +21 -10
  123. package/lib/module/ui/index.js.map +1 -1
  124. package/lib/module/ui/navigation/OxyRouter.js +23 -18
  125. package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
  126. package/lib/module/ui/screens/AccountCenterScreen.js +9 -8
  127. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  128. package/lib/module/ui/screens/AccountManagementDemo.js +2 -2
  129. package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -1
  130. package/lib/module/ui/screens/AccountOverviewScreen.js +11 -10
  131. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  132. package/lib/module/ui/screens/AccountSettingsScreen.js +8 -7
  133. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  134. package/lib/module/ui/screens/AccountSwitcherScreen.js +6 -5
  135. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  136. package/lib/module/ui/screens/AppInfoScreen.js +12 -14
  137. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  138. package/lib/module/ui/screens/BillingManagementScreen.js +3 -3
  139. package/lib/module/ui/screens/BillingManagementScreen.js.map +1 -1
  140. package/lib/module/ui/screens/FeedbackScreen.js +1164 -0
  141. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -0
  142. package/lib/module/ui/screens/FileManagementScreen.js +3 -3
  143. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  144. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +3 -3
  145. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  146. package/lib/module/ui/screens/ProfileScreen.js +2 -2
  147. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  148. package/lib/module/ui/screens/SessionManagementScreen.js +2 -2
  149. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  150. package/lib/module/ui/screens/SignInScreen.js +183 -305
  151. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  152. package/lib/module/ui/screens/SignUpScreen.js +810 -712
  153. package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
  154. package/lib/module/ui/screens/karma/KarmaCenterScreen.js +8 -7
  155. package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
  156. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +2 -2
  157. package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
  158. package/lib/module/ui/screens/karma/KarmaRulesScreen.js +1 -1
  159. package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
  160. package/lib/module/ui/store/index.js +255 -0
  161. package/lib/module/ui/store/index.js.map +1 -0
  162. package/lib/module/ui/styles/index.js +2 -2
  163. package/lib/module/ui/styles/index.js.map +1 -1
  164. package/lib/module/ui/styles/theme.js +1 -1
  165. package/lib/module/ui/styles/theme.js.map +1 -1
  166. package/lib/module/utils/index.js +1 -1
  167. package/lib/module/utils/index.js.map +1 -1
  168. package/lib/typescript/assets/illustrations/HighFive.d.ts +9 -0
  169. package/lib/typescript/assets/illustrations/HighFive.d.ts.map +1 -0
  170. package/lib/typescript/core/index.d.ts +16 -3
  171. package/lib/typescript/core/index.d.ts.map +1 -1
  172. package/lib/typescript/index.d.ts +4 -2
  173. package/lib/typescript/index.d.ts.map +1 -1
  174. package/lib/typescript/node/createAuth.d.ts +7 -0
  175. package/lib/typescript/node/createAuth.d.ts.map +1 -0
  176. package/lib/typescript/node/index.d.ts +2 -0
  177. package/lib/typescript/node/index.d.ts.map +1 -1
  178. package/lib/typescript/types/expo-vector-icons.d.ts +3 -0
  179. package/lib/typescript/types/express.d.ts +5 -0
  180. package/lib/typescript/types/react-redux.d.ts +5 -0
  181. package/lib/typescript/ui/components/FollowButton.d.ts +1 -0
  182. package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
  183. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  184. package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts +18 -0
  185. package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -0
  186. package/lib/typescript/ui/components/internal/TextField.d.ts +25 -0
  187. package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -0
  188. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  189. package/lib/typescript/ui/hooks/index.d.ts +2 -0
  190. package/lib/typescript/ui/hooks/index.d.ts.map +1 -0
  191. package/lib/typescript/ui/hooks/useFollow.d.ts +43 -0
  192. package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -0
  193. package/lib/typescript/ui/index.d.ts +5 -0
  194. package/lib/typescript/ui/index.d.ts.map +1 -1
  195. package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
  196. package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
  197. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
  198. package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
  199. package/lib/typescript/ui/screens/FeedbackScreen.d.ts +5 -0
  200. package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -0
  201. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  202. package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
  203. package/lib/typescript/ui/store/index.d.ts +66 -0
  204. package/lib/typescript/ui/store/index.d.ts.map +1 -0
  205. package/package.json +10 -25
  206. package/src/assets/illustrations/HighFive.tsx +41 -0
  207. package/src/core/index.ts +88 -3
  208. package/src/index.ts +19 -3
  209. package/src/node/createAuth.ts +116 -0
  210. package/src/node/index.ts +4 -0
  211. package/src/types/expo-vector-icons.d.ts +3 -0
  212. package/src/types/express.d.ts +5 -0
  213. package/src/types/react-redux.d.ts +5 -0
  214. package/src/ui/components/FollowButton.tsx +114 -56
  215. package/src/ui/components/OxyProvider.tsx +136 -135
  216. package/src/ui/components/OxySignInButton.tsx +2 -2
  217. package/src/ui/components/internal/GroupedPillButtons.tsx +253 -0
  218. package/src/ui/components/internal/TextField.tsx +694 -0
  219. package/src/ui/context/OxyContext.tsx +12 -2
  220. package/src/ui/hooks/index.ts +1 -0
  221. package/src/ui/hooks/useFollow.ts +173 -0
  222. package/src/ui/index.ts +15 -2
  223. package/src/ui/navigation/OxyRouter.tsx +8 -3
  224. package/src/ui/screens/AccountCenterScreen.tsx +17 -15
  225. package/src/ui/screens/AccountOverviewScreen.tsx +25 -25
  226. package/src/ui/screens/AccountSettingsScreen.tsx +30 -30
  227. package/src/ui/screens/AccountSwitcherScreen.tsx +34 -33
  228. package/src/ui/screens/AppInfoScreen.tsx +153 -155
  229. package/src/ui/screens/FeedbackScreen.tsx +1042 -0
  230. package/src/ui/screens/SignInScreen.tsx +181 -224
  231. package/src/ui/screens/SignUpScreen.tsx +772 -608
  232. package/src/ui/screens/karma/KarmaCenterScreen.tsx +4 -4
  233. package/src/ui/store/index.ts +245 -0
@@ -0,0 +1,1169 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _OxyContext = require("../context/OxyContext");
10
+ var _styles = require("../styles");
11
+ var _vectorIcons = require("@expo/vector-icons");
12
+ var _sonner = require("../../lib/sonner");
13
+ var _version = require("../../constants/version");
14
+ var _jsxRuntime = require("react/jsx-runtime");
15
+ 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); }
16
+ // Types for better type safety
17
+
18
+ // Constants
19
+ const FEEDBACK_TYPES = [{
20
+ id: 'bug',
21
+ label: 'Bug Report',
22
+ icon: 'bug',
23
+ color: '#FF3B30',
24
+ description: 'Report a problem or issue'
25
+ }, {
26
+ id: 'feature',
27
+ label: 'Feature Request',
28
+ icon: 'bulb',
29
+ color: '#007AFF',
30
+ description: 'Suggest a new feature'
31
+ }, {
32
+ id: 'general',
33
+ label: 'General Feedback',
34
+ icon: 'chatbubble',
35
+ color: '#34C759',
36
+ description: 'Share your thoughts'
37
+ }, {
38
+ id: 'support',
39
+ label: 'Support Request',
40
+ icon: 'help-circle',
41
+ color: '#FF9500',
42
+ description: 'Get help with something'
43
+ }];
44
+ const PRIORITY_LEVELS = [{
45
+ id: 'low',
46
+ label: 'Low',
47
+ icon: 'arrow-down',
48
+ color: '#34C759'
49
+ }, {
50
+ id: 'medium',
51
+ label: 'Medium',
52
+ icon: 'remove',
53
+ color: '#FF9500'
54
+ }, {
55
+ id: 'high',
56
+ label: 'High',
57
+ icon: 'arrow-up',
58
+ color: '#FF3B30'
59
+ }, {
60
+ id: 'critical',
61
+ label: 'Critical',
62
+ icon: 'warning',
63
+ color: '#FF0000'
64
+ }];
65
+ const CATEGORIES = {
66
+ bug: ['UI/UX', 'Performance', 'Authentication', 'File Management', 'Billing', 'Other'],
67
+ feature: ['User Interface', 'File Management', 'Security', 'Performance', 'Integration', 'Other'],
68
+ general: ['User Experience', 'Design', 'Performance', 'Documentation', 'Other'],
69
+ support: ['Account Issues', 'Billing', 'Technical Problems', 'Feature Questions', 'Other']
70
+ };
71
+
72
+ // Styles factory function
73
+ const createStyles = (colors, theme) => _reactNative.StyleSheet.create({
74
+ container: {
75
+ flex: 1
76
+ },
77
+ scrollContent: {
78
+ flexGrow: 1,
79
+ paddingHorizontal: 24,
80
+ paddingTop: 40,
81
+ paddingBottom: 20
82
+ },
83
+ stepContainer: {
84
+ flex: 1,
85
+ justifyContent: 'flex-start',
86
+ alignItems: 'flex-start'
87
+ },
88
+ modernHeader: {
89
+ alignItems: 'flex-start',
90
+ width: '100%',
91
+ marginBottom: 24
92
+ },
93
+ modernTitle: {
94
+ fontFamily: _reactNative.Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
95
+ fontWeight: _reactNative.Platform.OS === 'web' ? 'bold' : undefined,
96
+ fontSize: 42,
97
+ lineHeight: 48,
98
+ marginBottom: 12,
99
+ textAlign: 'left',
100
+ letterSpacing: -1
101
+ },
102
+ modernSubtitle: {
103
+ fontSize: 18,
104
+ lineHeight: 24,
105
+ textAlign: 'left',
106
+ opacity: 0.8,
107
+ marginBottom: 24
108
+ },
109
+ stepTitle: {
110
+ fontFamily: _reactNative.Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
111
+ fontWeight: _reactNative.Platform.OS === 'web' ? 'bold' : undefined,
112
+ fontSize: 42,
113
+ lineHeight: 48,
114
+ marginBottom: 12,
115
+ textAlign: 'left',
116
+ letterSpacing: -1
117
+ },
118
+ inputContainer: {
119
+ width: '100%',
120
+ marginBottom: 24
121
+ },
122
+ premiumInputWrapper: {
123
+ flexDirection: 'row',
124
+ alignItems: 'center',
125
+ height: 56,
126
+ borderRadius: 16,
127
+ paddingHorizontal: 20,
128
+ borderWidth: 2,
129
+ backgroundColor: colors.inputBackground
130
+ },
131
+ textAreaWrapper: {
132
+ flexDirection: 'column',
133
+ alignItems: 'flex-start',
134
+ minHeight: 120,
135
+ borderRadius: 16,
136
+ paddingHorizontal: 20,
137
+ paddingVertical: 16,
138
+ borderWidth: 2,
139
+ backgroundColor: colors.inputBackground
140
+ },
141
+ inputIcon: {
142
+ marginRight: 12
143
+ },
144
+ inputContent: {
145
+ flex: 1
146
+ },
147
+ modernLabel: {
148
+ fontSize: 12,
149
+ fontWeight: '500',
150
+ marginBottom: 2
151
+ },
152
+ modernInput: {
153
+ flex: 1,
154
+ fontSize: 16,
155
+ height: '100%'
156
+ },
157
+ textArea: {
158
+ flex: 1,
159
+ fontSize: 16,
160
+ textAlignVertical: 'top',
161
+ minHeight: 80
162
+ },
163
+ typeGrid: {
164
+ flexDirection: 'row',
165
+ flexWrap: 'wrap',
166
+ gap: 12,
167
+ marginBottom: 24
168
+ },
169
+ typeCard: {
170
+ width: (_reactNative.Dimensions.get('window').width - 72) / 2,
171
+ padding: 20,
172
+ borderRadius: 16,
173
+ borderWidth: 2,
174
+ alignItems: 'center',
175
+ justifyContent: 'center',
176
+ minHeight: 120
177
+ },
178
+ typeIcon: {
179
+ marginBottom: 12
180
+ },
181
+ typeLabel: {
182
+ fontSize: 16,
183
+ fontWeight: '600',
184
+ textAlign: 'center',
185
+ marginBottom: 4
186
+ },
187
+ typeDescription: {
188
+ fontSize: 12,
189
+ textAlign: 'center',
190
+ opacity: 0.8
191
+ },
192
+ priorityContainer: {
193
+ flexDirection: 'row',
194
+ justifyContent: 'space-between',
195
+ marginBottom: 24
196
+ },
197
+ priorityButton: {
198
+ flex: 1,
199
+ padding: 16,
200
+ borderRadius: 12,
201
+ borderWidth: 2,
202
+ alignItems: 'center',
203
+ marginHorizontal: 4
204
+ },
205
+ priorityLabel: {
206
+ fontSize: 12,
207
+ fontWeight: '600',
208
+ marginTop: 4
209
+ },
210
+ categoryContainer: {
211
+ marginBottom: 24
212
+ },
213
+ categoryButton: {
214
+ flexDirection: 'row',
215
+ alignItems: 'center',
216
+ paddingVertical: 12,
217
+ paddingHorizontal: 16,
218
+ borderRadius: 12,
219
+ borderWidth: 1,
220
+ marginBottom: 8
221
+ },
222
+ categoryText: {
223
+ fontSize: 16,
224
+ marginLeft: 12
225
+ },
226
+ checkboxContainer: {
227
+ flexDirection: 'row',
228
+ alignItems: 'center',
229
+ marginBottom: 24
230
+ },
231
+ checkbox: {
232
+ width: 24,
233
+ height: 24,
234
+ borderRadius: 6,
235
+ borderWidth: 2,
236
+ marginRight: 12,
237
+ alignItems: 'center',
238
+ justifyContent: 'center'
239
+ },
240
+ checkboxText: {
241
+ fontSize: 16,
242
+ flex: 1
243
+ },
244
+ button: {
245
+ flexDirection: 'row',
246
+ alignItems: 'center',
247
+ justifyContent: 'center',
248
+ paddingVertical: 18,
249
+ paddingHorizontal: 32,
250
+ borderRadius: 16,
251
+ marginVertical: 8,
252
+ shadowOffset: {
253
+ width: 0,
254
+ height: 4
255
+ },
256
+ shadowOpacity: 0.3,
257
+ shadowRadius: 8,
258
+ elevation: 6,
259
+ gap: 8,
260
+ width: '100%'
261
+ },
262
+ buttonText: {
263
+ color: '#FFFFFF',
264
+ fontSize: 16,
265
+ fontWeight: '600',
266
+ letterSpacing: 0.5
267
+ },
268
+ navigationButtons: {
269
+ flexDirection: 'row',
270
+ justifyContent: 'center',
271
+ marginTop: 16,
272
+ marginBottom: 8,
273
+ width: '100%',
274
+ gap: 8
275
+ },
276
+ navButton: {
277
+ flexDirection: 'row',
278
+ alignItems: 'center',
279
+ paddingVertical: 6,
280
+ paddingHorizontal: 12,
281
+ gap: 6,
282
+ minWidth: 70,
283
+ borderWidth: 1,
284
+ shadowOffset: {
285
+ width: 0,
286
+ height: 2
287
+ },
288
+ shadowOpacity: 0.1,
289
+ shadowRadius: 4,
290
+ elevation: 2
291
+ },
292
+ backButton: {
293
+ backgroundColor: 'transparent',
294
+ borderTopLeftRadius: 35,
295
+ borderBottomLeftRadius: 35,
296
+ borderTopRightRadius: 12,
297
+ borderBottomRightRadius: 12
298
+ },
299
+ nextButton: {
300
+ backgroundColor: 'transparent',
301
+ borderTopRightRadius: 35,
302
+ borderBottomRightRadius: 35,
303
+ borderTopLeftRadius: 12,
304
+ borderBottomLeftRadius: 12
305
+ },
306
+ navButtonText: {
307
+ fontSize: 13,
308
+ fontWeight: '500'
309
+ },
310
+ progressContainer: {
311
+ flexDirection: 'row',
312
+ justifyContent: 'center',
313
+ marginBottom: 20,
314
+ marginTop: 8
315
+ },
316
+ progressDot: {
317
+ height: 10,
318
+ width: 10,
319
+ borderRadius: 5,
320
+ marginHorizontal: 6,
321
+ borderWidth: 2,
322
+ borderColor: '#fff',
323
+ shadowColor: colors.primary,
324
+ shadowOpacity: 0.08,
325
+ shadowOffset: {
326
+ width: 0,
327
+ height: 1
328
+ },
329
+ shadowRadius: 2,
330
+ elevation: 1
331
+ },
332
+ summaryContainer: {
333
+ padding: 0,
334
+ marginBottom: 24,
335
+ width: '100%'
336
+ },
337
+ summaryRow: {
338
+ flexDirection: 'row',
339
+ marginBottom: 10
340
+ },
341
+ summaryLabel: {
342
+ fontSize: 15,
343
+ width: 90
344
+ },
345
+ summaryValue: {
346
+ fontSize: 15,
347
+ fontWeight: '600',
348
+ flex: 1
349
+ },
350
+ successContainer: {
351
+ alignItems: 'center',
352
+ justifyContent: 'center',
353
+ padding: 40
354
+ },
355
+ successIcon: {
356
+ marginBottom: 24
357
+ },
358
+ successTitle: {
359
+ fontSize: 24,
360
+ fontWeight: 'bold',
361
+ marginBottom: 12,
362
+ textAlign: 'center'
363
+ },
364
+ successMessage: {
365
+ fontSize: 16,
366
+ textAlign: 'center',
367
+ opacity: 0.8,
368
+ marginBottom: 24
369
+ }
370
+ });
371
+
372
+ // Custom hooks for better separation of concerns
373
+ const useFeedbackForm = () => {
374
+ const [feedbackData, setFeedbackData] = (0, _react.useState)({
375
+ type: 'general',
376
+ title: '',
377
+ description: '',
378
+ priority: 'medium',
379
+ category: '',
380
+ contactEmail: '',
381
+ systemInfo: true
382
+ });
383
+ const [feedbackState, setFeedbackState] = (0, _react.useState)({
384
+ status: 'idle',
385
+ message: ''
386
+ });
387
+ const updateField = (0, _react.useCallback)((field, value) => {
388
+ setFeedbackData(prev => ({
389
+ ...prev,
390
+ [field]: value
391
+ }));
392
+ }, []);
393
+ const resetForm = (0, _react.useCallback)(() => {
394
+ setFeedbackData({
395
+ type: 'general',
396
+ title: '',
397
+ description: '',
398
+ priority: 'medium',
399
+ category: '',
400
+ contactEmail: '',
401
+ systemInfo: true
402
+ });
403
+ setFeedbackState({
404
+ status: 'idle',
405
+ message: ''
406
+ });
407
+ }, []);
408
+ return {
409
+ feedbackData,
410
+ feedbackState,
411
+ setFeedbackState,
412
+ updateField,
413
+ resetForm
414
+ };
415
+ };
416
+
417
+ // Reusable components
418
+ const FormInput = /*#__PURE__*/_react.default.memo(({
419
+ icon,
420
+ label,
421
+ value,
422
+ onChangeText,
423
+ placeholder,
424
+ multiline = false,
425
+ numberOfLines = 1,
426
+ testID,
427
+ colors,
428
+ styles,
429
+ borderColor
430
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
431
+ style: styles.inputContainer,
432
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
433
+ style: [multiline ? styles.textAreaWrapper : styles.premiumInputWrapper, {
434
+ borderColor: borderColor || colors.border,
435
+ backgroundColor: colors.inputBackground,
436
+ shadowColor: colors.primary,
437
+ shadowOffset: {
438
+ width: 0,
439
+ height: 4
440
+ },
441
+ shadowOpacity: 0.1,
442
+ shadowRadius: 12,
443
+ elevation: 3
444
+ }],
445
+ children: [!multiline && /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
446
+ name: icon,
447
+ size: 22,
448
+ color: colors.secondaryText,
449
+ style: styles.inputIcon
450
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
451
+ style: styles.inputContent,
452
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
453
+ style: [styles.modernLabel, {
454
+ color: colors.secondaryText
455
+ }],
456
+ children: label
457
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TextInput, {
458
+ style: [multiline ? styles.textArea : styles.modernInput, {
459
+ color: colors.text
460
+ }],
461
+ value: value,
462
+ onChangeText: onChangeText,
463
+ placeholder: placeholder,
464
+ placeholderTextColor: colors.secondaryText + '60',
465
+ multiline: multiline,
466
+ numberOfLines: multiline ? numberOfLines : undefined,
467
+ testID: testID
468
+ })]
469
+ })]
470
+ })
471
+ }));
472
+ const ProgressIndicator = /*#__PURE__*/_react.default.memo(({
473
+ currentStep,
474
+ totalSteps,
475
+ colors,
476
+ styles
477
+ }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
478
+ style: styles.progressContainer,
479
+ children: Array.from({
480
+ length: totalSteps
481
+ }, (_, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
482
+ style: [styles.progressDot, currentStep === index ? {
483
+ backgroundColor: colors.primary,
484
+ width: 24
485
+ } : {
486
+ backgroundColor: colors.border
487
+ }]
488
+ }, index))
489
+ }));
490
+
491
+ // Main component
492
+ const FeedbackScreen = ({
493
+ navigate,
494
+ goBack,
495
+ onClose,
496
+ theme
497
+ }) => {
498
+ const {
499
+ user,
500
+ oxyServices
501
+ } = (0, _OxyContext.useOxy)();
502
+ const colors = (0, _styles.useThemeColors)(theme);
503
+
504
+ // Form state
505
+ const {
506
+ feedbackData,
507
+ feedbackState,
508
+ setFeedbackState,
509
+ updateField,
510
+ resetForm
511
+ } = useFeedbackForm();
512
+
513
+ // UI state
514
+ const [currentStep, setCurrentStep] = (0, _react.useState)(0);
515
+ const [errorMessage, setErrorMessage] = (0, _react.useState)('');
516
+
517
+ // Animation refs
518
+ const fadeAnim = (0, _react.useRef)(new _reactNative.Animated.Value(1)).current;
519
+ const slideAnim = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
520
+
521
+ // Memoized styles
522
+ const styles = (0, _react.useMemo)(() => createStyles(colors, theme), [colors, theme]);
523
+
524
+ // Animation functions
525
+ const animateTransition = (0, _react.useCallback)(nextStep => {
526
+ _reactNative.Animated.timing(fadeAnim, {
527
+ toValue: 0,
528
+ duration: 250,
529
+ useNativeDriver: true
530
+ }).start(() => {
531
+ setCurrentStep(nextStep);
532
+ slideAnim.setValue(-100);
533
+ _reactNative.Animated.parallel([_reactNative.Animated.timing(fadeAnim, {
534
+ toValue: 1,
535
+ duration: 250,
536
+ useNativeDriver: true
537
+ }), _reactNative.Animated.timing(slideAnim, {
538
+ toValue: 0,
539
+ duration: 300,
540
+ useNativeDriver: true
541
+ })]).start();
542
+ });
543
+ }, [fadeAnim, slideAnim]);
544
+ const nextStep = (0, _react.useCallback)(() => {
545
+ if (currentStep < 3) {
546
+ animateTransition(currentStep + 1);
547
+ }
548
+ }, [currentStep, animateTransition]);
549
+ const prevStep = (0, _react.useCallback)(() => {
550
+ if (currentStep > 0) {
551
+ animateTransition(currentStep - 1);
552
+ }
553
+ }, [currentStep, animateTransition]);
554
+
555
+ // Form validation helpers
556
+ const isTypeStepValid = (0, _react.useCallback)(() => {
557
+ return feedbackData.type && feedbackData.category;
558
+ }, [feedbackData.type, feedbackData.category]);
559
+ const isDetailsStepValid = (0, _react.useCallback)(() => {
560
+ return feedbackData.title.trim() && feedbackData.description.trim();
561
+ }, [feedbackData.title, feedbackData.description]);
562
+ const isContactStepValid = (0, _react.useCallback)(() => {
563
+ return feedbackData.contactEmail.trim() || user?.email;
564
+ }, [feedbackData.contactEmail, user?.email]);
565
+
566
+ // Submit feedback handler
567
+ const handleSubmitFeedback = (0, _react.useCallback)(async () => {
568
+ if (!isTypeStepValid() || !isDetailsStepValid() || !isContactStepValid()) {
569
+ _sonner.toast.error('Please fill in all required fields');
570
+ return;
571
+ }
572
+ try {
573
+ setFeedbackState({
574
+ status: 'submitting',
575
+ message: ''
576
+ });
577
+ setErrorMessage('');
578
+
579
+ // Prepare feedback data
580
+ const feedbackPayload = {
581
+ type: feedbackData.type,
582
+ title: feedbackData.title,
583
+ description: feedbackData.description,
584
+ priority: feedbackData.priority,
585
+ category: feedbackData.category,
586
+ contactEmail: feedbackData.contactEmail || user?.email,
587
+ systemInfo: feedbackData.systemInfo ? {
588
+ platform: _reactNative.Platform.OS,
589
+ version: _reactNative.Platform.Version?.toString() || 'Unknown',
590
+ appVersion: _version.packageInfo.version,
591
+ userId: user?.id,
592
+ username: user?.username,
593
+ timestamp: new Date().toISOString()
594
+ } : undefined
595
+ };
596
+
597
+ // For now, we'll simulate the API call
598
+ // In a real implementation, you would call oxyServices.submitFeedback(feedbackPayload)
599
+ await new Promise(resolve => setTimeout(resolve, 2000)); // Simulate API call
600
+
601
+ setFeedbackState({
602
+ status: 'success',
603
+ message: 'Feedback submitted successfully!'
604
+ });
605
+ _sonner.toast.success('Thank you for your feedback!');
606
+
607
+ // Reset form after success
608
+ setTimeout(() => {
609
+ resetForm();
610
+ setCurrentStep(0);
611
+ }, 3000);
612
+ } catch (error) {
613
+ setFeedbackState({
614
+ status: 'error',
615
+ message: error.message || 'Failed to submit feedback'
616
+ });
617
+ _sonner.toast.error(error.message || 'Failed to submit feedback');
618
+ }
619
+ }, [feedbackData, user, isTypeStepValid, isDetailsStepValid, isContactStepValid, resetForm]);
620
+
621
+ // Step components
622
+ const renderTypeStep = (0, _react.useCallback)(() => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
623
+ style: [styles.stepContainer, {
624
+ opacity: fadeAnim,
625
+ transform: [{
626
+ translateX: slideAnim
627
+ }]
628
+ }],
629
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
630
+ style: styles.modernHeader,
631
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
632
+ style: [styles.stepTitle, {
633
+ color: colors.text
634
+ }],
635
+ children: "What type of feedback?"
636
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
637
+ style: [styles.modernSubtitle, {
638
+ color: colors.secondaryText
639
+ }],
640
+ children: "Choose the category that best describes your feedback"
641
+ })]
642
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
643
+ style: styles.typeGrid,
644
+ children: FEEDBACK_TYPES.map(type => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
645
+ style: [styles.typeCard, {
646
+ borderColor: feedbackData.type === type.id ? type.color : colors.border,
647
+ backgroundColor: feedbackData.type === type.id ? type.color + '10' : colors.inputBackground
648
+ }],
649
+ onPress: () => {
650
+ updateField('type', type.id);
651
+ updateField('category', '');
652
+ },
653
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
654
+ style: [styles.typeIcon, {
655
+ backgroundColor: type.color + '20',
656
+ padding: 12,
657
+ borderRadius: 12
658
+ }],
659
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
660
+ name: type.icon,
661
+ size: 24,
662
+ color: type.color
663
+ })
664
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
665
+ style: [styles.typeLabel, {
666
+ color: colors.text
667
+ }],
668
+ children: type.label
669
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
670
+ style: [styles.typeDescription, {
671
+ color: colors.secondaryText
672
+ }],
673
+ children: type.description
674
+ })]
675
+ }, type.id))
676
+ }), feedbackData.type && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
677
+ style: styles.categoryContainer,
678
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
679
+ style: [styles.modernLabel, {
680
+ color: colors.secondaryText,
681
+ marginBottom: 12
682
+ }],
683
+ children: "Category"
684
+ }), CATEGORIES[feedbackData.type]?.map(category => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
685
+ style: [styles.categoryButton, {
686
+ borderColor: feedbackData.category === category ? colors.primary : colors.border,
687
+ backgroundColor: feedbackData.category === category ? colors.primary + '10' : colors.inputBackground
688
+ }],
689
+ onPress: () => updateField('category', category),
690
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
691
+ name: feedbackData.category === category ? 'checkmark-circle' : 'ellipse-outline',
692
+ size: 20,
693
+ color: feedbackData.category === category ? colors.primary : colors.secondaryText
694
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
695
+ style: [styles.categoryText, {
696
+ color: colors.text
697
+ }],
698
+ children: category
699
+ })]
700
+ }, category))]
701
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
702
+ style: styles.navigationButtons,
703
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
704
+ style: [styles.navButton, {
705
+ backgroundColor: 'transparent',
706
+ borderColor: colors.border,
707
+ shadowColor: colors.border,
708
+ borderTopLeftRadius: 35,
709
+ borderBottomLeftRadius: 35,
710
+ borderTopRightRadius: 35,
711
+ borderBottomRightRadius: 35
712
+ }],
713
+ onPress: goBack,
714
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
715
+ name: "arrow-back",
716
+ size: 16,
717
+ color: colors.text
718
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
719
+ style: [styles.navButtonText, {
720
+ color: colors.text
721
+ }],
722
+ children: "Back"
723
+ })]
724
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
725
+ style: [styles.navButton, {
726
+ backgroundColor: colors.primary,
727
+ borderColor: colors.primary,
728
+ shadowColor: colors.primary,
729
+ borderTopLeftRadius: 35,
730
+ borderBottomLeftRadius: 35,
731
+ borderTopRightRadius: 35,
732
+ borderBottomRightRadius: 35
733
+ }],
734
+ onPress: nextStep,
735
+ disabled: !isTypeStepValid(),
736
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
737
+ style: [styles.navButtonText, {
738
+ color: '#FFFFFF'
739
+ }],
740
+ children: "Next"
741
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
742
+ name: "arrow-forward",
743
+ size: 16,
744
+ color: "#FFFFFF"
745
+ })]
746
+ })]
747
+ })]
748
+ }), [fadeAnim, slideAnim, colors, feedbackData, updateField, goBack, nextStep, isTypeStepValid, styles]);
749
+ const renderDetailsStep = (0, _react.useCallback)(() => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
750
+ style: [styles.stepContainer, {
751
+ opacity: fadeAnim,
752
+ transform: [{
753
+ translateX: slideAnim
754
+ }]
755
+ }],
756
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
757
+ style: styles.modernHeader,
758
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
759
+ style: [styles.stepTitle, {
760
+ color: colors.text
761
+ }],
762
+ children: "Tell us more"
763
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
764
+ style: [styles.modernSubtitle, {
765
+ color: colors.secondaryText
766
+ }],
767
+ children: "Provide details about your feedback"
768
+ })]
769
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(FormInput, {
770
+ icon: "create-outline",
771
+ label: "Title",
772
+ value: feedbackData.title,
773
+ onChangeText: text => {
774
+ updateField('title', text);
775
+ setErrorMessage('');
776
+ },
777
+ placeholder: "Brief summary of your feedback",
778
+ testID: "feedback-title-input",
779
+ colors: colors,
780
+ styles: styles
781
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(FormInput, {
782
+ icon: "document-text-outline",
783
+ label: "Description",
784
+ value: feedbackData.description,
785
+ onChangeText: text => {
786
+ updateField('description', text);
787
+ setErrorMessage('');
788
+ },
789
+ placeholder: "Please provide detailed information...",
790
+ multiline: true,
791
+ numberOfLines: 6,
792
+ testID: "feedback-description-input",
793
+ colors: colors,
794
+ styles: styles
795
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
796
+ style: styles.priorityContainer,
797
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
798
+ style: [styles.modernLabel, {
799
+ color: colors.secondaryText,
800
+ marginBottom: 12
801
+ }],
802
+ children: "Priority Level"
803
+ }), PRIORITY_LEVELS.map(priority => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
804
+ style: [styles.priorityButton, {
805
+ borderColor: feedbackData.priority === priority.id ? priority.color : colors.border,
806
+ backgroundColor: feedbackData.priority === priority.id ? priority.color + '10' : colors.inputBackground
807
+ }],
808
+ onPress: () => updateField('priority', priority.id),
809
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
810
+ name: priority.icon,
811
+ size: 20,
812
+ color: priority.color
813
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
814
+ style: [styles.priorityLabel, {
815
+ color: colors.text
816
+ }],
817
+ children: priority.label
818
+ })]
819
+ }, priority.id))]
820
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
821
+ style: styles.navigationButtons,
822
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
823
+ style: [styles.navButton, styles.backButton, {
824
+ borderColor: colors.border,
825
+ shadowColor: colors.border
826
+ }],
827
+ onPress: prevStep,
828
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
829
+ name: "arrow-back",
830
+ size: 16,
831
+ color: colors.text
832
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
833
+ style: [styles.navButtonText, {
834
+ color: colors.text
835
+ }],
836
+ children: "Back"
837
+ })]
838
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
839
+ style: [styles.navButton, styles.nextButton, {
840
+ backgroundColor: colors.primary,
841
+ borderColor: colors.primary,
842
+ shadowColor: colors.primary
843
+ }],
844
+ onPress: nextStep,
845
+ disabled: !isDetailsStepValid(),
846
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
847
+ style: [styles.navButtonText, {
848
+ color: '#FFFFFF'
849
+ }],
850
+ children: "Next"
851
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
852
+ name: "arrow-forward",
853
+ size: 16,
854
+ color: "#FFFFFF"
855
+ })]
856
+ })]
857
+ })]
858
+ }), [fadeAnim, slideAnim, colors, feedbackData, updateField, setErrorMessage, prevStep, nextStep, isDetailsStepValid, styles]);
859
+ const renderContactStep = (0, _react.useCallback)(() => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
860
+ style: [styles.stepContainer, {
861
+ opacity: fadeAnim,
862
+ transform: [{
863
+ translateX: slideAnim
864
+ }]
865
+ }],
866
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
867
+ style: styles.modernHeader,
868
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
869
+ style: [styles.stepTitle, {
870
+ color: colors.text
871
+ }],
872
+ children: "Contact Information"
873
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
874
+ style: [styles.modernSubtitle, {
875
+ color: colors.secondaryText
876
+ }],
877
+ children: "Help us get back to you"
878
+ })]
879
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(FormInput, {
880
+ icon: "mail-outline",
881
+ label: "Email Address",
882
+ value: feedbackData.contactEmail,
883
+ onChangeText: text => {
884
+ updateField('contactEmail', text);
885
+ setErrorMessage('');
886
+ },
887
+ placeholder: user?.email || "Enter your email address",
888
+ testID: "feedback-email-input",
889
+ colors: colors,
890
+ styles: styles
891
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
892
+ style: styles.checkboxContainer,
893
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
894
+ style: [styles.checkbox, {
895
+ borderColor: feedbackData.systemInfo ? colors.primary : colors.border,
896
+ backgroundColor: feedbackData.systemInfo ? colors.primary : 'transparent'
897
+ }],
898
+ onPress: () => updateField('systemInfo', !feedbackData.systemInfo),
899
+ children: feedbackData.systemInfo && /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
900
+ name: "checkmark",
901
+ size: 16,
902
+ color: "#FFFFFF"
903
+ })
904
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
905
+ style: [styles.checkboxText, {
906
+ color: colors.text
907
+ }],
908
+ children: "Include system information to help us better understand your issue"
909
+ })]
910
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
911
+ style: styles.navigationButtons,
912
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
913
+ style: [styles.navButton, styles.backButton, {
914
+ borderColor: colors.border,
915
+ shadowColor: colors.border
916
+ }],
917
+ onPress: prevStep,
918
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
919
+ name: "arrow-back",
920
+ size: 16,
921
+ color: colors.text
922
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
923
+ style: [styles.navButtonText, {
924
+ color: colors.text
925
+ }],
926
+ children: "Back"
927
+ })]
928
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
929
+ style: [styles.navButton, styles.nextButton, {
930
+ backgroundColor: colors.primary,
931
+ borderColor: colors.primary,
932
+ shadowColor: colors.primary
933
+ }],
934
+ onPress: nextStep,
935
+ disabled: !isContactStepValid(),
936
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
937
+ style: [styles.navButtonText, {
938
+ color: '#FFFFFF'
939
+ }],
940
+ children: "Next"
941
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
942
+ name: "arrow-forward",
943
+ size: 16,
944
+ color: "#FFFFFF"
945
+ })]
946
+ })]
947
+ })]
948
+ }), [fadeAnim, slideAnim, colors, feedbackData, user, updateField, setErrorMessage, prevStep, nextStep, isContactStepValid, styles]);
949
+ const renderSummaryStep = (0, _react.useCallback)(() => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Animated.View, {
950
+ style: [styles.stepContainer, {
951
+ opacity: fadeAnim,
952
+ transform: [{
953
+ translateX: slideAnim
954
+ }]
955
+ }],
956
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
957
+ style: styles.modernHeader,
958
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
959
+ style: [styles.stepTitle, {
960
+ color: colors.text
961
+ }],
962
+ children: "Review & Submit"
963
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
964
+ style: [styles.modernSubtitle, {
965
+ color: colors.secondaryText
966
+ }],
967
+ children: "Please review your feedback before submitting"
968
+ })]
969
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
970
+ style: styles.summaryContainer,
971
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
972
+ style: styles.summaryRow,
973
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
974
+ style: [styles.summaryLabel, {
975
+ color: colors.secondaryText
976
+ }],
977
+ children: "Type:"
978
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
979
+ style: [styles.summaryValue, {
980
+ color: colors.text
981
+ }],
982
+ children: FEEDBACK_TYPES.find(t => t.id === feedbackData.type)?.label
983
+ })]
984
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
985
+ style: styles.summaryRow,
986
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
987
+ style: [styles.summaryLabel, {
988
+ color: colors.secondaryText
989
+ }],
990
+ children: "Category:"
991
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
992
+ style: [styles.summaryValue, {
993
+ color: colors.text
994
+ }],
995
+ children: feedbackData.category
996
+ })]
997
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
998
+ style: styles.summaryRow,
999
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1000
+ style: [styles.summaryLabel, {
1001
+ color: colors.secondaryText
1002
+ }],
1003
+ children: "Priority:"
1004
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1005
+ style: [styles.summaryValue, {
1006
+ color: colors.text
1007
+ }],
1008
+ children: PRIORITY_LEVELS.find(p => p.id === feedbackData.priority)?.label
1009
+ })]
1010
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1011
+ style: styles.summaryRow,
1012
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1013
+ style: [styles.summaryLabel, {
1014
+ color: colors.secondaryText
1015
+ }],
1016
+ children: "Title:"
1017
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1018
+ style: [styles.summaryValue, {
1019
+ color: colors.text
1020
+ }],
1021
+ children: feedbackData.title
1022
+ })]
1023
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1024
+ style: styles.summaryRow,
1025
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1026
+ style: [styles.summaryLabel, {
1027
+ color: colors.secondaryText
1028
+ }],
1029
+ children: "Contact:"
1030
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1031
+ style: [styles.summaryValue, {
1032
+ color: colors.text
1033
+ }],
1034
+ children: feedbackData.contactEmail || user?.email
1035
+ })]
1036
+ })]
1037
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
1038
+ style: [styles.button, {
1039
+ backgroundColor: colors.primary
1040
+ }],
1041
+ onPress: handleSubmitFeedback,
1042
+ disabled: feedbackState.status === 'submitting',
1043
+ testID: "submit-feedback-button",
1044
+ children: feedbackState.status === 'submitting' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
1045
+ color: "#FFFFFF",
1046
+ size: "small"
1047
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
1048
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1049
+ style: styles.buttonText,
1050
+ children: "Submit Feedback"
1051
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1052
+ name: "send",
1053
+ size: 20,
1054
+ color: "#FFFFFF"
1055
+ })]
1056
+ })
1057
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1058
+ style: styles.navigationButtons,
1059
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
1060
+ style: [styles.navButton, {
1061
+ backgroundColor: 'transparent',
1062
+ borderColor: colors.border,
1063
+ shadowColor: colors.border,
1064
+ borderTopLeftRadius: 35,
1065
+ borderBottomLeftRadius: 35,
1066
+ borderTopRightRadius: 35,
1067
+ borderBottomRightRadius: 35
1068
+ }],
1069
+ onPress: prevStep,
1070
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1071
+ name: "arrow-back",
1072
+ size: 16,
1073
+ color: colors.text
1074
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1075
+ style: [styles.navButtonText, {
1076
+ color: colors.text
1077
+ }],
1078
+ children: "Back"
1079
+ })]
1080
+ })
1081
+ })]
1082
+ }), [fadeAnim, slideAnim, colors, feedbackData, user, feedbackState.status, handleSubmitFeedback, prevStep, styles]);
1083
+ const renderSuccessStep = (0, _react.useCallback)(() => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
1084
+ style: [styles.stepContainer, {
1085
+ opacity: fadeAnim,
1086
+ transform: [{
1087
+ translateX: slideAnim
1088
+ }]
1089
+ }],
1090
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1091
+ style: styles.successContainer,
1092
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
1093
+ style: [styles.successIcon, {
1094
+ backgroundColor: colors.success + '20',
1095
+ padding: 24,
1096
+ borderRadius: 50
1097
+ }],
1098
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
1099
+ name: "checkmark-circle",
1100
+ size: 48,
1101
+ color: colors.success
1102
+ })
1103
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1104
+ style: [styles.successTitle, {
1105
+ color: colors.text
1106
+ }],
1107
+ children: "Thank You!"
1108
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1109
+ style: [styles.successMessage, {
1110
+ color: colors.secondaryText
1111
+ }],
1112
+ children: "Your feedback has been submitted successfully. We'll review it and get back to you soon."
1113
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
1114
+ style: [styles.button, {
1115
+ backgroundColor: colors.primary
1116
+ }],
1117
+ onPress: () => {
1118
+ resetForm();
1119
+ setCurrentStep(0);
1120
+ },
1121
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
1122
+ style: styles.buttonText,
1123
+ children: "Submit Another"
1124
+ })
1125
+ })]
1126
+ })
1127
+ }), [fadeAnim, slideAnim, colors, resetForm, styles]);
1128
+
1129
+ // Render current step
1130
+ const renderCurrentStep = (0, _react.useCallback)(() => {
1131
+ if (feedbackState.status === 'success') {
1132
+ return renderSuccessStep();
1133
+ }
1134
+ switch (currentStep) {
1135
+ case 0:
1136
+ return renderTypeStep();
1137
+ case 1:
1138
+ return renderDetailsStep();
1139
+ case 2:
1140
+ return renderContactStep();
1141
+ case 3:
1142
+ return renderSummaryStep();
1143
+ default:
1144
+ return renderTypeStep();
1145
+ }
1146
+ }, [currentStep, feedbackState.status, renderTypeStep, renderDetailsStep, renderContactStep, renderSummaryStep, renderSuccessStep]);
1147
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.KeyboardAvoidingView, {
1148
+ style: [styles.container, {
1149
+ backgroundColor: colors.background
1150
+ }],
1151
+ behavior: _reactNative.Platform.OS === 'ios' ? 'padding' : 'height',
1152
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.StatusBar, {
1153
+ barStyle: theme === 'dark' ? 'light-content' : 'dark-content',
1154
+ backgroundColor: colors.background
1155
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.ScrollView, {
1156
+ contentContainerStyle: styles.scrollContent,
1157
+ showsVerticalScrollIndicator: false,
1158
+ keyboardShouldPersistTaps: "handled",
1159
+ children: [feedbackState.status !== 'success' && /*#__PURE__*/(0, _jsxRuntime.jsx)(ProgressIndicator, {
1160
+ currentStep: currentStep,
1161
+ totalSteps: 4,
1162
+ colors: colors,
1163
+ styles: styles
1164
+ }), renderCurrentStep()]
1165
+ })]
1166
+ });
1167
+ };
1168
+ var _default = exports.default = FeedbackScreen;
1169
+ //# sourceMappingURL=FeedbackScreen.js.map