react-native-fpay 0.2.5 → 0.2.7

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 (37) hide show
  1. package/lib/module/ui/modals/FPShell.js +120 -76
  2. package/lib/module/ui/modals/FPShell.js.map +1 -1
  3. package/lib/module/ui/screens/ReceiveScreen.js +0 -2
  4. package/lib/module/ui/screens/ReceiveScreen.js.map +1 -1
  5. package/lib/module/ui/screens/SendScreen.js +454 -168
  6. package/lib/module/ui/screens/SendScreen.js.map +1 -1
  7. package/lib/module/ui/screens/sub/BluetoothSubScreen.js +0 -1
  8. package/lib/module/ui/screens/sub/BluetoothSubScreen.js.map +1 -1
  9. package/lib/module/ui/screens/sub/NFCSubScreen.js +2 -7
  10. package/lib/module/ui/screens/sub/NFCSubScreen.js.map +1 -1
  11. package/lib/module/ui/screens/sub/NQRSubScreen.js +0 -5
  12. package/lib/module/ui/screens/sub/NQRSubScreen.js.map +1 -1
  13. package/lib/module/ui/screens/sub/ProximitySubScreen.js.map +1 -1
  14. package/lib/module/ui/screens/sub/TransferSubScreen.js +1 -9
  15. package/lib/module/ui/screens/sub/TransferSubScreen.js.map +1 -1
  16. package/lib/typescript/src/ui/modals/FPShell.d.ts.map +1 -1
  17. package/lib/typescript/src/ui/screens/SendScreen.d.ts +2 -2
  18. package/lib/typescript/src/ui/screens/SendScreen.d.ts.map +1 -1
  19. package/lib/typescript/src/ui/screens/sub/BluetoothSubScreen.d.ts +1 -2
  20. package/lib/typescript/src/ui/screens/sub/BluetoothSubScreen.d.ts.map +1 -1
  21. package/lib/typescript/src/ui/screens/sub/NFCSubScreen.d.ts +1 -2
  22. package/lib/typescript/src/ui/screens/sub/NFCSubScreen.d.ts.map +1 -1
  23. package/lib/typescript/src/ui/screens/sub/NQRSubScreen.d.ts +1 -2
  24. package/lib/typescript/src/ui/screens/sub/NQRSubScreen.d.ts.map +1 -1
  25. package/lib/typescript/src/ui/screens/sub/ProximitySubScreen.d.ts +0 -1
  26. package/lib/typescript/src/ui/screens/sub/ProximitySubScreen.d.ts.map +1 -1
  27. package/lib/typescript/src/ui/screens/sub/TransferSubScreen.d.ts +1 -2
  28. package/lib/typescript/src/ui/screens/sub/TransferSubScreen.d.ts.map +1 -1
  29. package/package.json +1 -1
  30. package/src/ui/modals/FPShell.tsx +149 -49
  31. package/src/ui/screens/ReceiveScreen.tsx +2 -2
  32. package/src/ui/screens/SendScreen.tsx +266 -53
  33. package/src/ui/screens/sub/BluetoothSubScreen.tsx +6 -3
  34. package/src/ui/screens/sub/NFCSubScreen.tsx +7 -4
  35. package/src/ui/screens/sub/NQRSubScreen.tsx +6 -5
  36. package/src/ui/screens/sub/ProximitySubScreen.tsx +5 -3
  37. package/src/ui/screens/sub/TransferSubScreen.tsx +6 -5
@@ -6,211 +6,497 @@
6
6
  // relevant sub-screen in the same modal sheet
7
7
  // ─────────────────────────────────────────────
8
8
  import React, { useState } from 'react';
9
- import { View, Text, TouchableOpacity, StyleSheet, ScrollView } from 'react-native';
10
- import { C, R, S, F, shadow } from "../theme/index.js";
9
+ import { View, Text, TouchableOpacity, ScrollView, Dimensions, TextInput } from 'react-native';
11
10
  import { TransferSubScreen } from "./sub/TransferSubScreen.js";
12
11
  import { NQRSubScreen } from "./sub/NQRSubScreen.js";
13
12
  import { ProximitySubScreen } from "./sub/ProximitySubScreen.js";
14
13
  import { BluetoothSubScreen } from "./sub/BluetoothSubScreen.js";
15
14
  import { NFCSubScreen } from "./sub/NFCSubScreen.js";
15
+ import styled from 'styled-components/native';
16
+ import Ionicons from 'react-native-vector-icons/Ionicons';
17
+ import Svg, { Path } from 'react-native-svg';
16
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
+ const {
20
+ width,
21
+ height
22
+ } = Dimensions.get('window');
17
23
  const CHANNELS = [{
18
- id: 'transfer',
24
+ id: 'TRANSFER',
19
25
  emoji: '🏦',
20
26
  title: 'Bank Transfer',
21
27
  desc: 'Send to any Nigerian bank account'
22
28
  }, {
23
- id: 'nqr',
29
+ id: 'QRCODE',
24
30
  emoji: '⬛',
25
31
  title: 'NQR Scan',
26
32
  desc: 'Scan a merchant or person QR code'
27
33
  }, {
28
- id: 'proximity',
34
+ id: 'PXTR',
29
35
  emoji: '📡',
30
36
  title: 'Nearby',
31
37
  desc: 'People within 100m of you'
32
38
  }, {
33
- id: 'bluetooth',
39
+ id: 'BTH',
34
40
  emoji: '📶',
35
41
  title: 'Bluetooth',
36
42
  desc: 'Pair wirelessly and send'
37
43
  }, {
38
- id: 'nfc',
44
+ id: 'NFC',
39
45
  emoji: '📲',
40
46
  title: 'NFC Tap',
41
47
  desc: 'Tap another phone to pay'
42
48
  }];
43
- export function SendScreen({
49
+ const Container = styled(View)`
50
+ flex: 1;
51
+ background-color: #000000;
52
+ `;
53
+
54
+ // Bottom Sheet Styles
55
+ const BottomSheet = styled(View)`
56
+ position: absolute;
57
+ bottom: 0;
58
+ left: 0;
59
+ right: 0;
60
+ background-color: #ffffff;
61
+ border-top-left-radius: 24px;
62
+ border-top-right-radius: 24px;
63
+ padding: 20px 20px 32px;
64
+ elevation: 20;
65
+ shadow-color: #000;
66
+ shadow-offset: 0px -4px;
67
+ shadow-opacity: 0.15;
68
+ shadow-radius: 12px;
69
+ max-height: ${height * 0.9}px;
70
+ `;
71
+ const SheetHandle = styled(View)`
72
+ width: 40px;
73
+ height: 4px;
74
+ background-color: #d1d5db;
75
+ border-radius: 2px;
76
+ align-self: center;
77
+ margin-bottom: 20px;
78
+ `;
79
+ const SheetScrollView = styled(ScrollView)`
80
+ flex: 1;
81
+ `;
82
+ const SectionTitle = styled(Text)`
83
+ font-size: 18px;
84
+ font-weight: 700;
85
+ color: #1f2937;
86
+ margin-bottom: 16px;
87
+ `;
88
+ const ActionsRow = styled(View)`
89
+ flex-direction: row;
90
+ gap: 16px;
91
+ margin-bottom: 24px;
92
+ `;
93
+ const ActionButton = styled(TouchableOpacity)`
94
+ align-items: center;
95
+ gap: 8px;
96
+ flex: 1;
97
+ `;
98
+ const ActionIconContainer = styled(View)`
99
+ width: 56px;
100
+ height: 56px;
101
+ border-radius: 100%;
102
+ background-color: ${props => props.color};
103
+ justify-content: center;
104
+ align-items: center;
105
+ elevation: 3;
106
+ shadow-color: #000;
107
+ shadow-offset: 0px 2px;
108
+ shadow-opacity: 0.12;
109
+ shadow-radius: 4px;
110
+ `;
111
+ const ActionLabel = styled(Text)`
112
+ font-size: 11px;
113
+ color: #374151;
114
+ text-align: center;
115
+ line-height: 14px;
116
+ `;
117
+ const SearchContainer = styled(View)`
118
+ flex-direction: row;
119
+ align-items: center;
120
+ background-color: #f9fafb;
121
+ border-radius: 12px;
122
+ padding: 14px 16px;
123
+ margin-bottom: 24px;
124
+ border: 1px solid #e5e7eb;
125
+ `;
126
+ const SearchInput = styled(TextInput)`
127
+ flex: 1;
128
+ margin-left: 10px;
129
+ font-size: 14px;
130
+ color: #1f2937;
131
+ padding: 0;
132
+ `;
133
+ const AddContactButton = styled.TouchableOpacity`
134
+ align-items: center;
135
+ margin-right: 20px;
136
+
137
+ flex-direction: row;
138
+ gap: 20px;
139
+
140
+ `;
141
+ const Icon = styled(Text)`
142
+ font-size: ${props => props.size || 24}px;
143
+ color: ${props => props.color || '#000000'};
144
+ `;
145
+ const AddCircle = styled.View`
146
+ width: 44px;
147
+ height: 44px;
148
+ border-radius: 32px;
149
+ background-color: #fff;
150
+ border-width: 2px;
151
+ border-color: #e0e0e0;
152
+ border-style: dashed;
153
+ justify-content: center;
154
+ align-items: center;
155
+ margin-bottom: 8px;
156
+ `;
157
+ const PrxyIconContainer = styled(View)`
158
+ width: 44px;
159
+ height: 44px;
160
+ border-radius: 100%;
161
+ background-color: ${props => props.color};
162
+ justify-content: center;
163
+ align-items: center;
164
+ elevation: 3;
165
+ shadow-color: #000;
166
+ shadow-offset: 0px 2px;
167
+ shadow-opacity: 0.12;
168
+ shadow-radius: 4px;
169
+ `;
170
+ const ContactName = styled.Text`
171
+ font-size: 12px;
172
+ color: #000;
173
+ `;
174
+ const ScanIcon = ({
175
+ color = "#111",
176
+ size = 22
177
+ }) => /*#__PURE__*/_jsxs(Svg, {
178
+ width: size,
179
+ height: size,
180
+ strokeWidth: "0.9",
181
+ viewBox: "0 0 24 24",
182
+ fill: "none",
183
+ color: color,
184
+ children: [/*#__PURE__*/_jsx(Path, {
185
+ d: "M6 3H3V6",
186
+ stroke: "#000000",
187
+ strokeWidth: "0.9",
188
+ strokeLinecap: "round",
189
+ strokeLinejoin: "round"
190
+ }), /*#__PURE__*/_jsx(Path, {
191
+ d: "M2 12H12L22 12",
192
+ stroke: "#000000",
193
+ strokeWidth: "0.9",
194
+ strokeLinecap: "round",
195
+ strokeLinejoin: "round"
196
+ }), /*#__PURE__*/_jsx(Path, {
197
+ d: "M9 19V17V15",
198
+ stroke: "#000000",
199
+ strokeWidth: "0.9",
200
+ strokeLinecap: "round",
201
+ strokeLinejoin: "round"
202
+ }), /*#__PURE__*/_jsx(Path, {
203
+ d: "M12 16V15.5V15",
204
+ stroke: "#000000",
205
+ strokeWidth: "0.9",
206
+ strokeLinecap: "round",
207
+ strokeLinejoin: "round"
208
+ }), /*#__PURE__*/_jsx(Path, {
209
+ d: "M15 17V16V15",
210
+ stroke: "#000000",
211
+ strokeWidth: "0.9",
212
+ strokeLinecap: "round",
213
+ strokeLinejoin: "round"
214
+ }), /*#__PURE__*/_jsx(Path, {
215
+ d: "M12 21V19.5V18",
216
+ stroke: "#000000",
217
+ strokeWidth: "0.9",
218
+ strokeLinecap: "round",
219
+ strokeLinejoin: "round"
220
+ }), /*#__PURE__*/_jsx(Path, {
221
+ d: "M18 3H21V6",
222
+ stroke: "#000000",
223
+ strokeWidth: "0.9",
224
+ strokeLinecap: "round",
225
+ strokeLinejoin: "round"
226
+ }), /*#__PURE__*/_jsx(Path, {
227
+ d: "M6 21H3V18",
228
+ stroke: "#000000",
229
+ strokeWidth: "0.9",
230
+ strokeLinecap: "round",
231
+ strokeLinejoin: "round"
232
+ }), /*#__PURE__*/_jsx(Path, {
233
+ d: "M18 21H21V18",
234
+ stroke: "#000000",
235
+ strokeWidth: "0.9",
236
+ strokeLinecap: "round",
237
+ strokeLinejoin: "round"
238
+ })]
239
+ });
240
+ const BluetoothIcon = ({
241
+ color = "#111",
242
+ size = 22
243
+ }) => /*#__PURE__*/_jsxs(Svg, {
244
+ width: size,
245
+ height: size,
246
+ strokeWidth: "0.9",
247
+ viewBox: "0 0 24 24",
248
+ fill: "none",
249
+ color: color,
250
+ children: [/*#__PURE__*/_jsx(Path, {
251
+ d: "M6 19.0007C3.57111 17.1763 2 14.2716 2 11C2 5.47715 6.47715 1 12 1C17.5228 1 22 5.47715 22 11C22 14.2716 20.4289 17.1763 18 19.0007",
252
+ stroke: "#fff",
253
+ strokeWidth: "0.9",
254
+ strokeLinecap: "round",
255
+ strokeLinejoin: "round"
256
+ }), /*#__PURE__*/_jsx(Path, {
257
+ d: "M6 19.0007C3.57111 17.1763 2 14.2716 2 11C2 5.47715 6.47715 1 12 1C17.5228 1 22 5.47715 22 11C22 14.2716 20.4289 17.1763 18 19.0007",
258
+ stroke: "#fff",
259
+ strokeWidth: "0.9",
260
+ strokeLinecap: "round",
261
+ strokeLinejoin: "round"
262
+ }), /*#__PURE__*/_jsx(Path, {
263
+ d: "M7.52779 15C6.57771 13.9385 6 12.5367 6 11C6 7.68629 8.68629 5 12 5C15.3137 5 18 7.68629 18 11C18 12.5367 17.4223 13.9385 16.4722 15",
264
+ stroke: "#fff",
265
+ strokeWidth: "0.9",
266
+ strokeLinecap: "round",
267
+ strokeLinejoin: "round"
268
+ }), /*#__PURE__*/_jsx(Path, {
269
+ fillRule: "evenodd",
270
+ clipRule: "evenodd",
271
+ d: "M9.25 11C9.25 9.48122 10.4812 8.25 12 8.25C13.5188 8.25 14.75 9.48122 14.75 11C14.75 12.5188 13.5188 13.75 12 13.75C10.4812 13.75 9.25 12.5188 9.25 11Z",
272
+ fill: "#fff"
273
+ }), /*#__PURE__*/_jsx(Path, {
274
+ d: "M15.0776 21.4865C14.8566 22.8126 13.7093 23.7844 12.365 23.7844H11.7536C10.4093 23.7844 9.262 22.8126 9.041 21.4865L8.53213 18.4333C8.29232 16.9946 9.43086 15.8854 10.5339 15.15C11.9123 14.231 12.3864 14.3406 13.5847 15.1396C14.6421 15.8445 15.8263 16.9946 15.5865 18.4333L15.0776 21.4865Z",
275
+ fill: "#fff"
276
+ })]
277
+ });
278
+ const NFCIcon = ({
279
+ color = "#111",
280
+ size = 22
281
+ }) => /*#__PURE__*/_jsxs(Svg, {
282
+ width: size,
283
+ height: size,
284
+ strokeWidth: "0.9",
285
+ viewBox: "0 0 24 24",
286
+ fill: "none",
287
+ color: color,
288
+ children: [/*#__PURE__*/_jsx(Path, {
289
+ d: "M12 19.51L12.01 19.4989",
290
+ stroke: "#fff",
291
+ strokeWidth: "0.9",
292
+ strokeLinecap: "round",
293
+ strokeLinejoin: "round"
294
+ }), /*#__PURE__*/_jsx(Path, {
295
+ d: "M2 8C8 3.5 16 3.5 22 8",
296
+ stroke: "#fff",
297
+ strokeWidth: "0.9",
298
+ strokeLinecap: "round",
299
+ strokeLinejoin: "round"
300
+ }), /*#__PURE__*/_jsx(Path, {
301
+ d: "M5 12C9 9 15 9 19 12",
302
+ stroke: "#fff",
303
+ strokeWidth: "0.9",
304
+ strokeLinecap: "round",
305
+ strokeLinejoin: "round"
306
+ }), /*#__PURE__*/_jsx(Path, {
307
+ d: "M8.5 15.5C10.7504 14.1 13.2498 14.0996 15.5001 15.5",
308
+ stroke: "#fff",
309
+ strokeWidth: "0.9",
310
+ strokeLinecap: "round",
311
+ strokeLinejoin: "round"
312
+ })]
313
+ });
314
+ const QRIcon = ({
315
+ color = "#111",
316
+ size = 22
317
+ }) => /*#__PURE__*/_jsxs(Svg, {
318
+ width: size,
319
+ height: size,
320
+ strokeWidth: "0.9",
321
+ viewBox: "0 0 24 24",
322
+ fill: "none",
323
+ color: color,
324
+ children: [/*#__PURE__*/_jsx(Path, {
325
+ fillRule: "evenodd",
326
+ clipRule: "evenodd",
327
+ d: "M2.25 3C2.25 2.58579 2.58579 2.25 3 2.25H6C6.41421 2.25 6.75 2.58579 6.75 3C6.75 3.41421 6.41421 3.75 6 3.75H3.75V6C3.75 6.41421 3.41421 6.75 3 6.75C2.58579 6.75 2.25 6.41421 2.25 6V3Z",
328
+ fill: "#fff"
329
+ }), /*#__PURE__*/_jsx(Path, {
330
+ fillRule: "evenodd",
331
+ clipRule: "evenodd",
332
+ d: "M17.25 3C17.25 2.58579 17.5858 2.25 18 2.25H21C21.4142 2.25 21.75 2.58579 21.75 3V6C21.75 6.41421 21.4142 6.75 21 6.75C20.5858 6.75 20.25 6.41421 20.25 6V3.75H18C17.5858 3.75 17.25 3.41421 17.25 3Z",
333
+ fill: "#fff"
334
+ }), /*#__PURE__*/_jsx(Path, {
335
+ fillRule: "evenodd",
336
+ clipRule: "evenodd",
337
+ d: "M3 17.25C3.41421 17.25 3.75 17.5858 3.75 18V20.25H6C6.41421 20.25 6.75 20.5858 6.75 21C6.75 21.4142 6.41421 21.75 6 21.75H3C2.58579 21.75 2.25 21.4142 2.25 21V18C2.25 17.5858 2.58579 17.25 3 17.25Z",
338
+ fill: "#fff"
339
+ }), /*#__PURE__*/_jsx(Path, {
340
+ fillRule: "evenodd",
341
+ clipRule: "evenodd",
342
+ d: "M21 17.25C21.4142 17.25 21.75 17.5858 21.75 18V21C21.75 21.4142 21.4142 21.75 21 21.75H18C17.5858 21.75 17.25 21.4142 17.25 21C17.25 20.5858 17.5858 20.25 18 20.25H20.25V18C20.25 17.5858 20.5858 17.25 21 17.25Z",
343
+ fill: "#fff"
344
+ }), /*#__PURE__*/_jsx(Path, {
345
+ fillRule: "evenodd",
346
+ clipRule: "evenodd",
347
+ d: "M12.9004 6.6654C12.3462 6.33289 11.6538 6.33289 11.0996 6.6654L7.09963 9.0654C6.57252 9.38167 6.25 9.95131 6.25 10.566V14.4336C6.25 15.0483 6.57252 15.618 7.09963 15.9342L11.0996 18.3342C11.6538 18.6668 12.3462 18.6668 12.9004 18.3342L16.9004 15.9342C17.4275 15.618 17.75 15.0483 17.75 14.4336V10.566C17.75 9.95131 17.4275 9.38167 16.9004 9.0654L12.9004 6.6654ZM9.3642 10.6785C9.00209 10.4773 8.5455 10.6078 8.34437 10.9699C8.14324 11.332 8.27373 11.7886 8.63583 11.9898L11.25 13.4418V16.0001C11.25 16.4144 11.5858 16.7501 12 16.7501C12.4142 16.7501 12.75 16.4144 12.75 16.0001V13.4456C12.9152 13.3554 13.1243 13.241 13.3607 13.1115C13.9447 12.7916 14.6961 12.3787 15.3642 12.0077C15.7263 11.8066 15.8568 11.35 15.6557 10.9879C15.4546 10.6257 14.998 10.4952 14.6359 10.6964C13.9716 11.0653 13.223 11.4766 12.6401 11.796C12.3908 11.9325 12.172 12.0521 12.0032 12.1443L9.3642 10.6785Z",
348
+ fill: "#fff"
349
+ })]
350
+ });
351
+ const ProximityIcon = ({
352
+ color = "#111",
353
+ size = 22
354
+ }) => /*#__PURE__*/_jsxs(Svg, {
355
+ width: size,
356
+ height: size,
357
+ strokeWidth: "0.9",
358
+ viewBox: "0 0 24 24",
359
+ fill: "none",
360
+ color: color,
361
+ children: [/*#__PURE__*/_jsx(Path, {
362
+ d: "M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",
363
+ stroke: color,
364
+ strokeWidth: "0.9",
365
+ strokeLinecap: "round",
366
+ strokeLinejoin: "round"
367
+ }), /*#__PURE__*/_jsx(Path, {
368
+ d: "M12 13C12.5523 13 13 12.5523 13 12C13 11.4477 12.5523 11 12 11C11.4477 11 11 11.4477 11 12C11 12.5523 11.4477 13 12 13Z",
369
+ fill: color,
370
+ stroke: color,
371
+ strokeWidth: "0.9",
372
+ strokeLinecap: "round",
373
+ strokeLinejoin: "round"
374
+ }), /*#__PURE__*/_jsx(Path, {
375
+ d: "M19 19L17.5 17.5",
376
+ stroke: color,
377
+ strokeWidth: "0.9",
378
+ strokeLinecap: "round",
379
+ strokeLinejoin: "round"
380
+ }), /*#__PURE__*/_jsx(Path, {
381
+ d: "M15.5 15.5L14.5 14.5",
382
+ stroke: color,
383
+ strokeWidth: "0.9",
384
+ strokeLinecap: "round",
385
+ strokeLinejoin: "round"
386
+ })]
387
+ });
388
+ const SendScreen = ({
44
389
  amount,
45
390
  currency,
46
391
  onClose,
47
392
  onPaymentSent,
48
393
  onError
49
- }) {
50
- const [channel, setChannel] = useState(null);
394
+ }) => {
395
+ const [channel, setChannel] = useState('TRANSFER');
51
396
  const formatted = `${currency} ${amount.toLocaleString('en-NG', {
52
397
  minimumFractionDigits: 2
53
398
  })}`;
54
- if (channel === 'transfer') return /*#__PURE__*/_jsx(TransferSubScreen, {
55
- amount: amount,
56
- currency: currency,
57
- onBack: () => setChannel(null),
58
- onDone: onClose,
59
- onSuccess: onPaymentSent,
60
- onError: onError
61
- });
62
- if (channel === 'nqr') return /*#__PURE__*/_jsx(NQRSubScreen, {
63
- mode: "send",
64
- amount: amount,
65
- currency: currency,
66
- onBack: () => setChannel(null),
67
- onDone: onClose,
68
- onSuccess: onPaymentSent,
69
- onError: onError
70
- });
71
- if (channel === 'proximity') return /*#__PURE__*/_jsx(ProximitySubScreen, {
72
- amount: amount,
73
- currency: currency,
74
- onBack: () => setChannel(null),
75
- onDone: onClose,
76
- onSuccess: onPaymentSent,
77
- onError: onError
78
- });
79
- if (channel === 'bluetooth') return /*#__PURE__*/_jsx(BluetoothSubScreen, {
80
- mode: "send",
81
- amount: amount,
82
- currency: currency,
83
- onBack: () => setChannel(null),
84
- onDone: onClose,
85
- onSuccess: onPaymentSent,
86
- onError: onError
87
- });
88
- if (channel === 'nfc') return /*#__PURE__*/_jsx(NFCSubScreen, {
89
- mode: "send",
90
- amount: amount,
91
- currency: currency,
92
- onBack: () => setChannel(null),
93
- onDone: onClose,
94
- onSuccess: onPaymentSent,
95
- onError: onError
96
- });
97
- return /*#__PURE__*/_jsxs(View, {
98
- style: styles.container,
99
- children: [/*#__PURE__*/_jsxs(View, {
100
- style: styles.amountBanner,
101
- children: [/*#__PURE__*/_jsx(Text, {
102
- style: styles.amountLabel,
103
- children: "Sending"
104
- }), /*#__PURE__*/_jsx(Text, {
105
- style: styles.amountValue,
106
- children: formatted
107
- })]
108
- }), /*#__PURE__*/_jsx(Text, {
109
- style: styles.sectionTitle,
110
- children: "How do you want to send?"
111
- }), /*#__PURE__*/_jsx(ScrollView, {
112
- showsVerticalScrollIndicator: false,
113
- contentContainerStyle: styles.channelList,
114
- children: CHANNELS.map(ch => /*#__PURE__*/_jsxs(TouchableOpacity, {
115
- style: styles.card,
116
- onPress: () => setChannel(ch.id),
117
- activeOpacity: 0.8,
118
- children: [/*#__PURE__*/_jsx(View, {
119
- style: styles.cardIcon,
120
- children: /*#__PURE__*/_jsx(Text, {
121
- style: styles.cardEmoji,
122
- children: ch.emoji
123
- })
124
- }), /*#__PURE__*/_jsxs(View, {
125
- style: styles.cardText,
126
- children: [/*#__PURE__*/_jsx(Text, {
127
- style: styles.cardTitle,
128
- children: ch.title
129
- }), /*#__PURE__*/_jsx(Text, {
130
- style: styles.cardDesc,
131
- children: ch.desc
399
+ return /*#__PURE__*/_jsxs(Container, {
400
+ children: [channel === 'TRANSFER' && /*#__PURE__*/_jsx(TransferSubScreen, {
401
+ amount: amount,
402
+ currency: currency,
403
+ onDone: onClose,
404
+ onSuccess: onPaymentSent,
405
+ onError: onError
406
+ }), channel === 'QRCODE' && /*#__PURE__*/_jsx(NQRSubScreen, {
407
+ mode: "send",
408
+ amount: amount,
409
+ currency: currency,
410
+ onDone: onClose,
411
+ onSuccess: onPaymentSent,
412
+ onError: onError
413
+ }), channel === 'NFC' && /*#__PURE__*/_jsx(NFCSubScreen, {
414
+ mode: "send",
415
+ amount: amount,
416
+ currency: currency,
417
+ onDone: onClose,
418
+ onSuccess: onPaymentSent,
419
+ onError: onError
420
+ }), channel === 'BTH' && /*#__PURE__*/_jsx(BluetoothSubScreen, {
421
+ mode: "send",
422
+ amount: amount,
423
+ currency: currency,
424
+ onDone: onClose,
425
+ onSuccess: onPaymentSent,
426
+ onError: onError
427
+ }), channel === 'PXTR' && /*#__PURE__*/_jsx(ProximitySubScreen, {
428
+ amount: amount,
429
+ currency: currency,
430
+ onDone: onClose,
431
+ onSuccess: onPaymentSent,
432
+ onError: onError
433
+ }), /*#__PURE__*/_jsxs(BottomSheet, {
434
+ children: [/*#__PURE__*/_jsx(SheetHandle, {}), /*#__PURE__*/_jsxs(SheetScrollView, {
435
+ showsVerticalScrollIndicator: false,
436
+ children: [/*#__PURE__*/_jsx(SectionTitle, {
437
+ children: "Pay and send"
438
+ }), /*#__PURE__*/_jsxs(ActionsRow, {
439
+ children: [/*#__PURE__*/_jsxs(ActionButton, {
440
+ onPress: () => setChannel('TRANSFER'),
441
+ children: [/*#__PURE__*/_jsx(ActionIconContainer, {
442
+ color: "#0a3d2e",
443
+ children: /*#__PURE__*/_jsx(Ionicons, {
444
+ name: "business-sharp",
445
+ size: 26,
446
+ color: "#ffffff"
447
+ })
448
+ }), /*#__PURE__*/_jsxs(ActionLabel, {
449
+ children: ["To bank", '\n', "account"]
450
+ })]
451
+ }), /*#__PURE__*/_jsxs(ActionButton, {
452
+ onPress: () => setChannel('QRCODE'),
453
+ children: [/*#__PURE__*/_jsx(ActionIconContainer, {
454
+ color: "#0a3d2e",
455
+ children: /*#__PURE__*/_jsx(QRIcon, {
456
+ color: "#FFF",
457
+ size: 22
458
+ })
459
+ }), /*#__PURE__*/_jsxs(ActionLabel, {
460
+ children: ["Scan", '\n', "QR"]
461
+ })]
462
+ }), /*#__PURE__*/_jsxs(ActionButton, {
463
+ onPress: () => setChannel('PXTR'),
464
+ children: [/*#__PURE__*/_jsx(ActionIconContainer, {
465
+ color: "#0a3d2e",
466
+ children: /*#__PURE__*/_jsx(ProximityIcon, {
467
+ size: 44,
468
+ color: "#FFF"
469
+ })
470
+ }), /*#__PURE__*/_jsxs(ActionLabel, {
471
+ children: ["Use", '\n', "Proximity"]
472
+ })]
473
+ }), /*#__PURE__*/_jsxs(ActionButton, {
474
+ onPress: () => setChannel('BTH'),
475
+ children: [/*#__PURE__*/_jsx(ActionIconContainer, {
476
+ color: "#0a3d2e",
477
+ children: /*#__PURE__*/_jsx(BluetoothIcon, {
478
+ size: 26,
479
+ color: "#ffffff"
480
+ })
481
+ }), /*#__PURE__*/_jsxs(ActionLabel, {
482
+ children: ["Use", '\n', "Bluetooth"]
483
+ })]
484
+ })]
485
+ }), /*#__PURE__*/_jsxs(AddContactButton, {
486
+ onPress: () => setChannel('NFC'),
487
+ children: [/*#__PURE__*/_jsx(PrxyIconContainer, {
488
+ color: "#0a3d2e",
489
+ children: /*#__PURE__*/_jsx(NFCIcon, {
490
+ size: 26,
491
+ color: "#ffffff"
492
+ })
493
+ }), /*#__PURE__*/_jsx(ContactName, {
494
+ children: "Use NFC payment"
132
495
  })]
133
- }), /*#__PURE__*/_jsx(Text, {
134
- style: styles.arrow,
135
- children: "\u203A"
136
496
  })]
137
- }, ch.id))
497
+ })]
138
498
  })]
139
499
  });
140
- }
141
- const styles = StyleSheet.create({
142
- container: {
143
- flex: 1
144
- },
145
- amountBanner: {
146
- backgroundColor: C.brand,
147
- marginHorizontal: S.lg,
148
- borderRadius: R.xl,
149
- padding: S.lg,
150
- alignItems: 'center',
151
- marginBottom: S.lg
152
- },
153
- amountLabel: {
154
- color: 'rgba(255,255,255,0.7)',
155
- fontSize: F.sm,
156
- marginBottom: 4
157
- },
158
- amountValue: {
159
- color: C.white,
160
- fontSize: F.hero,
161
- fontWeight: '800'
162
- },
163
- sectionTitle: {
164
- fontSize: F.sm,
165
- color: C.muted,
166
- fontWeight: '600',
167
- letterSpacing: 0.6,
168
- textTransform: 'uppercase',
169
- paddingHorizontal: S.lg,
170
- marginBottom: S.md
171
- },
172
- channelList: {
173
- paddingHorizontal: S.lg,
174
- paddingBottom: S.xl
175
- },
176
- card: {
177
- flexDirection: 'row',
178
- alignItems: 'center',
179
- backgroundColor: C.surface,
180
- borderRadius: R.lg,
181
- padding: S.md,
182
- marginBottom: S.sm,
183
- ...shadow.sm
184
- },
185
- cardIcon: {
186
- width: 48,
187
- height: 48,
188
- borderRadius: R.md,
189
- backgroundColor: C.white,
190
- justifyContent: 'center',
191
- alignItems: 'center',
192
- marginRight: S.md,
193
- ...shadow.sm
194
- },
195
- cardEmoji: {
196
- fontSize: 24
197
- },
198
- cardText: {
199
- flex: 1
200
- },
201
- cardTitle: {
202
- fontSize: F.md,
203
- fontWeight: '700',
204
- color: C.ink
205
- },
206
- cardDesc: {
207
- fontSize: F.sm,
208
- color: C.muted,
209
- marginTop: 2
210
- },
211
- arrow: {
212
- fontSize: F.xl,
213
- color: C.ghost
214
- }
215
- });
500
+ };
501
+ export default SendScreen;
216
502
  //# sourceMappingURL=SendScreen.js.map