@oxyhq/services 5.3.11 → 5.4.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.
- package/README.md +21 -0
- package/lib/commonjs/assets/assets/icons/OxyServices.tsx +67 -0
- package/lib/commonjs/assets/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/commonjs/assets/icons/OxyServices.js +53 -0
- package/lib/commonjs/assets/icons/OxyServices.js.map +1 -0
- package/lib/commonjs/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/commonjs/core/index.js +119 -23
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/index.js +2 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/lib/sonner.js +15 -11
- package/lib/commonjs/lib/sonner.js.map +1 -1
- package/lib/commonjs/node/index.js +2 -0
- package/lib/commonjs/node/index.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedItem.js +109 -0
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -0
- package/lib/commonjs/ui/components/GroupedSection.js +33 -0
- package/lib/commonjs/ui/components/GroupedSection.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +95 -112
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileCard.js +124 -0
- package/lib/commonjs/ui/components/ProfileCard.js.map +1 -0
- package/lib/commonjs/ui/components/QuickActions.js +87 -0
- package/lib/commonjs/ui/components/QuickActions.js.map +1 -0
- package/lib/commonjs/ui/components/Section.js +36 -0
- package/lib/commonjs/ui/components/Section.js.map +1 -0
- package/lib/commonjs/ui/components/SectionTitle.js +35 -0
- package/lib/commonjs/ui/components/SectionTitle.js.map +1 -0
- package/lib/commonjs/ui/components/bottomSheet/index.js +6 -6
- package/lib/commonjs/ui/components/index.js +97 -0
- package/lib/commonjs/ui/components/index.js.map +1 -0
- package/lib/commonjs/ui/navigation/OxyRouter.js +20 -3
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +190 -207
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountManagementDemo.js +299 -0
- package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +669 -401
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +695 -498
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +451 -488
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +498 -185
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/BillingManagementScreen.js +636 -0
- package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js +2497 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +1620 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/ProfileScreen.js +117 -13
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +1 -1
- package/lib/commonjs/utils/polyfills.js +42 -0
- package/lib/commonjs/utils/polyfills.js.map +1 -0
- package/lib/module/assets/assets/icons/OxyServices.tsx +67 -0
- package/lib/module/assets/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/module/assets/icons/OxyServices.js +46 -0
- package/lib/module/assets/icons/OxyServices.js.map +1 -0
- package/lib/module/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/module/core/index.js +119 -23
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/index.js +3 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/lib/sonner.js +13 -1
- package/lib/module/lib/sonner.js.map +1 -1
- package/lib/module/node/index.js +3 -0
- package/lib/module/node/index.js.map +1 -1
- package/lib/module/ui/components/GroupedItem.js +104 -0
- package/lib/module/ui/components/GroupedItem.js.map +1 -0
- package/lib/module/ui/components/GroupedSection.js +28 -0
- package/lib/module/ui/components/GroupedSection.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +97 -114
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/ProfileCard.js +119 -0
- package/lib/module/ui/components/ProfileCard.js.map +1 -0
- package/lib/module/ui/components/QuickActions.js +82 -0
- package/lib/module/ui/components/QuickActions.js.map +1 -0
- package/lib/module/ui/components/Section.js +31 -0
- package/lib/module/ui/components/Section.js.map +1 -0
- package/lib/module/ui/components/SectionTitle.js +30 -0
- package/lib/module/ui/components/SectionTitle.js.map +1 -0
- package/lib/module/ui/components/bottomSheet/index.js +2 -5
- package/lib/module/ui/components/bottomSheet/index.js.map +1 -1
- package/lib/module/ui/components/index.js +18 -0
- package/lib/module/ui/components/index.js.map +1 -0
- package/lib/module/ui/navigation/OxyRouter.js +20 -3
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +191 -208
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountManagementDemo.js +296 -0
- package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -0
- package/lib/module/ui/screens/AccountOverviewScreen.js +671 -403
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +698 -501
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +450 -488
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +498 -186
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/BillingManagementScreen.js +631 -0
- package/lib/module/ui/screens/BillingManagementScreen.js.map +1 -0
- package/lib/module/ui/screens/FileManagementScreen.js +2492 -0
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +1615 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
- package/lib/module/ui/screens/ProfileScreen.js +118 -14
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +1 -1
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +1 -1
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/module/utils/polyfills.js +36 -0
- package/lib/module/utils/polyfills.js.map +1 -0
- package/lib/typescript/assets/icons/OxyServices.d.ts +29 -0
- package/lib/typescript/assets/icons/OxyServices.d.ts.map +1 -0
- package/lib/typescript/core/index.d.ts +26 -1
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/lib/sonner.d.ts +5 -1
- package/lib/typescript/lib/sonner.d.ts.map +1 -1
- package/lib/typescript/models/interfaces.d.ts +1 -2
- package/lib/typescript/models/interfaces.d.ts.map +1 -1
- package/lib/typescript/node/index.d.ts +1 -0
- package/lib/typescript/node/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/GroupedItem.d.ts +17 -0
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -0
- package/lib/typescript/ui/components/GroupedSection.d.ts +19 -0
- package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/ProfileCard.d.ts +20 -0
- package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -0
- package/lib/typescript/ui/components/QuickActions.d.ts +15 -0
- package/lib/typescript/ui/components/QuickActions.d.ts.map +1 -0
- package/lib/typescript/ui/components/Section.d.ts +11 -0
- package/lib/typescript/ui/components/Section.d.ts.map +1 -0
- package/lib/typescript/ui/components/SectionTitle.d.ts +9 -0
- package/lib/typescript/ui/components/SectionTitle.d.ts.map +1 -0
- package/lib/typescript/ui/components/bottomSheet/index.d.ts +3 -2
- package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/index.d.ts +13 -0
- package/lib/typescript/ui/components/index.d.ts.map +1 -0
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/types.d.ts +8 -0
- package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountManagementDemo.d.ts +8 -0
- package/lib/typescript/ui/screens/AccountManagementDemo.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts +1 -4
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts +8 -0
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/utils/polyfills.d.ts +6 -0
- package/lib/typescript/utils/polyfills.d.ts.map +1 -0
- package/package.json +11 -3
- package/src/__tests__/polyfills.test.ts +30 -0
- package/src/__tests__/setup.ts +43 -0
- package/src/__tests__/ui/screens/AccountSettingsScreen.test.tsx +8 -8
- package/src/assets/icons/OxyServices.tsx +67 -0
- package/src/assets/icons/logo_OxyServices.svg +1 -0
- package/src/core/index.ts +127 -19
- package/src/index.ts +3 -0
- package/src/lib/sonner.ts +10 -1
- package/src/models/interfaces.ts +1 -2
- package/src/node/index.ts +3 -0
- package/src/ui/components/GroupedItem.tsx +118 -0
- package/src/ui/components/GroupedSection.tsx +45 -0
- package/src/ui/components/OxyProvider.tsx +95 -120
- package/src/ui/components/ProfileCard.tsx +129 -0
- package/src/ui/components/QuickActions.tsx +90 -0
- package/src/ui/components/Section.tsx +37 -0
- package/src/ui/components/SectionTitle.tsx +31 -0
- package/src/ui/components/bottomSheet/index.tsx +13 -11
- package/src/ui/components/index.ts +15 -0
- package/src/ui/navigation/OxyRouter.tsx +20 -3
- package/src/ui/navigation/types.ts +10 -1
- package/src/ui/screens/AccountCenterScreen.tsx +188 -159
- package/src/ui/screens/AccountManagementDemo.tsx +297 -0
- package/src/ui/screens/AccountOverviewScreen.tsx +474 -310
- package/src/ui/screens/AccountSettingsScreen.tsx +648 -463
- package/src/ui/screens/AccountSwitcherScreen.tsx +385 -449
- package/src/ui/screens/AppInfoScreen.tsx +571 -140
- package/src/ui/screens/BillingManagementScreen.tsx +589 -0
- package/src/ui/screens/FileManagementScreen.tsx +2513 -0
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +1628 -0
- package/src/ui/screens/ProfileScreen.tsx +101 -7
- package/src/ui/screens/SessionManagementScreen.tsx +1 -0
- package/src/ui/screens/SignInScreen.tsx +1 -1
- package/src/ui/screens/SignUpScreen.tsx +1 -1
- package/src/utils/polyfills.ts +34 -0
- package/lib/commonjs/lib/sonner.web.js +0 -17
- package/lib/commonjs/lib/sonner.web.js.map +0 -1
- package/lib/module/lib/sonner.web.js +0 -4
- package/lib/module/lib/sonner.web.js.map +0 -1
- package/lib/typescript/__tests__/ui/screens/AccountSettingsScreen.test.d.ts +0 -2
- package/lib/typescript/__tests__/ui/screens/AccountSettingsScreen.test.d.ts.map +0 -1
- package/lib/typescript/lib/sonner.web.d.ts +0 -2
- package/lib/typescript/lib/sonner.web.d.ts.map +0 -1
- package/src/lib/sonner.web.ts +0 -1
|
@@ -0,0 +1,1615 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useState, useEffect } from 'react';
|
|
4
|
+
import { View, Text, TouchableOpacity, StyleSheet, ScrollView, ActivityIndicator, Alert } from 'react-native';
|
|
5
|
+
import { useOxy } from '../context/OxyContext';
|
|
6
|
+
import { fontFamilies } from '../styles/fonts';
|
|
7
|
+
import { toast } from '../../lib/sonner';
|
|
8
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
9
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
const PremiumSubscriptionScreen = ({
|
|
11
|
+
onClose,
|
|
12
|
+
theme,
|
|
13
|
+
navigate,
|
|
14
|
+
goBack
|
|
15
|
+
}) => {
|
|
16
|
+
const {
|
|
17
|
+
user,
|
|
18
|
+
oxyServices
|
|
19
|
+
} = useOxy();
|
|
20
|
+
const [loading, setLoading] = useState(true);
|
|
21
|
+
const [subscription, setSubscription] = useState(null);
|
|
22
|
+
const [plans, setPlans] = useState([]);
|
|
23
|
+
const [individualFeatures, setIndividualFeatures] = useState([]);
|
|
24
|
+
const [selectedPlan, setSelectedPlan] = useState(null);
|
|
25
|
+
const [processingPayment, setProcessingPayment] = useState(false);
|
|
26
|
+
const [billingInterval, setBillingInterval] = useState('month');
|
|
27
|
+
const [activeTab, setActiveTab] = useState('plans');
|
|
28
|
+
const [currentAppPackage, setCurrentAppPackage] = useState('mention'); // Default to mention for demo
|
|
29
|
+
|
|
30
|
+
const isDarkTheme = theme === 'dark';
|
|
31
|
+
const textColor = isDarkTheme ? '#FFFFFF' : '#000000';
|
|
32
|
+
const backgroundColor = isDarkTheme ? '#121212' : '#FFFFFF';
|
|
33
|
+
const secondaryBackgroundColor = isDarkTheme ? '#222222' : '#F5F5F5';
|
|
34
|
+
const borderColor = isDarkTheme ? '#444444' : '#E0E0E0';
|
|
35
|
+
const primaryColor = '#007AFF';
|
|
36
|
+
const successColor = '#30D158';
|
|
37
|
+
const warningColor = '#FF9500';
|
|
38
|
+
const dangerColor = '#FF3B30';
|
|
39
|
+
|
|
40
|
+
// Oxy+ subscription plans
|
|
41
|
+
const mockPlans = [{
|
|
42
|
+
id: 'mention-plus',
|
|
43
|
+
name: 'Mention+',
|
|
44
|
+
description: 'Enhanced features for better social experience',
|
|
45
|
+
price: 4.99,
|
|
46
|
+
currency: 'USD',
|
|
47
|
+
interval: 'month',
|
|
48
|
+
appScope: 'specific',
|
|
49
|
+
applicableApps: ['mention'],
|
|
50
|
+
// Only available in mention app
|
|
51
|
+
features: ['Undo posts option', 'Improved reading mode', 'Organize bookmarks into folders', 'Early access to select features', 'Edit posts capability', 'Enhanced customization options'],
|
|
52
|
+
includedFeatures: ['reading-mode-plus', 'custom-themes']
|
|
53
|
+
}, {
|
|
54
|
+
id: 'oxy-insider',
|
|
55
|
+
name: 'Oxy+ Insider',
|
|
56
|
+
description: 'Exclusive access to behind-the-scenes content',
|
|
57
|
+
price: 9.99,
|
|
58
|
+
currency: 'USD',
|
|
59
|
+
interval: 'month',
|
|
60
|
+
appScope: 'ecosystem',
|
|
61
|
+
applicableApps: ['mention', 'oxy-social', 'oxy-workspace', 'oxy-creator'],
|
|
62
|
+
features: ['Everything in Mention+', 'Behind-the-scenes updates from creators', 'Early access to new features', 'Dedicated support team', 'Exclusive content access', 'Beta feature testing'],
|
|
63
|
+
includedFeatures: ['reading-mode-plus', 'custom-themes', 'analytics-basic'],
|
|
64
|
+
isPopular: true
|
|
65
|
+
}, {
|
|
66
|
+
id: 'oxy-connect',
|
|
67
|
+
name: 'Oxy+ Connect',
|
|
68
|
+
description: 'Advanced networking and community features',
|
|
69
|
+
price: 14.99,
|
|
70
|
+
currency: 'USD',
|
|
71
|
+
interval: 'month',
|
|
72
|
+
appScope: 'ecosystem',
|
|
73
|
+
applicableApps: ['mention', 'oxy-social', 'oxy-workspace', 'oxy-creator'],
|
|
74
|
+
features: ['Everything in Oxy+ Insider', 'Create and join private groups', 'Advanced search and filtering tools', 'Customizable profile highlighting', 'Enhanced connection features', 'Priority in community events'],
|
|
75
|
+
includedFeatures: ['reading-mode-plus', 'custom-themes', 'analytics-basic', 'group-management']
|
|
76
|
+
}, {
|
|
77
|
+
id: 'oxy-premium',
|
|
78
|
+
name: 'Oxy+ Premium',
|
|
79
|
+
description: 'Complete premium experience with all perks',
|
|
80
|
+
price: 24.99,
|
|
81
|
+
currency: 'USD',
|
|
82
|
+
interval: 'month',
|
|
83
|
+
appScope: 'ecosystem',
|
|
84
|
+
applicableApps: ['mention', 'oxy-social', 'oxy-workspace', 'oxy-creator', 'oxy-analytics'],
|
|
85
|
+
features: ['Everything in Oxy+ Connect', 'Priority customer support', 'Access to premium content and events', 'Advanced analytics dashboard', 'VIP community status', 'Exclusive premium events'],
|
|
86
|
+
includedFeatures: ['reading-mode-plus', 'custom-themes', 'analytics-basic', 'analytics-advanced', 'group-management']
|
|
87
|
+
}, {
|
|
88
|
+
id: 'oxy-creator',
|
|
89
|
+
name: 'Oxy+ Creator',
|
|
90
|
+
description: 'Professional tools for content creators',
|
|
91
|
+
price: 39.99,
|
|
92
|
+
currency: 'USD',
|
|
93
|
+
interval: 'month',
|
|
94
|
+
appScope: 'ecosystem',
|
|
95
|
+
applicableApps: ['mention', 'oxy-social', 'oxy-workspace', 'oxy-creator', 'oxy-analytics', 'oxy-studio'],
|
|
96
|
+
features: ['Everything in Oxy+ Premium', 'Advanced analytics and insights', 'Promotional tools and resources', 'Content monetization features', 'Creator support program', 'Revenue sharing opportunities'],
|
|
97
|
+
includedFeatures: ['reading-mode-plus', 'custom-themes', 'analytics-basic', 'analytics-advanced', 'group-management', 'creator-tools', 'monetization-features']
|
|
98
|
+
}];
|
|
99
|
+
|
|
100
|
+
// Individual feature subscriptions
|
|
101
|
+
const mockIndividualFeatures = [{
|
|
102
|
+
id: 'analytics-basic',
|
|
103
|
+
name: 'Basic Analytics',
|
|
104
|
+
description: 'View post performance and engagement metrics',
|
|
105
|
+
price: 2.99,
|
|
106
|
+
currency: 'USD',
|
|
107
|
+
interval: 'month',
|
|
108
|
+
category: 'analytics',
|
|
109
|
+
appScope: 'ecosystem',
|
|
110
|
+
applicableApps: ['mention', 'oxy-social', 'oxy-workspace'],
|
|
111
|
+
canBePurchasedSeparately: true,
|
|
112
|
+
includedInPlans: ['oxy-insider', 'oxy-connect', 'oxy-premium', 'oxy-creator']
|
|
113
|
+
}, {
|
|
114
|
+
id: 'analytics-advanced',
|
|
115
|
+
name: 'Advanced Analytics',
|
|
116
|
+
description: 'Detailed insights, trends, and audience demographics',
|
|
117
|
+
price: 7.99,
|
|
118
|
+
currency: 'USD',
|
|
119
|
+
interval: 'month',
|
|
120
|
+
category: 'analytics',
|
|
121
|
+
appScope: 'ecosystem',
|
|
122
|
+
applicableApps: ['mention', 'oxy-social', 'oxy-workspace', 'oxy-creator', 'oxy-analytics'],
|
|
123
|
+
canBePurchasedSeparately: true,
|
|
124
|
+
includedInPlans: ['oxy-premium', 'oxy-creator']
|
|
125
|
+
}, {
|
|
126
|
+
id: 'custom-themes',
|
|
127
|
+
name: 'Custom Themes',
|
|
128
|
+
description: 'Personalize your app with custom colors and layouts',
|
|
129
|
+
price: 1.99,
|
|
130
|
+
currency: 'USD',
|
|
131
|
+
interval: 'month',
|
|
132
|
+
category: 'customization',
|
|
133
|
+
appScope: 'ecosystem',
|
|
134
|
+
applicableApps: ['mention', 'oxy-social', 'oxy-workspace', 'oxy-creator'],
|
|
135
|
+
canBePurchasedSeparately: false,
|
|
136
|
+
// Included in all plans
|
|
137
|
+
includedInPlans: ['mention-plus', 'oxy-insider', 'oxy-connect', 'oxy-premium', 'oxy-creator']
|
|
138
|
+
}, {
|
|
139
|
+
id: 'reading-mode-plus',
|
|
140
|
+
name: 'Reading Mode Plus',
|
|
141
|
+
description: 'Enhanced reading experience with focus modes',
|
|
142
|
+
price: 1.99,
|
|
143
|
+
currency: 'USD',
|
|
144
|
+
interval: 'month',
|
|
145
|
+
category: 'content',
|
|
146
|
+
appScope: 'specific',
|
|
147
|
+
applicableApps: ['mention', 'oxy-social'],
|
|
148
|
+
canBePurchasedSeparately: false,
|
|
149
|
+
// Included in all plans
|
|
150
|
+
includedInPlans: ['mention-plus', 'oxy-insider', 'oxy-connect', 'oxy-premium', 'oxy-creator']
|
|
151
|
+
}, {
|
|
152
|
+
id: 'group-management',
|
|
153
|
+
name: 'Group Management',
|
|
154
|
+
description: 'Create and manage private groups and communities',
|
|
155
|
+
price: 4.99,
|
|
156
|
+
currency: 'USD',
|
|
157
|
+
interval: 'month',
|
|
158
|
+
category: 'networking',
|
|
159
|
+
appScope: 'ecosystem',
|
|
160
|
+
applicableApps: ['mention', 'oxy-social', 'oxy-workspace'],
|
|
161
|
+
canBePurchasedSeparately: true,
|
|
162
|
+
includedInPlans: ['oxy-connect', 'oxy-premium', 'oxy-creator']
|
|
163
|
+
}, {
|
|
164
|
+
id: 'creator-tools',
|
|
165
|
+
name: 'Creator Tools Suite',
|
|
166
|
+
description: 'Professional content creation and editing tools',
|
|
167
|
+
price: 9.99,
|
|
168
|
+
currency: 'USD',
|
|
169
|
+
interval: 'month',
|
|
170
|
+
category: 'productivity',
|
|
171
|
+
appScope: 'specific',
|
|
172
|
+
applicableApps: ['oxy-creator', 'oxy-studio'],
|
|
173
|
+
canBePurchasedSeparately: true,
|
|
174
|
+
includedInPlans: ['oxy-creator']
|
|
175
|
+
}, {
|
|
176
|
+
id: 'monetization-features',
|
|
177
|
+
name: 'Monetization Features',
|
|
178
|
+
description: 'Revenue sharing, sponsorship tools, and creator fund access',
|
|
179
|
+
price: 12.99,
|
|
180
|
+
currency: 'USD',
|
|
181
|
+
interval: 'month',
|
|
182
|
+
category: 'productivity',
|
|
183
|
+
appScope: 'specific',
|
|
184
|
+
applicableApps: ['oxy-creator'],
|
|
185
|
+
canBePurchasedSeparately: true,
|
|
186
|
+
includedInPlans: ['oxy-creator']
|
|
187
|
+
}, {
|
|
188
|
+
id: 'workspace-collaboration',
|
|
189
|
+
name: 'Workspace Collaboration',
|
|
190
|
+
description: 'Advanced team features and project management tools',
|
|
191
|
+
price: 6.99,
|
|
192
|
+
currency: 'USD',
|
|
193
|
+
interval: 'month',
|
|
194
|
+
category: 'productivity',
|
|
195
|
+
appScope: 'specific',
|
|
196
|
+
applicableApps: ['oxy-workspace'],
|
|
197
|
+
canBePurchasedSeparately: true,
|
|
198
|
+
includedInPlans: ['oxy-premium', 'oxy-creator']
|
|
199
|
+
}];
|
|
200
|
+
useEffect(() => {
|
|
201
|
+
detectCurrentApp();
|
|
202
|
+
}, []);
|
|
203
|
+
useEffect(() => {
|
|
204
|
+
if (currentAppPackage) {
|
|
205
|
+
loadSubscriptionData();
|
|
206
|
+
}
|
|
207
|
+
}, [currentAppPackage, user?.isPremium]);
|
|
208
|
+
const detectCurrentApp = () => {
|
|
209
|
+
// In a real implementation, this would detect the actual app package name
|
|
210
|
+
// For now, we'll use a mock detection based on available methods
|
|
211
|
+
|
|
212
|
+
// Real app detection methods you could use:
|
|
213
|
+
// 1. Check bundle identifier in React Native:
|
|
214
|
+
// import DeviceInfo from 'react-native-device-info';
|
|
215
|
+
// const bundleId = DeviceInfo.getBundleId();
|
|
216
|
+
// Example: com.oxy.mention -> 'mention'
|
|
217
|
+
|
|
218
|
+
// 2. Environment variables or build configuration
|
|
219
|
+
// const appPackage = __DEV__ ? process.env.APP_PACKAGE : 'mention';
|
|
220
|
+
|
|
221
|
+
// 3. Check specific app capabilities or modules
|
|
222
|
+
// if (typeof MentionModule !== 'undefined') return 'mention';
|
|
223
|
+
// if (typeof OxyWorkspaceModule !== 'undefined') return 'oxy-workspace';
|
|
224
|
+
|
|
225
|
+
// 4. Use build-time configuration with Metro or similar
|
|
226
|
+
// const appPackage = require('../config/app.json').packageName;
|
|
227
|
+
|
|
228
|
+
// For demo purposes, we'll simulate different apps
|
|
229
|
+
// You would replace this with actual app detection logic
|
|
230
|
+
|
|
231
|
+
// IMPORTANT: This ensures subscription restrictions work properly:
|
|
232
|
+
// - Mention+ plan can only be subscribed to when app package == 'mention'
|
|
233
|
+
// - Other app-specific plans follow the same pattern
|
|
234
|
+
// - Ecosystem plans work across all apps
|
|
235
|
+
|
|
236
|
+
const detectedApp = 'mention'; // This would be dynamic in real implementation
|
|
237
|
+
|
|
238
|
+
setCurrentAppPackage(detectedApp);
|
|
239
|
+
|
|
240
|
+
// Log for debugging
|
|
241
|
+
console.log('Detected app package:', detectedApp);
|
|
242
|
+
console.log('Available plans for this app will be filtered accordingly');
|
|
243
|
+
};
|
|
244
|
+
const loadSubscriptionData = async () => {
|
|
245
|
+
try {
|
|
246
|
+
setLoading(true);
|
|
247
|
+
|
|
248
|
+
// Filter plans available for current app
|
|
249
|
+
const availablePlans = mockPlans.filter(plan => plan.applicableApps.includes(currentAppPackage));
|
|
250
|
+
setPlans(availablePlans);
|
|
251
|
+
|
|
252
|
+
// Mock current subscription
|
|
253
|
+
let currentSubscription = null;
|
|
254
|
+
if (user?.isPremium) {
|
|
255
|
+
currentSubscription = {
|
|
256
|
+
id: 'sub_12345',
|
|
257
|
+
planId: 'oxy-insider',
|
|
258
|
+
status: 'active',
|
|
259
|
+
currentPeriodStart: new Date().toISOString(),
|
|
260
|
+
currentPeriodEnd: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000).toISOString(),
|
|
261
|
+
cancelAtPeriodEnd: false
|
|
262
|
+
};
|
|
263
|
+
setSubscription(currentSubscription);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
// Filter features available for current app and update based on current subscription
|
|
267
|
+
const availableFeatures = mockIndividualFeatures.filter(feature => feature.applicableApps.includes(currentAppPackage));
|
|
268
|
+
const updatedFeatures = availableFeatures.map(feature => {
|
|
269
|
+
const isIncludedInCurrentPlan = !!(currentSubscription && feature.includedInPlans.includes(currentSubscription.planId));
|
|
270
|
+
return {
|
|
271
|
+
...feature,
|
|
272
|
+
isIncludedInCurrentPlan,
|
|
273
|
+
isSubscribed: isIncludedInCurrentPlan ? true : false // Mock some individual subscriptions
|
|
274
|
+
};
|
|
275
|
+
});
|
|
276
|
+
setIndividualFeatures(updatedFeatures);
|
|
277
|
+
} catch (error) {
|
|
278
|
+
console.error('Failed to load subscription data:', error);
|
|
279
|
+
toast.error('Failed to load subscription information');
|
|
280
|
+
} finally {
|
|
281
|
+
setLoading(false);
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
const handlePlanSelection = planId => {
|
|
285
|
+
setSelectedPlan(planId);
|
|
286
|
+
};
|
|
287
|
+
const handleSubscribe = async planId => {
|
|
288
|
+
try {
|
|
289
|
+
// Check if plan is available for current app
|
|
290
|
+
const selectedPlan = mockPlans.find(plan => plan.id === planId);
|
|
291
|
+
if (!selectedPlan?.applicableApps.includes(currentAppPackage)) {
|
|
292
|
+
console.log(`❌ Subscription blocked: Plan "${selectedPlan?.name}" not available for app "${currentAppPackage}"`);
|
|
293
|
+
toast.error(`This plan is not available for the current app (${currentAppPackage})`);
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
// Special restriction for Mention+ plan - only available in mention app
|
|
298
|
+
if (planId === 'mention-plus' && currentAppPackage !== 'mention') {
|
|
299
|
+
console.log(`❌ Subscription blocked: Mention+ plan requires app to be "mention", current app is "${currentAppPackage}"`);
|
|
300
|
+
toast.error('Mention+ is only available in the Mention app');
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
console.log(`✅ Subscription allowed: Plan "${selectedPlan.name}" is available for app "${currentAppPackage}"`);
|
|
304
|
+
setProcessingPayment(true);
|
|
305
|
+
|
|
306
|
+
// Mock payment processing
|
|
307
|
+
await new Promise(resolve => setTimeout(resolve, 2000));
|
|
308
|
+
toast.success('Subscription activated successfully!');
|
|
309
|
+
|
|
310
|
+
// Mock subscription update
|
|
311
|
+
setSubscription({
|
|
312
|
+
id: 'sub_' + Date.now(),
|
|
313
|
+
planId,
|
|
314
|
+
status: 'active',
|
|
315
|
+
currentPeriodStart: new Date().toISOString(),
|
|
316
|
+
currentPeriodEnd: new Date(Date.now() + 30 * 24 * 60 * 60 * 1000).toISOString(),
|
|
317
|
+
cancelAtPeriodEnd: false
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
// Reload data to update feature states
|
|
321
|
+
loadSubscriptionData();
|
|
322
|
+
} catch (error) {
|
|
323
|
+
console.error('Payment failed:', error);
|
|
324
|
+
toast.error('Payment failed. Please try again.');
|
|
325
|
+
} finally {
|
|
326
|
+
setProcessingPayment(false);
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
const handleCancelSubscription = () => {
|
|
330
|
+
Alert.alert('Cancel Subscription', 'Are you sure you want to cancel your subscription? You will lose access to premium features at the end of your current billing period.', [{
|
|
331
|
+
text: 'Keep Subscription',
|
|
332
|
+
style: 'cancel'
|
|
333
|
+
}, {
|
|
334
|
+
text: 'Cancel Subscription',
|
|
335
|
+
style: 'destructive',
|
|
336
|
+
onPress: async () => {
|
|
337
|
+
try {
|
|
338
|
+
// Mock cancellation
|
|
339
|
+
setSubscription(prev => prev ? {
|
|
340
|
+
...prev,
|
|
341
|
+
cancelAtPeriodEnd: true
|
|
342
|
+
} : null);
|
|
343
|
+
toast.success('Subscription will be canceled at the end of the billing period');
|
|
344
|
+
} catch (error) {
|
|
345
|
+
toast.error('Failed to cancel subscription');
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}]);
|
|
349
|
+
};
|
|
350
|
+
const handleReactivateSubscription = async () => {
|
|
351
|
+
try {
|
|
352
|
+
setSubscription(prev => prev ? {
|
|
353
|
+
...prev,
|
|
354
|
+
cancelAtPeriodEnd: false
|
|
355
|
+
} : null);
|
|
356
|
+
toast.success('Subscription reactivated successfully');
|
|
357
|
+
} catch (error) {
|
|
358
|
+
toast.error('Failed to reactivate subscription');
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
const formatPrice = (price, currency, interval) => {
|
|
362
|
+
const yearlyPrice = interval === 'year' ? price : price * 12 * 0.8; // 20% discount for yearly
|
|
363
|
+
const displayPrice = billingInterval === 'year' ? yearlyPrice : price;
|
|
364
|
+
return {
|
|
365
|
+
price: displayPrice,
|
|
366
|
+
formatted: `$${displayPrice.toFixed(2)}`,
|
|
367
|
+
interval: billingInterval === 'year' ? 'year' : 'month'
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
const getCurrentPlan = () => {
|
|
371
|
+
if (!subscription) return null;
|
|
372
|
+
return plans.find(plan => plan.id === subscription.planId);
|
|
373
|
+
};
|
|
374
|
+
const handleFeatureSubscribe = async featureId => {
|
|
375
|
+
try {
|
|
376
|
+
// Check if feature is available for current app
|
|
377
|
+
const selectedFeature = mockIndividualFeatures.find(feature => feature.id === featureId);
|
|
378
|
+
if (!selectedFeature?.applicableApps.includes(currentAppPackage)) {
|
|
379
|
+
toast.error(`This feature is not available for the current app (${currentAppPackage})`);
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
// Special restrictions for app-specific features
|
|
384
|
+
if (selectedFeature.appScope === 'specific') {
|
|
385
|
+
// For features that are only available in specific apps, enforce strict matching
|
|
386
|
+
const hasExactMatch = selectedFeature.applicableApps.length === 1 && selectedFeature.applicableApps[0] === currentAppPackage;
|
|
387
|
+
if (!hasExactMatch && selectedFeature.applicableApps.length === 1) {
|
|
388
|
+
const requiredApp = selectedFeature.applicableApps[0];
|
|
389
|
+
toast.error(`${selectedFeature.name} is only available in the ${requiredApp} app`);
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
setProcessingPayment(true);
|
|
394
|
+
|
|
395
|
+
// Mock feature subscription
|
|
396
|
+
await new Promise(resolve => setTimeout(resolve, 1500));
|
|
397
|
+
setIndividualFeatures(prev => prev.map(feature => feature.id === featureId ? {
|
|
398
|
+
...feature,
|
|
399
|
+
isSubscribed: true
|
|
400
|
+
} : feature));
|
|
401
|
+
const feature = individualFeatures.find(f => f.id === featureId);
|
|
402
|
+
toast.success(`Subscribed to ${feature?.name} successfully!`);
|
|
403
|
+
} catch (error) {
|
|
404
|
+
console.error('Feature subscription failed:', error);
|
|
405
|
+
toast.error('Feature subscription failed. Please try again.');
|
|
406
|
+
} finally {
|
|
407
|
+
setProcessingPayment(false);
|
|
408
|
+
}
|
|
409
|
+
};
|
|
410
|
+
const handleFeatureUnsubscribe = async featureId => {
|
|
411
|
+
const feature = individualFeatures.find(f => f.id === featureId);
|
|
412
|
+
Alert.alert('Unsubscribe Feature', `Are you sure you want to unsubscribe from ${feature?.name}?`, [{
|
|
413
|
+
text: 'Keep Feature',
|
|
414
|
+
style: 'cancel'
|
|
415
|
+
}, {
|
|
416
|
+
text: 'Unsubscribe',
|
|
417
|
+
style: 'destructive',
|
|
418
|
+
onPress: async () => {
|
|
419
|
+
try {
|
|
420
|
+
setIndividualFeatures(prev => prev.map(f => f.id === featureId ? {
|
|
421
|
+
...f,
|
|
422
|
+
isSubscribed: false
|
|
423
|
+
} : f));
|
|
424
|
+
toast.success(`Unsubscribed from ${feature?.name}`);
|
|
425
|
+
} catch (error) {
|
|
426
|
+
toast.error('Failed to unsubscribe from feature');
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}]);
|
|
430
|
+
};
|
|
431
|
+
const renderHeader = () => {
|
|
432
|
+
const getAppDisplayName = packageName => {
|
|
433
|
+
const appNames = {
|
|
434
|
+
'mention': 'Mention',
|
|
435
|
+
'oxy-social': 'Oxy Social',
|
|
436
|
+
'oxy-workspace': 'Oxy Workspace',
|
|
437
|
+
'oxy-creator': 'Oxy Creator',
|
|
438
|
+
'oxy-analytics': 'Oxy Analytics',
|
|
439
|
+
'oxy-studio': 'Oxy Studio'
|
|
440
|
+
};
|
|
441
|
+
return appNames[packageName] || packageName;
|
|
442
|
+
};
|
|
443
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
444
|
+
style: [styles.header, {
|
|
445
|
+
borderBottomColor: borderColor
|
|
446
|
+
}],
|
|
447
|
+
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
448
|
+
style: styles.backButton,
|
|
449
|
+
onPress: goBack,
|
|
450
|
+
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
451
|
+
name: "arrow-back",
|
|
452
|
+
size: 24,
|
|
453
|
+
color: textColor
|
|
454
|
+
})
|
|
455
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
456
|
+
style: styles.headerTitleContainer,
|
|
457
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
458
|
+
style: [styles.headerTitle, {
|
|
459
|
+
color: textColor
|
|
460
|
+
}],
|
|
461
|
+
children: "Oxy+ Subscriptions"
|
|
462
|
+
}), /*#__PURE__*/_jsxs(Text, {
|
|
463
|
+
style: [styles.currentAppText, {
|
|
464
|
+
color: isDarkTheme ? '#BBBBBB' : '#666666'
|
|
465
|
+
}],
|
|
466
|
+
children: ["for ", getAppDisplayName(currentAppPackage)]
|
|
467
|
+
})]
|
|
468
|
+
}), onClose && /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
469
|
+
style: styles.closeButton,
|
|
470
|
+
onPress: onClose,
|
|
471
|
+
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
472
|
+
name: "close",
|
|
473
|
+
size: 24,
|
|
474
|
+
color: textColor
|
|
475
|
+
})
|
|
476
|
+
})]
|
|
477
|
+
});
|
|
478
|
+
};
|
|
479
|
+
const renderCurrentSubscription = () => {
|
|
480
|
+
if (!subscription) return null;
|
|
481
|
+
const currentPlan = getCurrentPlan();
|
|
482
|
+
if (!currentPlan) return null;
|
|
483
|
+
const statusColor = subscription.status === 'active' ? successColor : subscription.status === 'trialing' ? warningColor : dangerColor;
|
|
484
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
485
|
+
style: styles.section,
|
|
486
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
487
|
+
style: [styles.sectionTitle, {
|
|
488
|
+
color: textColor
|
|
489
|
+
}],
|
|
490
|
+
children: "Current Subscription"
|
|
491
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
492
|
+
style: [styles.currentSubscriptionCard, {
|
|
493
|
+
backgroundColor: secondaryBackgroundColor,
|
|
494
|
+
borderColor
|
|
495
|
+
}],
|
|
496
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
497
|
+
style: styles.subscriptionHeader,
|
|
498
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
499
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
500
|
+
style: [styles.planName, {
|
|
501
|
+
color: textColor
|
|
502
|
+
}],
|
|
503
|
+
children: currentPlan.name
|
|
504
|
+
}), /*#__PURE__*/_jsxs(Text, {
|
|
505
|
+
style: [styles.planPrice, {
|
|
506
|
+
color: primaryColor
|
|
507
|
+
}],
|
|
508
|
+
children: ["$", currentPlan.price, "/month"]
|
|
509
|
+
})]
|
|
510
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
511
|
+
style: [styles.statusBadge, {
|
|
512
|
+
backgroundColor: statusColor
|
|
513
|
+
}],
|
|
514
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
515
|
+
style: styles.statusText,
|
|
516
|
+
children: subscription.status.toUpperCase()
|
|
517
|
+
})
|
|
518
|
+
})]
|
|
519
|
+
}), /*#__PURE__*/_jsxs(Text, {
|
|
520
|
+
style: [styles.subscriptionDetail, {
|
|
521
|
+
color: isDarkTheme ? '#BBBBBB' : '#666666'
|
|
522
|
+
}],
|
|
523
|
+
children: ["Renews on ", new Date(subscription.currentPeriodEnd).toLocaleDateString()]
|
|
524
|
+
}), subscription.cancelAtPeriodEnd && /*#__PURE__*/_jsxs(View, {
|
|
525
|
+
style: styles.cancelNotice,
|
|
526
|
+
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
527
|
+
name: "warning",
|
|
528
|
+
size: 16,
|
|
529
|
+
color: warningColor
|
|
530
|
+
}), /*#__PURE__*/_jsxs(Text, {
|
|
531
|
+
style: [styles.cancelText, {
|
|
532
|
+
color: warningColor
|
|
533
|
+
}],
|
|
534
|
+
children: ["Subscription will cancel on ", new Date(subscription.currentPeriodEnd).toLocaleDateString()]
|
|
535
|
+
})]
|
|
536
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
537
|
+
style: styles.subscriptionActions,
|
|
538
|
+
children: [subscription.cancelAtPeriodEnd ? /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
539
|
+
style: [styles.actionButton, {
|
|
540
|
+
backgroundColor: successColor
|
|
541
|
+
}],
|
|
542
|
+
onPress: handleReactivateSubscription,
|
|
543
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
544
|
+
style: styles.actionButtonText,
|
|
545
|
+
children: "Reactivate"
|
|
546
|
+
})
|
|
547
|
+
}) : /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
548
|
+
style: [styles.actionButton, {
|
|
549
|
+
backgroundColor: dangerColor
|
|
550
|
+
}],
|
|
551
|
+
onPress: handleCancelSubscription,
|
|
552
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
553
|
+
style: styles.actionButtonText,
|
|
554
|
+
children: "Cancel Subscription"
|
|
555
|
+
})
|
|
556
|
+
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
557
|
+
style: [styles.actionButton, styles.secondaryButton, {
|
|
558
|
+
borderColor
|
|
559
|
+
}],
|
|
560
|
+
onPress: () => navigate && navigate('BillingManagement'),
|
|
561
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
562
|
+
style: [styles.actionButtonText, {
|
|
563
|
+
color: textColor
|
|
564
|
+
}],
|
|
565
|
+
children: "Manage Billing"
|
|
566
|
+
})
|
|
567
|
+
})]
|
|
568
|
+
})]
|
|
569
|
+
})]
|
|
570
|
+
});
|
|
571
|
+
};
|
|
572
|
+
const renderBillingToggle = () => /*#__PURE__*/_jsxs(View, {
|
|
573
|
+
style: styles.section,
|
|
574
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
575
|
+
style: styles.billingToggle,
|
|
576
|
+
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
577
|
+
style: [styles.billingOption, billingInterval === 'month' && {
|
|
578
|
+
backgroundColor: primaryColor
|
|
579
|
+
}],
|
|
580
|
+
onPress: () => setBillingInterval('month'),
|
|
581
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
582
|
+
style: [styles.billingOptionText, {
|
|
583
|
+
color: billingInterval === 'month' ? '#FFFFFF' : textColor
|
|
584
|
+
}],
|
|
585
|
+
children: "Monthly"
|
|
586
|
+
})
|
|
587
|
+
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
588
|
+
style: [styles.billingOption, billingInterval === 'year' && {
|
|
589
|
+
backgroundColor: primaryColor
|
|
590
|
+
}],
|
|
591
|
+
onPress: () => setBillingInterval('year'),
|
|
592
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
593
|
+
style: [styles.billingOptionText, {
|
|
594
|
+
color: billingInterval === 'year' ? '#FFFFFF' : textColor
|
|
595
|
+
}],
|
|
596
|
+
children: "Yearly"
|
|
597
|
+
})
|
|
598
|
+
})]
|
|
599
|
+
}), billingInterval === 'year' && /*#__PURE__*/_jsx(Text, {
|
|
600
|
+
style: [styles.savingsText, {
|
|
601
|
+
color: successColor
|
|
602
|
+
}],
|
|
603
|
+
children: "\uD83D\uDCB0 Save 20% with yearly billing"
|
|
604
|
+
})]
|
|
605
|
+
});
|
|
606
|
+
const renderPlanCard = plan => {
|
|
607
|
+
const pricing = formatPrice(plan.price, plan.currency, plan.interval);
|
|
608
|
+
const isSelected = selectedPlan === plan.id;
|
|
609
|
+
const isCurrentPlan = subscription?.planId === plan.id;
|
|
610
|
+
const isAppSpecific = plan.appScope === 'specific' && plan.applicableApps.length === 1;
|
|
611
|
+
const isAvailableForCurrentApp = plan.applicableApps.includes(currentAppPackage);
|
|
612
|
+
const getAppScopeText = () => {
|
|
613
|
+
if (plan.appScope === 'ecosystem') {
|
|
614
|
+
return 'Works across all Oxy apps';
|
|
615
|
+
} else if (isAppSpecific) {
|
|
616
|
+
const appName = plan.applicableApps[0];
|
|
617
|
+
return `Exclusive to ${appName} app`;
|
|
618
|
+
} else {
|
|
619
|
+
return `Available in: ${plan.applicableApps.join(', ')}`;
|
|
620
|
+
}
|
|
621
|
+
};
|
|
622
|
+
const getAvailabilityStatus = () => {
|
|
623
|
+
if (isAppSpecific && !isAvailableForCurrentApp) {
|
|
624
|
+
const requiredApp = plan.applicableApps[0];
|
|
625
|
+
return {
|
|
626
|
+
available: false,
|
|
627
|
+
reason: `Only available in ${requiredApp} app`
|
|
628
|
+
};
|
|
629
|
+
}
|
|
630
|
+
return {
|
|
631
|
+
available: true,
|
|
632
|
+
reason: null
|
|
633
|
+
};
|
|
634
|
+
};
|
|
635
|
+
const availability = getAvailabilityStatus();
|
|
636
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
637
|
+
style: [styles.planCard, {
|
|
638
|
+
backgroundColor: secondaryBackgroundColor,
|
|
639
|
+
borderColor
|
|
640
|
+
}, isSelected && {
|
|
641
|
+
borderColor: primaryColor,
|
|
642
|
+
borderWidth: 2
|
|
643
|
+
}, plan.isPopular && styles.popularPlan, !availability.available && {
|
|
644
|
+
opacity: 0.6
|
|
645
|
+
}],
|
|
646
|
+
children: [plan.isPopular && /*#__PURE__*/_jsx(View, {
|
|
647
|
+
style: [styles.popularBadge, {
|
|
648
|
+
backgroundColor: primaryColor
|
|
649
|
+
}],
|
|
650
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
651
|
+
style: styles.popularText,
|
|
652
|
+
children: "MOST POPULAR"
|
|
653
|
+
})
|
|
654
|
+
}), isAppSpecific && /*#__PURE__*/_jsx(View, {
|
|
655
|
+
style: [styles.appSpecificBadge, {
|
|
656
|
+
backgroundColor: isAvailableForCurrentApp ? successColor : warningColor
|
|
657
|
+
}],
|
|
658
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
659
|
+
style: styles.appSpecificText,
|
|
660
|
+
children: isAvailableForCurrentApp ? 'App Exclusive' : 'Not Available'
|
|
661
|
+
})
|
|
662
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
663
|
+
style: styles.planHeader,
|
|
664
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
665
|
+
style: [styles.planName, {
|
|
666
|
+
color: textColor
|
|
667
|
+
}],
|
|
668
|
+
children: plan.name
|
|
669
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
670
|
+
style: [styles.planDescription, {
|
|
671
|
+
color: isDarkTheme ? '#BBBBBB' : '#666666'
|
|
672
|
+
}],
|
|
673
|
+
children: plan.description
|
|
674
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
675
|
+
style: [styles.planAppScope, {
|
|
676
|
+
color: isDarkTheme ? '#888888' : '#999999'
|
|
677
|
+
}],
|
|
678
|
+
children: getAppScopeText()
|
|
679
|
+
}), !availability.available && /*#__PURE__*/_jsx(Text, {
|
|
680
|
+
style: [styles.planRestrictionText, {
|
|
681
|
+
color: dangerColor
|
|
682
|
+
}],
|
|
683
|
+
children: availability.reason
|
|
684
|
+
})]
|
|
685
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
686
|
+
style: styles.planPricing,
|
|
687
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
688
|
+
style: [styles.planPrice, {
|
|
689
|
+
color: textColor
|
|
690
|
+
}],
|
|
691
|
+
children: pricing.formatted
|
|
692
|
+
}), /*#__PURE__*/_jsxs(Text, {
|
|
693
|
+
style: [styles.planInterval, {
|
|
694
|
+
color: isDarkTheme ? '#BBBBBB' : '#666666'
|
|
695
|
+
}],
|
|
696
|
+
children: ["per ", pricing.interval]
|
|
697
|
+
})]
|
|
698
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
699
|
+
style: styles.planFeatures,
|
|
700
|
+
children: plan.features.map((feature, index) => /*#__PURE__*/_jsxs(View, {
|
|
701
|
+
style: styles.featureItem,
|
|
702
|
+
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
703
|
+
name: "checkmark",
|
|
704
|
+
size: 16,
|
|
705
|
+
color: successColor
|
|
706
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
707
|
+
style: [styles.featureText, {
|
|
708
|
+
color: textColor
|
|
709
|
+
}],
|
|
710
|
+
children: feature
|
|
711
|
+
})]
|
|
712
|
+
}, index))
|
|
713
|
+
}), isCurrentPlan ? /*#__PURE__*/_jsx(View, {
|
|
714
|
+
style: [styles.currentPlanButton, {
|
|
715
|
+
backgroundColor: successColor
|
|
716
|
+
}],
|
|
717
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
718
|
+
style: styles.currentPlanText,
|
|
719
|
+
children: "Current Plan"
|
|
720
|
+
})
|
|
721
|
+
}) : !availability.available ? /*#__PURE__*/_jsx(View, {
|
|
722
|
+
style: [styles.unavailablePlanButton, {
|
|
723
|
+
backgroundColor: isDarkTheme ? '#444444' : '#E0E0E0'
|
|
724
|
+
}],
|
|
725
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
726
|
+
style: [styles.unavailablePlanText, {
|
|
727
|
+
color: isDarkTheme ? '#888888' : '#999999'
|
|
728
|
+
}],
|
|
729
|
+
children: "Not Available in Current App"
|
|
730
|
+
})
|
|
731
|
+
}) : /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
732
|
+
style: [styles.selectPlanButton, {
|
|
733
|
+
backgroundColor: plan.isPopular ? primaryColor : borderColor
|
|
734
|
+
}],
|
|
735
|
+
onPress: () => handleSubscribe(plan.id),
|
|
736
|
+
disabled: processingPayment,
|
|
737
|
+
children: processingPayment ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
738
|
+
color: "#FFFFFF",
|
|
739
|
+
size: "small"
|
|
740
|
+
}) : /*#__PURE__*/_jsxs(Text, {
|
|
741
|
+
style: [styles.selectPlanText, {
|
|
742
|
+
color: plan.isPopular ? '#FFFFFF' : textColor
|
|
743
|
+
}],
|
|
744
|
+
children: ["Subscribe to ", plan.name]
|
|
745
|
+
})
|
|
746
|
+
})]
|
|
747
|
+
}, plan.id);
|
|
748
|
+
};
|
|
749
|
+
const renderTabNavigation = () => /*#__PURE__*/_jsx(View, {
|
|
750
|
+
style: styles.section,
|
|
751
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
752
|
+
style: [styles.tabContainer, {
|
|
753
|
+
borderBottomColor: borderColor
|
|
754
|
+
}],
|
|
755
|
+
children: [/*#__PURE__*/_jsx(TouchableOpacity, {
|
|
756
|
+
style: [styles.tab, activeTab === 'plans' && {
|
|
757
|
+
borderBottomColor: primaryColor,
|
|
758
|
+
borderBottomWidth: 2
|
|
759
|
+
}],
|
|
760
|
+
onPress: () => setActiveTab('plans'),
|
|
761
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
762
|
+
style: [styles.tabText, {
|
|
763
|
+
color: activeTab === 'plans' ? primaryColor : textColor
|
|
764
|
+
}],
|
|
765
|
+
children: "Full Plans"
|
|
766
|
+
})
|
|
767
|
+
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
768
|
+
style: [styles.tab, activeTab === 'features' && {
|
|
769
|
+
borderBottomColor: primaryColor,
|
|
770
|
+
borderBottomWidth: 2
|
|
771
|
+
}],
|
|
772
|
+
onPress: () => setActiveTab('features'),
|
|
773
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
774
|
+
style: [styles.tabText, {
|
|
775
|
+
color: activeTab === 'features' ? primaryColor : textColor
|
|
776
|
+
}],
|
|
777
|
+
children: "Individual Features"
|
|
778
|
+
})
|
|
779
|
+
})]
|
|
780
|
+
})
|
|
781
|
+
});
|
|
782
|
+
const renderFeatureCard = feature => {
|
|
783
|
+
const pricing = formatPrice(feature.price, feature.currency, feature.interval);
|
|
784
|
+
const isSubscribed = feature.isSubscribed;
|
|
785
|
+
const isIncludedInCurrentPlan = feature.isIncludedInCurrentPlan;
|
|
786
|
+
const canPurchase = feature.canBePurchasedSeparately && !isIncludedInCurrentPlan;
|
|
787
|
+
const getCategoryColor = category => {
|
|
788
|
+
switch (category) {
|
|
789
|
+
case 'analytics':
|
|
790
|
+
return '#FF9500';
|
|
791
|
+
case 'customization':
|
|
792
|
+
return '#5856D6';
|
|
793
|
+
case 'content':
|
|
794
|
+
return '#30D158';
|
|
795
|
+
case 'networking':
|
|
796
|
+
return '#007AFF';
|
|
797
|
+
case 'productivity':
|
|
798
|
+
return '#FF3B30';
|
|
799
|
+
default:
|
|
800
|
+
return primaryColor;
|
|
801
|
+
}
|
|
802
|
+
};
|
|
803
|
+
const getCategoryIcon = category => {
|
|
804
|
+
switch (category) {
|
|
805
|
+
case 'analytics':
|
|
806
|
+
return 'analytics';
|
|
807
|
+
case 'customization':
|
|
808
|
+
return 'color-palette';
|
|
809
|
+
case 'content':
|
|
810
|
+
return 'document-text';
|
|
811
|
+
case 'networking':
|
|
812
|
+
return 'people';
|
|
813
|
+
case 'productivity':
|
|
814
|
+
return 'briefcase';
|
|
815
|
+
default:
|
|
816
|
+
return 'star';
|
|
817
|
+
}
|
|
818
|
+
};
|
|
819
|
+
const getAppScopeText = () => {
|
|
820
|
+
if (feature.appScope === 'ecosystem') {
|
|
821
|
+
return 'Available across all Oxy apps';
|
|
822
|
+
} else {
|
|
823
|
+
return `Available in: ${feature.applicableApps.join(', ')}`;
|
|
824
|
+
}
|
|
825
|
+
};
|
|
826
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
827
|
+
style: [styles.featureCard, {
|
|
828
|
+
backgroundColor: secondaryBackgroundColor,
|
|
829
|
+
borderColor
|
|
830
|
+
}, isSubscribed && {
|
|
831
|
+
borderColor: successColor,
|
|
832
|
+
borderWidth: 2
|
|
833
|
+
}, isIncludedInCurrentPlan && {
|
|
834
|
+
borderColor: primaryColor,
|
|
835
|
+
borderWidth: 2
|
|
836
|
+
}],
|
|
837
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
838
|
+
style: styles.featureHeader,
|
|
839
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
840
|
+
style: styles.featureIconContainer,
|
|
841
|
+
children: /*#__PURE__*/_jsx(Ionicons, {
|
|
842
|
+
name: getCategoryIcon(feature.category),
|
|
843
|
+
size: 24,
|
|
844
|
+
color: getCategoryColor(feature.category)
|
|
845
|
+
})
|
|
846
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
847
|
+
style: styles.featureInfo,
|
|
848
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
849
|
+
style: styles.featureNameRow,
|
|
850
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
851
|
+
style: [styles.featureName, {
|
|
852
|
+
color: textColor
|
|
853
|
+
}],
|
|
854
|
+
children: feature.name
|
|
855
|
+
}), isIncludedInCurrentPlan && /*#__PURE__*/_jsx(View, {
|
|
856
|
+
style: [styles.includedBadge, {
|
|
857
|
+
backgroundColor: primaryColor
|
|
858
|
+
}],
|
|
859
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
860
|
+
style: styles.includedBadgeText,
|
|
861
|
+
children: "Included"
|
|
862
|
+
})
|
|
863
|
+
})]
|
|
864
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
865
|
+
style: [styles.featureDescription, {
|
|
866
|
+
color: isDarkTheme ? '#BBBBBB' : '#666666'
|
|
867
|
+
}],
|
|
868
|
+
children: feature.description
|
|
869
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
870
|
+
style: [styles.appScopeText, {
|
|
871
|
+
color: isDarkTheme ? '#888888' : '#999999'
|
|
872
|
+
}],
|
|
873
|
+
children: getAppScopeText()
|
|
874
|
+
})]
|
|
875
|
+
})]
|
|
876
|
+
}), !isIncludedInCurrentPlan && /*#__PURE__*/_jsxs(View, {
|
|
877
|
+
style: styles.featurePricing,
|
|
878
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
879
|
+
style: [styles.featurePrice, {
|
|
880
|
+
color: textColor
|
|
881
|
+
}],
|
|
882
|
+
children: pricing.formatted
|
|
883
|
+
}), /*#__PURE__*/_jsxs(Text, {
|
|
884
|
+
style: [styles.featureInterval, {
|
|
885
|
+
color: isDarkTheme ? '#BBBBBB' : '#666666'
|
|
886
|
+
}],
|
|
887
|
+
children: ["per ", pricing.interval]
|
|
888
|
+
})]
|
|
889
|
+
}), isIncludedInCurrentPlan ? /*#__PURE__*/_jsxs(View, {
|
|
890
|
+
style: [styles.includedInPlanButton, {
|
|
891
|
+
backgroundColor: primaryColor
|
|
892
|
+
}],
|
|
893
|
+
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
894
|
+
name: "checkmark-circle",
|
|
895
|
+
size: 16,
|
|
896
|
+
color: "#FFFFFF"
|
|
897
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
898
|
+
style: styles.includedInPlanText,
|
|
899
|
+
children: "Included in your plan"
|
|
900
|
+
})]
|
|
901
|
+
}) : isSubscribed ? /*#__PURE__*/_jsxs(View, {
|
|
902
|
+
style: styles.featureActions,
|
|
903
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
904
|
+
style: [styles.subscribedButton, {
|
|
905
|
+
backgroundColor: successColor
|
|
906
|
+
}],
|
|
907
|
+
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
908
|
+
name: "checkmark",
|
|
909
|
+
size: 16,
|
|
910
|
+
color: "#FFFFFF"
|
|
911
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
912
|
+
style: styles.subscribedText,
|
|
913
|
+
children: "Subscribed"
|
|
914
|
+
})]
|
|
915
|
+
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
916
|
+
style: [styles.unsubscribeButton, {
|
|
917
|
+
borderColor: dangerColor
|
|
918
|
+
}],
|
|
919
|
+
onPress: () => handleFeatureUnsubscribe(feature.id),
|
|
920
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
921
|
+
style: [styles.unsubscribeText, {
|
|
922
|
+
color: dangerColor
|
|
923
|
+
}],
|
|
924
|
+
children: "Unsubscribe"
|
|
925
|
+
})
|
|
926
|
+
})]
|
|
927
|
+
}) : canPurchase ? /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
928
|
+
style: [styles.subscribeFeatureButton, {
|
|
929
|
+
backgroundColor: primaryColor
|
|
930
|
+
}],
|
|
931
|
+
onPress: () => handleFeatureSubscribe(feature.id),
|
|
932
|
+
disabled: processingPayment,
|
|
933
|
+
children: processingPayment ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
934
|
+
color: "#FFFFFF",
|
|
935
|
+
size: "small"
|
|
936
|
+
}) : /*#__PURE__*/_jsx(Text, {
|
|
937
|
+
style: styles.subscribeFeatureText,
|
|
938
|
+
children: "Subscribe"
|
|
939
|
+
})
|
|
940
|
+
}) : /*#__PURE__*/_jsx(View, {
|
|
941
|
+
style: [styles.unavailableButton, {
|
|
942
|
+
backgroundColor: isDarkTheme ? '#444444' : '#E0E0E0'
|
|
943
|
+
}],
|
|
944
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
945
|
+
style: [styles.unavailableText, {
|
|
946
|
+
color: isDarkTheme ? '#888888' : '#999999'
|
|
947
|
+
}],
|
|
948
|
+
children: "Only available in subscription plans"
|
|
949
|
+
})
|
|
950
|
+
})]
|
|
951
|
+
}, feature.id);
|
|
952
|
+
};
|
|
953
|
+
const renderIndividualFeatures = () => {
|
|
954
|
+
const categories = ['analytics', 'customization', 'content', 'networking', 'productivity'];
|
|
955
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
956
|
+
style: styles.section,
|
|
957
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
958
|
+
style: [styles.sectionTitle, {
|
|
959
|
+
color: textColor
|
|
960
|
+
}],
|
|
961
|
+
children: "Individual Features"
|
|
962
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
963
|
+
style: [styles.sectionSubtitle, {
|
|
964
|
+
color: isDarkTheme ? '#BBBBBB' : '#666666'
|
|
965
|
+
}],
|
|
966
|
+
children: "Subscribe to specific features you need. Some features are included in subscription plans."
|
|
967
|
+
}), categories.map(category => {
|
|
968
|
+
const categoryFeatures = individualFeatures.filter(f => f.category === category);
|
|
969
|
+
if (categoryFeatures.length === 0) return null;
|
|
970
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
971
|
+
style: styles.categorySection,
|
|
972
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
973
|
+
style: [styles.categoryTitle, {
|
|
974
|
+
color: textColor
|
|
975
|
+
}],
|
|
976
|
+
children: category.charAt(0).toUpperCase() + category.slice(1)
|
|
977
|
+
}), categoryFeatures.map(renderFeatureCard)]
|
|
978
|
+
}, category);
|
|
979
|
+
})]
|
|
980
|
+
});
|
|
981
|
+
};
|
|
982
|
+
|
|
983
|
+
// Add this for testing different app contexts (remove in production)
|
|
984
|
+
const [showAppSwitcher, setShowAppSwitcher] = useState(__DEV__); // Only show in development
|
|
985
|
+
|
|
986
|
+
const renderAppSwitcher = () => {
|
|
987
|
+
if (!showAppSwitcher) return null;
|
|
988
|
+
const testApps = ['mention', 'oxy-social', 'oxy-workspace', 'oxy-creator'];
|
|
989
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
990
|
+
style: [styles.appSwitcher, {
|
|
991
|
+
backgroundColor: isDarkTheme ? '#333333' : '#F0F0F0',
|
|
992
|
+
borderColor
|
|
993
|
+
}],
|
|
994
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
995
|
+
style: [styles.appSwitcherTitle, {
|
|
996
|
+
color: textColor
|
|
997
|
+
}],
|
|
998
|
+
children: "\uD83E\uDDEA Test App Context (Dev Only)"
|
|
999
|
+
}), /*#__PURE__*/_jsx(ScrollView, {
|
|
1000
|
+
horizontal: true,
|
|
1001
|
+
showsHorizontalScrollIndicator: false,
|
|
1002
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
1003
|
+
style: styles.appSwitcherButtons,
|
|
1004
|
+
children: testApps.map(app => /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
1005
|
+
style: [styles.appSwitcherButton, {
|
|
1006
|
+
backgroundColor: currentAppPackage === app ? primaryColor : 'transparent',
|
|
1007
|
+
borderColor: primaryColor
|
|
1008
|
+
}],
|
|
1009
|
+
onPress: () => {
|
|
1010
|
+
setCurrentAppPackage(app);
|
|
1011
|
+
console.log('Switched to app context:', app);
|
|
1012
|
+
},
|
|
1013
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
1014
|
+
style: [styles.appSwitcherButtonText, {
|
|
1015
|
+
color: currentAppPackage === app ? '#FFFFFF' : textColor
|
|
1016
|
+
}],
|
|
1017
|
+
children: app
|
|
1018
|
+
})
|
|
1019
|
+
}, app))
|
|
1020
|
+
})
|
|
1021
|
+
})]
|
|
1022
|
+
});
|
|
1023
|
+
};
|
|
1024
|
+
if (loading) {
|
|
1025
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
1026
|
+
style: [styles.container, {
|
|
1027
|
+
backgroundColor,
|
|
1028
|
+
justifyContent: 'center'
|
|
1029
|
+
}],
|
|
1030
|
+
children: [/*#__PURE__*/_jsx(ActivityIndicator, {
|
|
1031
|
+
size: "large",
|
|
1032
|
+
color: primaryColor
|
|
1033
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
1034
|
+
style: [styles.loadingText, {
|
|
1035
|
+
color: textColor
|
|
1036
|
+
}],
|
|
1037
|
+
children: "Loading subscription plans..."
|
|
1038
|
+
})]
|
|
1039
|
+
});
|
|
1040
|
+
}
|
|
1041
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
1042
|
+
style: [styles.container, {
|
|
1043
|
+
backgroundColor
|
|
1044
|
+
}],
|
|
1045
|
+
children: [renderHeader(), renderAppSwitcher(), /*#__PURE__*/_jsxs(ScrollView, {
|
|
1046
|
+
style: styles.content,
|
|
1047
|
+
showsVerticalScrollIndicator: false,
|
|
1048
|
+
children: [subscription && renderCurrentSubscription(), !subscription && /*#__PURE__*/_jsxs(View, {
|
|
1049
|
+
style: styles.section,
|
|
1050
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
1051
|
+
style: [styles.sectionTitle, {
|
|
1052
|
+
color: textColor
|
|
1053
|
+
}],
|
|
1054
|
+
children: "Choose Your Plan"
|
|
1055
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
1056
|
+
style: [styles.sectionSubtitle, {
|
|
1057
|
+
color: isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1058
|
+
}],
|
|
1059
|
+
children: "Unlock premium features and take your experience to the next level"
|
|
1060
|
+
})]
|
|
1061
|
+
}), !subscription && renderTabNavigation(), !subscription && activeTab === 'plans' && renderBillingToggle(), activeTab === 'plans' ? /*#__PURE__*/_jsxs(View, {
|
|
1062
|
+
style: styles.section,
|
|
1063
|
+
children: [!subscription && /*#__PURE__*/_jsx(Text, {
|
|
1064
|
+
style: [styles.sectionTitle, {
|
|
1065
|
+
color: textColor
|
|
1066
|
+
}],
|
|
1067
|
+
children: "Available Plans"
|
|
1068
|
+
}), plans.map(renderPlanCard)]
|
|
1069
|
+
}) : renderIndividualFeatures(), /*#__PURE__*/_jsxs(View, {
|
|
1070
|
+
style: styles.section,
|
|
1071
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
1072
|
+
style: [styles.sectionTitle, {
|
|
1073
|
+
color: textColor
|
|
1074
|
+
}],
|
|
1075
|
+
children: "Why Go Premium?"
|
|
1076
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
1077
|
+
style: [styles.benefitsCard, {
|
|
1078
|
+
backgroundColor: secondaryBackgroundColor,
|
|
1079
|
+
borderColor
|
|
1080
|
+
}],
|
|
1081
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
1082
|
+
style: styles.benefitItem,
|
|
1083
|
+
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
1084
|
+
name: "flash",
|
|
1085
|
+
size: 24,
|
|
1086
|
+
color: primaryColor
|
|
1087
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
1088
|
+
style: styles.benefitContent,
|
|
1089
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
1090
|
+
style: [styles.benefitTitle, {
|
|
1091
|
+
color: textColor
|
|
1092
|
+
}],
|
|
1093
|
+
children: "Enhanced Performance"
|
|
1094
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
1095
|
+
style: [styles.benefitDescription, {
|
|
1096
|
+
color: isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1097
|
+
}],
|
|
1098
|
+
children: "Faster processing and priority access to our servers"
|
|
1099
|
+
})]
|
|
1100
|
+
})]
|
|
1101
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
1102
|
+
style: styles.benefitItem,
|
|
1103
|
+
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
1104
|
+
name: "shield-checkmark",
|
|
1105
|
+
size: 24,
|
|
1106
|
+
color: successColor
|
|
1107
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
1108
|
+
style: styles.benefitContent,
|
|
1109
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
1110
|
+
style: [styles.benefitTitle, {
|
|
1111
|
+
color: textColor
|
|
1112
|
+
}],
|
|
1113
|
+
children: "Advanced Security"
|
|
1114
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
1115
|
+
style: [styles.benefitDescription, {
|
|
1116
|
+
color: isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1117
|
+
}],
|
|
1118
|
+
children: "Enhanced encryption and security features"
|
|
1119
|
+
})]
|
|
1120
|
+
})]
|
|
1121
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
1122
|
+
style: styles.benefitItem,
|
|
1123
|
+
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
1124
|
+
name: "headset",
|
|
1125
|
+
size: 24,
|
|
1126
|
+
color: warningColor
|
|
1127
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
1128
|
+
style: styles.benefitContent,
|
|
1129
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
1130
|
+
style: [styles.benefitTitle, {
|
|
1131
|
+
color: textColor
|
|
1132
|
+
}],
|
|
1133
|
+
children: "Priority Support"
|
|
1134
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
1135
|
+
style: [styles.benefitDescription, {
|
|
1136
|
+
color: isDarkTheme ? '#BBBBBB' : '#666666'
|
|
1137
|
+
}],
|
|
1138
|
+
children: "Get help faster with our premium support team"
|
|
1139
|
+
})]
|
|
1140
|
+
})]
|
|
1141
|
+
})]
|
|
1142
|
+
})]
|
|
1143
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
1144
|
+
style: styles.bottomSpacing
|
|
1145
|
+
})]
|
|
1146
|
+
})]
|
|
1147
|
+
});
|
|
1148
|
+
};
|
|
1149
|
+
const styles = StyleSheet.create({
|
|
1150
|
+
container: {
|
|
1151
|
+
flex: 1
|
|
1152
|
+
},
|
|
1153
|
+
header: {
|
|
1154
|
+
flexDirection: 'row',
|
|
1155
|
+
alignItems: 'center',
|
|
1156
|
+
justifyContent: 'space-between',
|
|
1157
|
+
paddingHorizontal: 20,
|
|
1158
|
+
paddingTop: 20,
|
|
1159
|
+
paddingBottom: 16,
|
|
1160
|
+
borderBottomWidth: 1
|
|
1161
|
+
},
|
|
1162
|
+
backButton: {
|
|
1163
|
+
padding: 8
|
|
1164
|
+
},
|
|
1165
|
+
headerTitle: {
|
|
1166
|
+
fontSize: 20,
|
|
1167
|
+
fontWeight: '600',
|
|
1168
|
+
fontFamily: fontFamilies.phuduSemiBold
|
|
1169
|
+
},
|
|
1170
|
+
headerTitleContainer: {
|
|
1171
|
+
flex: 1,
|
|
1172
|
+
alignItems: 'center'
|
|
1173
|
+
},
|
|
1174
|
+
currentAppText: {
|
|
1175
|
+
fontSize: 14,
|
|
1176
|
+
marginTop: 2,
|
|
1177
|
+
fontStyle: 'italic'
|
|
1178
|
+
},
|
|
1179
|
+
closeButton: {
|
|
1180
|
+
padding: 8
|
|
1181
|
+
},
|
|
1182
|
+
content: {
|
|
1183
|
+
flex: 1
|
|
1184
|
+
},
|
|
1185
|
+
section: {
|
|
1186
|
+
padding: 20
|
|
1187
|
+
},
|
|
1188
|
+
sectionTitle: {
|
|
1189
|
+
fontSize: 24,
|
|
1190
|
+
fontWeight: 'bold',
|
|
1191
|
+
fontFamily: fontFamilies.phuduBold,
|
|
1192
|
+
marginBottom: 8
|
|
1193
|
+
},
|
|
1194
|
+
sectionSubtitle: {
|
|
1195
|
+
fontSize: 16,
|
|
1196
|
+
lineHeight: 22,
|
|
1197
|
+
marginBottom: 20
|
|
1198
|
+
},
|
|
1199
|
+
loadingText: {
|
|
1200
|
+
fontSize: 16,
|
|
1201
|
+
textAlign: 'center',
|
|
1202
|
+
marginTop: 16
|
|
1203
|
+
},
|
|
1204
|
+
currentSubscriptionCard: {
|
|
1205
|
+
borderRadius: 16,
|
|
1206
|
+
padding: 20,
|
|
1207
|
+
borderWidth: 1
|
|
1208
|
+
},
|
|
1209
|
+
subscriptionHeader: {
|
|
1210
|
+
flexDirection: 'row',
|
|
1211
|
+
justifyContent: 'space-between',
|
|
1212
|
+
alignItems: 'flex-start',
|
|
1213
|
+
marginBottom: 12
|
|
1214
|
+
},
|
|
1215
|
+
planName: {
|
|
1216
|
+
fontSize: 20,
|
|
1217
|
+
fontWeight: 'bold',
|
|
1218
|
+
marginBottom: 4
|
|
1219
|
+
},
|
|
1220
|
+
planPrice: {
|
|
1221
|
+
fontSize: 16,
|
|
1222
|
+
fontWeight: '600'
|
|
1223
|
+
},
|
|
1224
|
+
statusBadge: {
|
|
1225
|
+
paddingHorizontal: 12,
|
|
1226
|
+
paddingVertical: 4,
|
|
1227
|
+
borderRadius: 12
|
|
1228
|
+
},
|
|
1229
|
+
statusText: {
|
|
1230
|
+
color: '#FFFFFF',
|
|
1231
|
+
fontSize: 12,
|
|
1232
|
+
fontWeight: '600'
|
|
1233
|
+
},
|
|
1234
|
+
subscriptionDetail: {
|
|
1235
|
+
fontSize: 14,
|
|
1236
|
+
marginBottom: 16
|
|
1237
|
+
},
|
|
1238
|
+
cancelNotice: {
|
|
1239
|
+
flexDirection: 'row',
|
|
1240
|
+
alignItems: 'center',
|
|
1241
|
+
padding: 12,
|
|
1242
|
+
backgroundColor: 'rgba(255, 149, 0, 0.1)',
|
|
1243
|
+
borderRadius: 8,
|
|
1244
|
+
marginBottom: 16
|
|
1245
|
+
},
|
|
1246
|
+
cancelText: {
|
|
1247
|
+
fontSize: 14,
|
|
1248
|
+
marginLeft: 8,
|
|
1249
|
+
flex: 1
|
|
1250
|
+
},
|
|
1251
|
+
subscriptionActions: {
|
|
1252
|
+
flexDirection: 'row',
|
|
1253
|
+
gap: 12
|
|
1254
|
+
},
|
|
1255
|
+
actionButton: {
|
|
1256
|
+
flex: 1,
|
|
1257
|
+
paddingVertical: 12,
|
|
1258
|
+
paddingHorizontal: 16,
|
|
1259
|
+
borderRadius: 8,
|
|
1260
|
+
alignItems: 'center'
|
|
1261
|
+
},
|
|
1262
|
+
secondaryButton: {
|
|
1263
|
+
backgroundColor: 'transparent',
|
|
1264
|
+
borderWidth: 1
|
|
1265
|
+
},
|
|
1266
|
+
actionButtonText: {
|
|
1267
|
+
color: '#FFFFFF',
|
|
1268
|
+
fontSize: 14,
|
|
1269
|
+
fontWeight: '600'
|
|
1270
|
+
},
|
|
1271
|
+
billingToggle: {
|
|
1272
|
+
flexDirection: 'row',
|
|
1273
|
+
backgroundColor: 'rgba(0, 0, 0, 0.05)',
|
|
1274
|
+
borderRadius: 8,
|
|
1275
|
+
padding: 4,
|
|
1276
|
+
marginBottom: 12
|
|
1277
|
+
},
|
|
1278
|
+
billingOption: {
|
|
1279
|
+
flex: 1,
|
|
1280
|
+
paddingVertical: 12,
|
|
1281
|
+
borderRadius: 6,
|
|
1282
|
+
alignItems: 'center'
|
|
1283
|
+
},
|
|
1284
|
+
billingOptionText: {
|
|
1285
|
+
fontSize: 16,
|
|
1286
|
+
fontWeight: '600'
|
|
1287
|
+
},
|
|
1288
|
+
savingsText: {
|
|
1289
|
+
fontSize: 14,
|
|
1290
|
+
textAlign: 'center',
|
|
1291
|
+
fontWeight: '600'
|
|
1292
|
+
},
|
|
1293
|
+
planCard: {
|
|
1294
|
+
borderRadius: 16,
|
|
1295
|
+
padding: 20,
|
|
1296
|
+
marginBottom: 16,
|
|
1297
|
+
borderWidth: 1,
|
|
1298
|
+
position: 'relative'
|
|
1299
|
+
},
|
|
1300
|
+
popularPlan: {
|
|
1301
|
+
borderWidth: 2
|
|
1302
|
+
},
|
|
1303
|
+
popularBadge: {
|
|
1304
|
+
position: 'absolute',
|
|
1305
|
+
top: -1,
|
|
1306
|
+
left: 20,
|
|
1307
|
+
right: 20,
|
|
1308
|
+
paddingVertical: 8,
|
|
1309
|
+
borderTopLeftRadius: 16,
|
|
1310
|
+
borderTopRightRadius: 16,
|
|
1311
|
+
alignItems: 'center'
|
|
1312
|
+
},
|
|
1313
|
+
popularText: {
|
|
1314
|
+
color: '#FFFFFF',
|
|
1315
|
+
fontSize: 12,
|
|
1316
|
+
fontWeight: 'bold'
|
|
1317
|
+
},
|
|
1318
|
+
planHeader: {
|
|
1319
|
+
marginBottom: 16,
|
|
1320
|
+
marginTop: 16
|
|
1321
|
+
},
|
|
1322
|
+
planDescription: {
|
|
1323
|
+
fontSize: 14,
|
|
1324
|
+
lineHeight: 20
|
|
1325
|
+
},
|
|
1326
|
+
planAppScope: {
|
|
1327
|
+
fontSize: 12,
|
|
1328
|
+
fontStyle: 'italic',
|
|
1329
|
+
marginTop: 4
|
|
1330
|
+
},
|
|
1331
|
+
planPricing: {
|
|
1332
|
+
flexDirection: 'row',
|
|
1333
|
+
alignItems: 'baseline',
|
|
1334
|
+
marginBottom: 20
|
|
1335
|
+
},
|
|
1336
|
+
planInterval: {
|
|
1337
|
+
fontSize: 14,
|
|
1338
|
+
marginLeft: 4
|
|
1339
|
+
},
|
|
1340
|
+
planFeatures: {
|
|
1341
|
+
marginBottom: 24
|
|
1342
|
+
},
|
|
1343
|
+
featureItem: {
|
|
1344
|
+
flexDirection: 'row',
|
|
1345
|
+
alignItems: 'center',
|
|
1346
|
+
marginBottom: 8
|
|
1347
|
+
},
|
|
1348
|
+
featureText: {
|
|
1349
|
+
fontSize: 14,
|
|
1350
|
+
marginLeft: 8,
|
|
1351
|
+
flex: 1
|
|
1352
|
+
},
|
|
1353
|
+
selectPlanButton: {
|
|
1354
|
+
paddingVertical: 16,
|
|
1355
|
+
borderRadius: 12,
|
|
1356
|
+
alignItems: 'center'
|
|
1357
|
+
},
|
|
1358
|
+
selectPlanText: {
|
|
1359
|
+
fontSize: 16,
|
|
1360
|
+
fontWeight: '600'
|
|
1361
|
+
},
|
|
1362
|
+
currentPlanButton: {
|
|
1363
|
+
paddingVertical: 16,
|
|
1364
|
+
borderRadius: 12,
|
|
1365
|
+
alignItems: 'center'
|
|
1366
|
+
},
|
|
1367
|
+
currentPlanText: {
|
|
1368
|
+
color: '#FFFFFF',
|
|
1369
|
+
fontSize: 16,
|
|
1370
|
+
fontWeight: '600'
|
|
1371
|
+
},
|
|
1372
|
+
benefitsCard: {
|
|
1373
|
+
borderRadius: 16,
|
|
1374
|
+
padding: 20,
|
|
1375
|
+
borderWidth: 1
|
|
1376
|
+
},
|
|
1377
|
+
benefitItem: {
|
|
1378
|
+
flexDirection: 'row',
|
|
1379
|
+
alignItems: 'flex-start',
|
|
1380
|
+
marginBottom: 20
|
|
1381
|
+
},
|
|
1382
|
+
benefitContent: {
|
|
1383
|
+
marginLeft: 16,
|
|
1384
|
+
flex: 1
|
|
1385
|
+
},
|
|
1386
|
+
benefitTitle: {
|
|
1387
|
+
fontSize: 16,
|
|
1388
|
+
fontWeight: '600',
|
|
1389
|
+
marginBottom: 4
|
|
1390
|
+
},
|
|
1391
|
+
benefitDescription: {
|
|
1392
|
+
fontSize: 14,
|
|
1393
|
+
lineHeight: 20
|
|
1394
|
+
},
|
|
1395
|
+
bottomSpacing: {
|
|
1396
|
+
height: 40
|
|
1397
|
+
},
|
|
1398
|
+
// Tab Navigation Styles
|
|
1399
|
+
tabContainer: {
|
|
1400
|
+
flexDirection: 'row',
|
|
1401
|
+
borderBottomWidth: 1,
|
|
1402
|
+
marginBottom: 20
|
|
1403
|
+
},
|
|
1404
|
+
tab: {
|
|
1405
|
+
flex: 1,
|
|
1406
|
+
paddingVertical: 12,
|
|
1407
|
+
paddingHorizontal: 16,
|
|
1408
|
+
alignItems: 'center'
|
|
1409
|
+
},
|
|
1410
|
+
tabText: {
|
|
1411
|
+
fontSize: 16,
|
|
1412
|
+
fontWeight: '600'
|
|
1413
|
+
},
|
|
1414
|
+
// Individual Feature Styles
|
|
1415
|
+
featureCard: {
|
|
1416
|
+
borderRadius: 12,
|
|
1417
|
+
borderWidth: 1,
|
|
1418
|
+
padding: 16,
|
|
1419
|
+
marginBottom: 12
|
|
1420
|
+
},
|
|
1421
|
+
featureHeader: {
|
|
1422
|
+
flexDirection: 'row',
|
|
1423
|
+
alignItems: 'flex-start',
|
|
1424
|
+
marginBottom: 12
|
|
1425
|
+
},
|
|
1426
|
+
featureIconContainer: {
|
|
1427
|
+
width: 40,
|
|
1428
|
+
height: 40,
|
|
1429
|
+
borderRadius: 20,
|
|
1430
|
+
backgroundColor: 'rgba(0, 122, 255, 0.1)',
|
|
1431
|
+
justifyContent: 'center',
|
|
1432
|
+
alignItems: 'center',
|
|
1433
|
+
marginRight: 12
|
|
1434
|
+
},
|
|
1435
|
+
featureInfo: {
|
|
1436
|
+
flex: 1
|
|
1437
|
+
},
|
|
1438
|
+
featureName: {
|
|
1439
|
+
fontSize: 16,
|
|
1440
|
+
fontWeight: '600',
|
|
1441
|
+
marginBottom: 4
|
|
1442
|
+
},
|
|
1443
|
+
featureDescription: {
|
|
1444
|
+
fontSize: 14,
|
|
1445
|
+
lineHeight: 20
|
|
1446
|
+
},
|
|
1447
|
+
featurePricing: {
|
|
1448
|
+
alignItems: 'center',
|
|
1449
|
+
marginBottom: 16
|
|
1450
|
+
},
|
|
1451
|
+
featurePrice: {
|
|
1452
|
+
fontSize: 20,
|
|
1453
|
+
fontWeight: 'bold'
|
|
1454
|
+
},
|
|
1455
|
+
featureInterval: {
|
|
1456
|
+
fontSize: 14,
|
|
1457
|
+
marginTop: 2
|
|
1458
|
+
},
|
|
1459
|
+
featureActions: {
|
|
1460
|
+
flexDirection: 'row',
|
|
1461
|
+
gap: 8
|
|
1462
|
+
},
|
|
1463
|
+
subscribedButton: {
|
|
1464
|
+
flex: 1,
|
|
1465
|
+
flexDirection: 'row',
|
|
1466
|
+
justifyContent: 'center',
|
|
1467
|
+
alignItems: 'center',
|
|
1468
|
+
paddingVertical: 12,
|
|
1469
|
+
borderRadius: 8,
|
|
1470
|
+
gap: 6
|
|
1471
|
+
},
|
|
1472
|
+
subscribedText: {
|
|
1473
|
+
color: '#FFFFFF',
|
|
1474
|
+
fontSize: 16,
|
|
1475
|
+
fontWeight: '600'
|
|
1476
|
+
},
|
|
1477
|
+
unsubscribeButton: {
|
|
1478
|
+
flex: 1,
|
|
1479
|
+
justifyContent: 'center',
|
|
1480
|
+
alignItems: 'center',
|
|
1481
|
+
paddingVertical: 12,
|
|
1482
|
+
borderRadius: 8,
|
|
1483
|
+
borderWidth: 1
|
|
1484
|
+
},
|
|
1485
|
+
unsubscribeText: {
|
|
1486
|
+
fontSize: 16,
|
|
1487
|
+
fontWeight: '600'
|
|
1488
|
+
},
|
|
1489
|
+
subscribeFeatureButton: {
|
|
1490
|
+
justifyContent: 'center',
|
|
1491
|
+
alignItems: 'center',
|
|
1492
|
+
paddingVertical: 12,
|
|
1493
|
+
borderRadius: 8
|
|
1494
|
+
},
|
|
1495
|
+
subscribeFeatureText: {
|
|
1496
|
+
color: '#FFFFFF',
|
|
1497
|
+
fontSize: 16,
|
|
1498
|
+
fontWeight: '600'
|
|
1499
|
+
},
|
|
1500
|
+
categorySection: {
|
|
1501
|
+
marginBottom: 24
|
|
1502
|
+
},
|
|
1503
|
+
categoryTitle: {
|
|
1504
|
+
fontSize: 18,
|
|
1505
|
+
fontWeight: '600',
|
|
1506
|
+
marginBottom: 12
|
|
1507
|
+
},
|
|
1508
|
+
// New styles for enhanced feature cards
|
|
1509
|
+
featureNameRow: {
|
|
1510
|
+
flexDirection: 'row',
|
|
1511
|
+
alignItems: 'center',
|
|
1512
|
+
justifyContent: 'space-between',
|
|
1513
|
+
marginBottom: 4
|
|
1514
|
+
},
|
|
1515
|
+
includedBadge: {
|
|
1516
|
+
paddingHorizontal: 8,
|
|
1517
|
+
paddingVertical: 2,
|
|
1518
|
+
borderRadius: 12,
|
|
1519
|
+
marginLeft: 8
|
|
1520
|
+
},
|
|
1521
|
+
includedBadgeText: {
|
|
1522
|
+
color: '#FFFFFF',
|
|
1523
|
+
fontSize: 10,
|
|
1524
|
+
fontWeight: '600',
|
|
1525
|
+
textTransform: 'uppercase'
|
|
1526
|
+
},
|
|
1527
|
+
appScopeText: {
|
|
1528
|
+
fontSize: 12,
|
|
1529
|
+
marginTop: 4,
|
|
1530
|
+
fontStyle: 'italic'
|
|
1531
|
+
},
|
|
1532
|
+
includedInPlanButton: {
|
|
1533
|
+
flexDirection: 'row',
|
|
1534
|
+
justifyContent: 'center',
|
|
1535
|
+
alignItems: 'center',
|
|
1536
|
+
paddingVertical: 12,
|
|
1537
|
+
borderRadius: 8,
|
|
1538
|
+
gap: 6
|
|
1539
|
+
},
|
|
1540
|
+
includedInPlanText: {
|
|
1541
|
+
color: '#FFFFFF',
|
|
1542
|
+
fontSize: 14,
|
|
1543
|
+
fontWeight: '600'
|
|
1544
|
+
},
|
|
1545
|
+
unavailableButton: {
|
|
1546
|
+
justifyContent: 'center',
|
|
1547
|
+
alignItems: 'center',
|
|
1548
|
+
paddingVertical: 12,
|
|
1549
|
+
borderRadius: 8
|
|
1550
|
+
},
|
|
1551
|
+
unavailableText: {
|
|
1552
|
+
fontSize: 14,
|
|
1553
|
+
fontWeight: '500',
|
|
1554
|
+
textAlign: 'center'
|
|
1555
|
+
},
|
|
1556
|
+
// App-specific plan styles
|
|
1557
|
+
appSpecificBadge: {
|
|
1558
|
+
position: 'absolute',
|
|
1559
|
+
top: 16,
|
|
1560
|
+
right: 16,
|
|
1561
|
+
paddingHorizontal: 8,
|
|
1562
|
+
paddingVertical: 4,
|
|
1563
|
+
borderRadius: 12,
|
|
1564
|
+
zIndex: 1
|
|
1565
|
+
},
|
|
1566
|
+
appSpecificText: {
|
|
1567
|
+
color: '#FFFFFF',
|
|
1568
|
+
fontSize: 12,
|
|
1569
|
+
fontWeight: '600'
|
|
1570
|
+
},
|
|
1571
|
+
planRestrictionText: {
|
|
1572
|
+
fontSize: 12,
|
|
1573
|
+
fontWeight: '500',
|
|
1574
|
+
marginTop: 4,
|
|
1575
|
+
fontStyle: 'italic'
|
|
1576
|
+
},
|
|
1577
|
+
unavailablePlanButton: {
|
|
1578
|
+
paddingVertical: 16,
|
|
1579
|
+
borderRadius: 12,
|
|
1580
|
+
alignItems: 'center'
|
|
1581
|
+
},
|
|
1582
|
+
unavailablePlanText: {
|
|
1583
|
+
fontSize: 16,
|
|
1584
|
+
fontWeight: '600'
|
|
1585
|
+
},
|
|
1586
|
+
// App switcher styles (for development/testing)
|
|
1587
|
+
appSwitcher: {
|
|
1588
|
+
padding: 16,
|
|
1589
|
+
borderBottomWidth: 1,
|
|
1590
|
+
margin: 16,
|
|
1591
|
+
borderRadius: 12,
|
|
1592
|
+
borderWidth: 1
|
|
1593
|
+
},
|
|
1594
|
+
appSwitcherTitle: {
|
|
1595
|
+
fontSize: 14,
|
|
1596
|
+
fontWeight: '600',
|
|
1597
|
+
marginBottom: 12
|
|
1598
|
+
},
|
|
1599
|
+
appSwitcherButtons: {
|
|
1600
|
+
flexDirection: 'row',
|
|
1601
|
+
gap: 8
|
|
1602
|
+
},
|
|
1603
|
+
appSwitcherButton: {
|
|
1604
|
+
paddingHorizontal: 12,
|
|
1605
|
+
paddingVertical: 6,
|
|
1606
|
+
borderRadius: 8,
|
|
1607
|
+
borderWidth: 1
|
|
1608
|
+
},
|
|
1609
|
+
appSwitcherButtonText: {
|
|
1610
|
+
fontSize: 12,
|
|
1611
|
+
fontWeight: '500'
|
|
1612
|
+
}
|
|
1613
|
+
});
|
|
1614
|
+
export default PremiumSubscriptionScreen;
|
|
1615
|
+
//# sourceMappingURL=PremiumSubscriptionScreen.js.map
|