@bytexbyte/nxtlinq-ai-agent-sdk 1.5.9 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/components/ChatBot.d.ts.map +1 -1
  2. package/dist/components/ChatBot.js +0 -1
  3. package/dist/components/context/ChatBotContext.d.ts.map +1 -1
  4. package/dist/components/context/ChatBotContext.js +42 -82
  5. package/dist/components/ui/BerifyMeModal.d.ts +1 -0
  6. package/dist/components/ui/BerifyMeModal.d.ts.map +1 -1
  7. package/dist/components/ui/BerifyMeModal.js +8 -10
  8. package/dist/components/ui/ChatBotUI.d.ts +1 -0
  9. package/dist/components/ui/ChatBotUI.d.ts.map +1 -1
  10. package/dist/components/ui/ChatBotUI.js +58 -222
  11. package/dist/components/ui/MessageInput.d.ts.map +1 -1
  12. package/dist/components/ui/MessageInput.js +41 -38
  13. package/dist/components/ui/MessageList.d.ts +1 -0
  14. package/dist/components/ui/MessageList.d.ts.map +1 -1
  15. package/dist/components/ui/MessageList.js +16 -79
  16. package/dist/components/ui/ModelSelector.d.ts +1 -0
  17. package/dist/components/ui/ModelSelector.d.ts.map +1 -1
  18. package/dist/components/ui/ModelSelector.js +51 -45
  19. package/dist/components/ui/NotificationModal.d.ts +1 -0
  20. package/dist/components/ui/NotificationModal.d.ts.map +1 -1
  21. package/dist/components/ui/NotificationModal.js +48 -74
  22. package/dist/components/ui/PermissionForm.d.ts +1 -1
  23. package/dist/components/ui/PermissionForm.d.ts.map +1 -1
  24. package/dist/components/ui/PermissionForm.js +302 -293
  25. package/dist/components/ui/PresetMessages.d.ts +1 -0
  26. package/dist/components/ui/PresetMessages.d.ts.map +1 -1
  27. package/dist/components/ui/PresetMessages.js +26 -27
  28. package/dist/components/ui/styles/isolatedStyles.d.ts +34 -0
  29. package/dist/components/ui/styles/isolatedStyles.d.ts.map +1 -0
  30. package/dist/components/ui/styles/isolatedStyles.js +449 -0
  31. package/dist/core/lib/useSpeechToTextFromMic/helper.d.ts.map +1 -1
  32. package/dist/core/lib/useSpeechToTextFromMic/helper.js +0 -4
  33. package/dist/core/lib/useSpeechToTextFromMic/index.js +1 -1
  34. package/dist/core/metakeepClient.d.ts.map +1 -1
  35. package/dist/core/metakeepClient.js +0 -1
  36. package/package.json +1 -1
  37. package/umd/nxtlinq-ai-agent.umd.js +882 -19
@@ -1,7 +1,10 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
2
+ /** @jsxImportSource @emotion/react */
2
3
  import * as React from 'react';
4
+ import { css } from '@emotion/react';
3
5
  import { useChatBot } from '../context/ChatBotContext';
4
- export const PermissionForm = ({ onClose, onOpen }) => {
6
+ import { actionButton } from './styles/isolatedStyles';
7
+ export const PermissionForm = ({ onClose }) => {
5
8
  const { hitAddress, permissions, setPermissions, setIsDisabled, onSave, onConnectWallet, onSignIn, isNeedSignInWithWallet, walletInfo, onVerifyWallet, serviceId, nxtlinqApi, permissionGroup, isAITLoading, isWalletLoading = false, refreshAIT, props } = useChatBot();
6
9
  const [availablePermissions, setAvailablePermissions] = React.useState([]);
7
10
  const [isSaving, setIsSaving] = React.useState(false);
@@ -50,7 +53,11 @@ export const PermissionForm = ({ onClose, onOpen }) => {
50
53
  // Check if wallet IDV verification is required based on configuration
51
54
  const requireWalletIDVVerification = props.requireWalletIDVVerification ?? true; // Default to true
52
55
  const isWalletVerified = Boolean(walletInfo?.id);
53
- const shouldShowVerificationPrompt = requireWalletIDVVerification && !isWalletVerified;
56
+ const isWalletVerifiedWithBerifyme = walletInfo?.method === 'berifyme';
57
+ // Show verification prompt if:
58
+ // 1. IDV verification is required AND wallet is not verified, OR
59
+ // 2. IDV verification is required AND wallet is verified but not with Berifyme
60
+ const shouldShowVerificationPrompt = requireWalletIDVVerification && (!isWalletVerified || !isWalletVerifiedWithBerifyme);
54
61
  const handleSave = async () => {
55
62
  setIsSaving(true);
56
63
  try {
@@ -76,251 +83,257 @@ export const PermissionForm = ({ onClose, onOpen }) => {
76
83
  };
77
84
  // Show loading state while checking wallet status
78
85
  if (isWalletLoading) {
79
- return (_jsxs("div", { style: {
80
- backgroundColor: 'white',
81
- padding: '24px',
82
- borderRadius: '12px',
83
- width: '480px',
84
- maxWidth: '90%',
85
- boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)'
86
- }, children: [_jsxs("div", { style: {
87
- display: 'flex',
88
- justifyContent: 'space-between',
89
- alignItems: 'center',
90
- marginBottom: '24px'
91
- }, children: [_jsx("h3", { style: {
92
- margin: 0,
93
- fontSize: '20px',
94
- fontWeight: '600',
95
- color: '#1a1a1a'
96
- }, children: "AIT Settings" }), _jsx("button", { onClick: onClose, style: {
97
- background: 'none',
98
- border: 'none',
99
- fontSize: '24px',
100
- cursor: 'pointer',
101
- color: '#666',
102
- padding: '4px',
103
- display: 'flex',
104
- alignItems: 'center',
105
- justifyContent: 'center'
106
- }, children: "\u00D7" })] }), _jsxs("div", { style: { textAlign: 'center', padding: '32px 0' }, children: [_jsx("div", { style: {
107
- width: '64px',
108
- height: '64px',
109
- margin: '0 auto 16px',
110
- backgroundColor: '#f5f5f5',
111
- borderRadius: '50%',
112
- display: 'flex',
113
- alignItems: 'center',
114
- justifyContent: 'center'
115
- }, children: _jsx("div", { style: {
116
- width: '32px',
117
- height: '32px',
118
- border: '3px solid #e3e3e3',
119
- borderTop: '3px solid #007bff',
120
- borderRadius: '50%',
121
- animation: 'spin 1s linear infinite'
122
- } }) }), _jsx("p", { style: {
123
- marginBottom: '24px',
124
- fontSize: '16px',
125
- color: '#666'
126
- }, children: "Checking wallet status..." })] }), _jsx("style", { children: `
86
+ return (_jsxs("div", { css: css `
87
+ background-color: white !important;
88
+ padding: 24px !important;
89
+ border-radius: 12px !important;
90
+ width: 480px !important;
91
+ max-width: 90% !important;
92
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
93
+ `, children: [_jsxs("div", { css: css `
94
+ display: flex !important;
95
+ justify-content: space-between !important;
96
+ align-items: center !important;
97
+ margin-bottom: 24px !important;
98
+ `, children: [_jsx("h3", { css: css `
99
+ margin: 0 !important;
100
+ font-size: 20px !important;
101
+ font-weight: 600 !important;
102
+ color: #1a1a1a !important;
103
+ `, children: "AIT Settings" }), _jsx("button", { onClick: onClose, css: css `
104
+ background: none !important;
105
+ border: none !important;
106
+ font-size: 24px !important;
107
+ cursor: pointer !important;
108
+ color: #666 !important;
109
+ padding: 4px !important;
110
+ display: flex !important;
111
+ align-items: center !important;
112
+ justify-content: center !important;
113
+
114
+ &:hover {
115
+ background-color: #f0f0f0 !important;
116
+ color: #333 !important;
117
+ }
118
+ `, children: "\u00D7" })] }), _jsxs("div", { css: css `
119
+ text-align: center !important;
120
+ padding: 32px 0 !important;
121
+ `, children: [_jsx("div", { css: css `
122
+ width: 64px !important;
123
+ height: 64px !important;
124
+ margin: 0 auto 16px !important;
125
+ background-color: #f5f5f5 !important;
126
+ border-radius: 50% !important;
127
+ display: flex !important;
128
+ align-items: center !important;
129
+ justify-content: center !important;
130
+ `, children: _jsx("div", { css: css `
131
+ width: 32px !important;
132
+ height: 32px !important;
133
+ border: 3px solid #e3e3e3 !important;
134
+ border-top: 3px solid #007bff !important;
135
+ border-radius: 50% !important;
136
+ animation: spin 1s linear infinite !important;
137
+ ` }) }), _jsx("p", { css: css `
138
+ margin-bottom: 24px !important;
139
+ font-size: 16px !important;
140
+ color: #666 !important;
141
+ `, children: "Checking wallet status..." })] }), _jsx("style", { children: `
127
142
  @keyframes spin {
128
143
  0% { transform: rotate(0deg); }
129
144
  100% { transform: rotate(360deg); }
130
145
  }
131
146
  ` })] }));
132
147
  }
133
- return (_jsxs("div", { style: {
134
- backgroundColor: 'white',
135
- padding: '24px',
136
- borderRadius: '12px',
137
- width: '480px',
138
- maxWidth: '90%',
139
- maxHeight: '90vh',
140
- boxShadow: '0 4px 12px rgba(0, 0, 0, 0.1)',
141
- display: 'flex',
142
- flexDirection: 'column',
143
- overflow: 'hidden'
144
- }, children: [_jsxs("div", { style: {
145
- display: 'flex',
146
- justifyContent: 'space-between',
147
- alignItems: 'center',
148
- marginBottom: '24px'
149
- }, children: [_jsx("h3", { style: {
150
- margin: 0,
151
- fontSize: '20px',
152
- fontWeight: '600',
153
- color: '#1a1a1a'
154
- }, children: "AIT Settings" }), _jsx("button", { onClick: onClose, style: {
155
- background: 'none',
156
- border: 'none',
157
- fontSize: '24px',
158
- cursor: 'pointer',
159
- color: '#666',
160
- padding: '8px',
161
- display: 'flex',
162
- alignItems: 'center',
163
- justifyContent: 'center',
164
- borderRadius: '4px',
165
- transition: 'background-color 0.2s',
166
- minWidth: '32px',
167
- minHeight: '32px'
168
- }, onMouseOver: (e) => {
169
- e.currentTarget.style.backgroundColor = '#f0f0f0';
170
- e.currentTarget.style.color = '#333';
171
- }, onMouseOut: (e) => {
172
- e.currentTarget.style.backgroundColor = 'transparent';
173
- e.currentTarget.style.color = '#666';
174
- }, title: "Close", children: "\u00D7" })] }), !hitAddress ? (_jsxs("div", { style: { textAlign: 'center', padding: '32px 0' }, children: [_jsx("div", { style: {
175
- width: '64px',
176
- height: '64px',
177
- margin: '0 auto 16px',
178
- backgroundColor: '#f5f5f5',
179
- borderRadius: '50%',
180
- display: 'flex',
181
- alignItems: 'center',
182
- justifyContent: 'center'
183
- }, children: _jsx("span", { style: { fontSize: '32px' }, children: "\uD83D\uDC5B" }) }), _jsx("p", { style: {
184
- marginBottom: '24px',
185
- fontSize: '16px',
186
- color: '#666'
187
- }, children: "Please connect your wallet first" }), _jsx("button", { onClick: onConnectWallet, disabled: Boolean(hitAddress), style: {
188
- padding: '12px 24px',
189
- backgroundColor: Boolean(hitAddress) ? '#28a745' : '#007bff',
190
- color: 'white',
191
- border: 'none',
192
- borderRadius: '8px',
193
- cursor: Boolean(hitAddress) ? 'not-allowed' : 'pointer',
194
- fontSize: '16px',
195
- fontWeight: '500',
196
- transition: 'background-color 0.2s',
197
- opacity: Boolean(hitAddress) ? 0.8 : 1
198
- }, onMouseOver: (e) => {
199
- if (!Boolean(hitAddress)) {
200
- e.currentTarget.style.backgroundColor = '#0056b3';
201
- }
202
- }, onMouseOut: (e) => {
203
- if (!Boolean(hitAddress)) {
204
- e.currentTarget.style.backgroundColor = '#007bff';
205
- }
206
- }, children: Boolean(hitAddress) ? 'Connected' : 'Connect Wallet' })] })) : isNeedSignInWithWallet ? (_jsxs("div", { style: { textAlign: 'center', padding: '32px 0' }, children: [_jsxs("div", { style: { marginBottom: '24px' }, children: [_jsx("h4", { style: {
207
- marginBottom: '12px',
208
- fontSize: '16px',
209
- color: '#666'
210
- }, children: "Connected Wallet" }), _jsx("p", { style: {
211
- wordBreak: 'break-all',
212
- backgroundColor: '#f8f9fa',
213
- padding: '12px',
214
- borderRadius: '8px',
215
- fontSize: '14px',
216
- color: '#333',
217
- border: '1px solid #e9ecef'
218
- }, children: hitAddress })] }), _jsx("p", { style: {
219
- marginBottom: '24px',
220
- fontSize: '16px',
221
- color: '#666'
222
- }, children: "Please sign in to continue" }), _jsx("button", { onClick: onSignIn, disabled: !isNeedSignInWithWallet, style: {
223
- padding: '12px 24px',
224
- backgroundColor: !isNeedSignInWithWallet ? '#28a745' : '#007bff',
225
- color: 'white',
226
- border: 'none',
227
- borderRadius: '8px',
228
- cursor: !isNeedSignInWithWallet ? 'not-allowed' : 'pointer',
229
- fontSize: '16px',
230
- fontWeight: '500',
231
- transition: 'background-color 0.2s',
232
- opacity: !isNeedSignInWithWallet ? 0.8 : 1
233
- }, onMouseOver: (e) => {
234
- if (isNeedSignInWithWallet) {
235
- e.currentTarget.style.backgroundColor = '#0056b3';
236
- }
237
- }, onMouseOut: (e) => {
238
- if (isNeedSignInWithWallet) {
239
- e.currentTarget.style.backgroundColor = '#007bff';
240
- }
241
- }, children: !isNeedSignInWithWallet ? 'Signed In' : 'Sign In' })] })) : shouldShowVerificationPrompt ? (_jsxs("div", { style: { textAlign: 'center', padding: '32px 0' }, children: [_jsxs("div", { style: { marginBottom: '24px' }, children: [_jsx("h4", { style: {
242
- marginBottom: '12px',
243
- fontSize: '16px',
244
- color: '#666'
245
- }, children: "Connected Wallet" }), _jsx("p", { style: {
246
- wordBreak: 'break-all',
247
- backgroundColor: '#f8f9fa',
248
- padding: '12px',
249
- borderRadius: '8px',
250
- fontSize: '14px',
251
- color: '#333',
252
- border: '1px solid #e9ecef'
253
- }, children: hitAddress })] }), _jsx("p", { style: {
254
- marginBottom: '24px',
255
- fontSize: '16px',
256
- color: '#666'
257
- }, children: "Please verify your wallet to continue" }), _jsx("button", { onClick: () => onVerifyWallet('berifyme'), style: {
258
- padding: '12px 24px',
259
- backgroundColor: '#007bff',
260
- color: 'white',
261
- border: 'none',
262
- borderRadius: '8px',
263
- cursor: 'pointer',
264
- fontSize: '16px',
265
- fontWeight: '500',
266
- transition: 'background-color 0.2s'
267
- }, onMouseOver: (e) => e.currentTarget.style.backgroundColor = '#0056b3', onMouseOut: (e) => e.currentTarget.style.backgroundColor = '#007bff', children: "Verify your wallet" })] })) : (_jsxs(_Fragment, { children: [_jsxs("div", { style: { marginBottom: '24px' }, children: [_jsx("h4", { style: {
268
- marginBottom: '12px',
269
- fontSize: '16px',
270
- color: '#666'
271
- }, children: "Connected Wallet" }), _jsx("p", { style: {
272
- wordBreak: 'break-all',
273
- backgroundColor: '#f8f9fa',
274
- padding: '12px',
275
- borderRadius: '8px',
276
- fontSize: '14px',
277
- color: '#333',
278
- border: '1px solid #e9ecef'
279
- }, children: hitAddress })] }), _jsxs("div", { style: {
280
- marginBottom: '24px',
281
- flex: 1,
282
- display: 'flex',
283
- flexDirection: 'column',
284
- minHeight: 0
285
- }, children: [_jsx("h4", { style: {
286
- marginBottom: '12px',
287
- fontSize: '16px',
288
- color: '#666',
289
- flexShrink: 0
290
- }, children: "Permissions" }), isAITLoading ? (_jsx("div", { style: {
291
- backgroundColor: '#f8f9fa',
292
- padding: '16px',
293
- borderRadius: '8px',
294
- border: '1px solid #e9ecef',
295
- textAlign: 'center',
296
- color: '#666'
297
- }, children: "Loading permissions..." })) : (_jsx("div", { style: {
298
- backgroundColor: '#f8f9fa',
299
- padding: '16px',
300
- borderRadius: '8px',
301
- border: '1px solid #e9ecef',
302
- flex: 1,
303
- overflowY: 'auto',
304
- overflowX: 'hidden',
305
- minHeight: 0
306
- }, children: availablePermissions.map((permission) => (_jsx("div", { style: { marginBottom: '12px' }, children: _jsxs("label", { style: {
307
- display: 'flex',
308
- alignItems: 'center',
309
- gap: '12px',
310
- cursor: isAITLoading ? 'not-allowed' : 'pointer',
311
- padding: '8px',
312
- borderRadius: '6px',
313
- transition: 'background-color 0.2s',
314
- opacity: isAITLoading ? 0.6 : 1
315
- }, onMouseOver: (e) => {
316
- if (!isAITLoading) {
317
- e.currentTarget.style.backgroundColor = '#e9ecef';
318
- }
319
- }, onMouseOut: (e) => {
320
- if (!isAITLoading) {
321
- e.currentTarget.style.backgroundColor = 'transparent';
322
- }
323
- }, children: [_jsx("input", { type: "checkbox", checked: tempPermissions.includes(permission.label), onChange: () => {
148
+ return (_jsxs("div", { css: css `
149
+ background-color: white !important;
150
+ padding: 24px !important;
151
+ border-radius: 12px !important;
152
+ width: 480px !important;
153
+ max-width: 90% !important;
154
+ max-height: 90vh !important;
155
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
156
+ display: flex !important;
157
+ flex-direction: column !important;
158
+ overflow: hidden !important;
159
+ `, children: [_jsxs("div", { css: css `
160
+ display: flex !important;
161
+ justify-content: space-between !important;
162
+ align-items: center !important;
163
+ margin-bottom: 24px !important;
164
+ `, children: [_jsx("h3", { css: css `
165
+ margin: 0 !important;
166
+ font-size: 20px !important;
167
+ font-weight: 600 !important;
168
+ color: #1a1a1a !important;
169
+ `, children: "AIT Settings" }), _jsx("button", { onClick: onClose, css: css `
170
+ background: none !important;
171
+ border: none !important;
172
+ font-size: 24px !important;
173
+ cursor: pointer !important;
174
+ color: #666 !important;
175
+ padding: 8px !important;
176
+ display: flex !important;
177
+ align-items: center !important;
178
+ justify-content: center !important;
179
+ border-radius: 4px !important;
180
+ transition: background-color 0.2s !important;
181
+ min-width: 32px !important;
182
+ min-height: 32px !important;
183
+
184
+ &:hover {
185
+ background-color: #f0f0f0 !important;
186
+ color: #333 !important;
187
+ }
188
+ `, title: "Close", children: "\u00D7" })] }), !hitAddress ? (_jsxs("div", { css: css `
189
+ text-align: center !important;
190
+ padding: 32px 0 !important;
191
+ `, children: [_jsx("div", { css: css `
192
+ width: 64px !important;
193
+ height: 64px !important;
194
+ margin: 0 auto 16px !important;
195
+ background-color: #f5f5f5 !important;
196
+ border-radius: 50% !important;
197
+ display: flex !important;
198
+ align-items: center !important;
199
+ justify-content: center !important;
200
+ `, children: _jsx("span", { css: css `font-size: 32px !important;`, children: "\uD83D\uDC5B" }) }), _jsx("p", { css: css `
201
+ margin-bottom: 24px !important;
202
+ font-size: 16px !important;
203
+ color: #666 !important;
204
+ `, children: "Please connect your wallet first" }), _jsx("button", { onClick: onConnectWallet, disabled: Boolean(hitAddress), css: css `
205
+ ${actionButton}
206
+ padding: 12px 24px !important;
207
+ background-color: ${Boolean(hitAddress) ? '#28a745' : '#007bff'} !important;
208
+ border-radius: 8px !important;
209
+ font-size: 16px !important;
210
+ opacity: ${Boolean(hitAddress) ? 0.8 : 1} !important;
211
+
212
+ &:disabled {
213
+ cursor: not-allowed !important;
214
+ }
215
+
216
+ &:hover:not(:disabled) {
217
+ background-color: #0056b3 !important;
218
+ }
219
+ `, children: Boolean(hitAddress) ? 'Connected' : 'Connect Wallet' })] })) : isNeedSignInWithWallet ? (_jsxs("div", { css: css `
220
+ text-align: center !important;
221
+ padding: 32px 0 !important;
222
+ `, children: [_jsxs("div", { css: css `margin-bottom: 24px !important;`, children: [_jsx("h4", { css: css `
223
+ margin-bottom: 12px !important;
224
+ font-size: 16px !important;
225
+ color: #666 !important;
226
+ `, children: "Connected Wallet" }), _jsx("p", { css: css `
227
+ word-break: break-all !important;
228
+ background-color: #f8f9fa !important;
229
+ padding: 12px !important;
230
+ border-radius: 8px !important;
231
+ font-size: 14px !important;
232
+ color: #333 !important;
233
+ border: 1px solid #e9ecef !important;
234
+ `, children: hitAddress })] }), _jsx("p", { css: css `
235
+ margin-bottom: 24px !important;
236
+ font-size: 16px !important;
237
+ color: #666 !important;
238
+ `, children: "Please sign in to continue" }), _jsx("button", { onClick: onSignIn, disabled: !isNeedSignInWithWallet, css: css `
239
+ ${actionButton}
240
+ padding: 12px 24px !important;
241
+ background-color: ${!isNeedSignInWithWallet ? '#28a745' : '#007bff'} !important;
242
+ border-radius: 8px !important;
243
+ font-size: 16px !important;
244
+ opacity: ${!isNeedSignInWithWallet ? 0.8 : 1} !important;
245
+
246
+ &:disabled {
247
+ cursor: not-allowed !important;
248
+ }
249
+
250
+ &:hover:not(:disabled) {
251
+ background-color: #0056b3 !important;
252
+ }
253
+ `, children: !isNeedSignInWithWallet ? 'Signed In' : 'Sign In' })] })) : shouldShowVerificationPrompt ? (_jsxs("div", { css: css `
254
+ text-align: center !important;
255
+ padding: 32px 0 !important;
256
+ `, children: [_jsxs("div", { css: css `margin-bottom: 24px !important;`, children: [_jsx("h4", { css: css `
257
+ margin-bottom: 12px !important;
258
+ font-size: 16px !important;
259
+ color: #666 !important;
260
+ `, children: "Connected Wallet" }), _jsx("p", { css: css `
261
+ word-break: break-all !important;
262
+ background-color: #f8f9fa !important;
263
+ padding: 12px !important;
264
+ border-radius: 8px !important;
265
+ font-size: 14px !important;
266
+ color: #333 !important;
267
+ border: 1px solid #e9ecef !important;
268
+ `, children: hitAddress })] }), _jsx("p", { css: css `
269
+ margin-bottom: 24px !important;
270
+ font-size: 16px !important;
271
+ color: #666 !important;
272
+ `, children: isWalletVerified && !isWalletVerifiedWithBerifyme
273
+ ? 'Your wallet is verified with custom method, but Berify.me verification is required to continue.'
274
+ : 'Please verify your wallet with Berify.me to continue' }), _jsx("button", { onClick: () => onVerifyWallet('berifyme'), css: css `
275
+ ${actionButton}
276
+ padding: 12px 24px !important;
277
+ background-color: #007bff !important;
278
+ border-radius: 8px !important;
279
+ font-size: 16px !important;
280
+
281
+ &:hover {
282
+ background-color: #0056b3 !important;
283
+ }
284
+ `, children: "Verify your wallet" })] })) : (_jsxs(_Fragment, { children: [_jsxs("div", { css: css `margin-bottom: 24px !important;`, children: [_jsx("h4", { css: css `
285
+ margin-bottom: 12px !important;
286
+ font-size: 16px !important;
287
+ color: #666 !important;
288
+ `, children: "Connected Wallet" }), _jsx("p", { css: css `
289
+ word-break: break-all !important;
290
+ background-color: #f8f9fa !important;
291
+ padding: 12px !important;
292
+ border-radius: 8px !important;
293
+ font-size: 14px !important;
294
+ color: #333 !important;
295
+ border: 1px solid #e9ecef !important;
296
+ `, children: hitAddress })] }), _jsxs("div", { css: css `
297
+ margin-bottom: 24px !important;
298
+ flex: 1 !important;
299
+ display: flex !important;
300
+ flex-direction: column !important;
301
+ min-height: 0 !important;
302
+ `, children: [_jsx("h4", { css: css `
303
+ margin-bottom: 12px !important;
304
+ font-size: 16px !important;
305
+ color: #666 !important;
306
+ flex-shrink: 0 !important;
307
+ `, children: "Permissions" }), isAITLoading ? (_jsx("div", { css: css `
308
+ background-color: #f8f9fa !important;
309
+ padding: 16px !important;
310
+ border-radius: 8px !important;
311
+ border: 1px solid #e9ecef !important;
312
+ text-align: center !important;
313
+ color: #666 !important;
314
+ `, children: "Loading permissions..." })) : (_jsx("div", { css: css `
315
+ background-color: #f8f9fa !important;
316
+ padding: 16px !important;
317
+ border-radius: 8px !important;
318
+ border: 1px solid #e9ecef !important;
319
+ flex: 1 !important;
320
+ overflow-y: auto !important;
321
+ overflow-x: hidden !important;
322
+ min-height: 0 !important;
323
+ `, children: availablePermissions.map((permission) => (_jsx("div", { css: css `margin-bottom: 12px !important;`, children: _jsxs("label", { css: css `
324
+ display: flex !important;
325
+ align-items: center !important;
326
+ gap: 12px !important;
327
+ cursor: ${isAITLoading ? 'not-allowed' : 'pointer'} !important;
328
+ padding: 8px !important;
329
+ border-radius: 6px !important;
330
+ transition: background-color 0.2s !important;
331
+ opacity: ${isAITLoading ? 0.6 : 1} !important;
332
+
333
+ &:hover {
334
+ background-color: ${!isAITLoading ? '#e9ecef' : 'transparent'} !important;
335
+ }
336
+ `, children: [_jsx("input", { type: "checkbox", checked: tempPermissions.includes(permission.label), onChange: () => {
324
337
  if (!isAITLoading) {
325
338
  const newPermissions = tempPermissions.includes(permission.label)
326
339
  ? tempPermissions.filter(p => p !== permission.label)
@@ -328,55 +341,51 @@ export const PermissionForm = ({ onClose, onOpen }) => {
328
341
  setTempPermissions(newPermissions);
329
342
  setIsDisabled(false);
330
343
  }
331
- }, disabled: isAITLoading, style: {
332
- margin: 0,
333
- width: '18px',
334
- height: '18px',
335
- cursor: isAITLoading ? 'not-allowed' : 'pointer'
336
- } }), _jsx("span", { style: {
337
- fontSize: '14px',
338
- color: '#333'
339
- }, children: permission.label })] }) }, permission.id))) }))] }), _jsxs("div", { style: {
340
- display: 'flex',
341
- justifyContent: 'flex-end',
342
- gap: '12px',
343
- borderTop: '1px solid #e9ecef',
344
- paddingTop: '24px',
345
- flexShrink: 0,
346
- marginTop: 'auto'
347
- }, children: [_jsx("button", { onClick: handleCancel, style: {
348
- padding: '10px 20px',
349
- backgroundColor: '#f8f9fa',
350
- color: '#666',
351
- border: '1px solid #dee2e6',
352
- borderRadius: '8px',
353
- cursor: 'pointer',
354
- fontSize: '14px',
355
- fontWeight: '500',
356
- transition: 'all 0.2s'
357
- }, onMouseOver: (e) => {
358
- e.currentTarget.style.backgroundColor = '#e9ecef';
359
- e.currentTarget.style.borderColor = '#ced4da';
360
- }, onMouseOut: (e) => {
361
- e.currentTarget.style.backgroundColor = '#f8f9fa';
362
- e.currentTarget.style.borderColor = '#dee2e6';
363
- }, children: "Cancel" }), _jsx("button", { onClick: handleSave, disabled: !hasPermissionChanges() || isSaving || isAITLoading, style: {
364
- padding: '10px 20px',
365
- backgroundColor: !hasPermissionChanges() || isSaving || isAITLoading ? '#e9ecef' : '#007bff',
366
- color: !hasPermissionChanges() || isSaving || isAITLoading ? '#6c757d' : 'white',
367
- border: 'none',
368
- borderRadius: '8px',
369
- cursor: !hasPermissionChanges() || isSaving || isAITLoading ? 'not-allowed' : 'pointer',
370
- fontSize: '14px',
371
- fontWeight: '500',
372
- transition: 'background-color 0.2s'
373
- }, onMouseOver: (e) => {
374
- if (hasPermissionChanges() && !isSaving && !isAITLoading) {
375
- e.currentTarget.style.backgroundColor = '#0056b3';
376
- }
377
- }, onMouseOut: (e) => {
378
- if (hasPermissionChanges() && !isSaving && !isAITLoading) {
379
- e.currentTarget.style.backgroundColor = '#007bff';
380
- }
381
- }, children: isSaving ? 'Saving...' : 'Save' })] })] }))] }));
344
+ }, disabled: isAITLoading, css: css `
345
+ margin: 0 !important;
346
+ width: 18px !important;
347
+ height: 18px !important;
348
+ cursor: ${isAITLoading ? 'not-allowed' : 'pointer'} !important;
349
+ ` }), _jsx("span", { css: css `
350
+ font-size: 14px !important;
351
+ color: #333 !important;
352
+ `, children: permission.label })] }) }, permission.id))) }))] }), _jsxs("div", { css: css `
353
+ display: flex !important;
354
+ justify-content: flex-end !important;
355
+ gap: 12px !important;
356
+ border-top: 1px solid #e9ecef !important;
357
+ padding-top: 24px !important;
358
+ flex-shrink: 0 !important;
359
+ margin-top: auto !important;
360
+ `, children: [_jsx("button", { onClick: handleCancel, css: css `
361
+ padding: 10px 20px !important;
362
+ background-color: #f8f9fa !important;
363
+ color: #666 !important;
364
+ border: 1px solid #dee2e6 !important;
365
+ border-radius: 8px !important;
366
+ cursor: pointer !important;
367
+ font-size: 14px !important;
368
+ font-weight: 500 !important;
369
+ transition: all 0.2s !important;
370
+
371
+ &:hover {
372
+ background-color: #e9ecef !important;
373
+ border-color: #ced4da !important;
374
+ }
375
+ `, children: "Cancel" }), _jsx("button", { onClick: handleSave, disabled: !hasPermissionChanges() || isSaving || isAITLoading, css: css `
376
+ ${actionButton}
377
+ padding: 10px 20px !important;
378
+ background-color: ${!hasPermissionChanges() || isSaving || isAITLoading ? '#e9ecef' : '#007bff'} !important;
379
+ color: ${!hasPermissionChanges() || isSaving || isAITLoading ? '#6c757d' : 'white'} !important;
380
+ border-radius: 8px !important;
381
+ font-size: 14px !important;
382
+
383
+ &:disabled {
384
+ cursor: not-allowed !important;
385
+ }
386
+
387
+ &:hover:not(:disabled) {
388
+ background-color: #0056b3 !important;
389
+ }
390
+ `, children: isSaving ? 'Saving...' : 'Save' })] })] }))] }));
382
391
  };