@agentiffai/design 0.1.0

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 (82) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/LICENSE +21 -0
  3. package/README.md +187 -0
  4. package/assets/layout/main-pane-section.png +0 -0
  5. package/assets/layout/nav-complete.png +0 -0
  6. package/assets/layout/nav-horizontal-section.png +0 -0
  7. package/assets/layout/nav-vertical-section.png +0 -0
  8. package/assets/layout/pane-section-dropdowns.png +0 -0
  9. package/assets/layout/pane-section-header.png +0 -0
  10. package/dist/Window-B6e_UfLV.d.ts +429 -0
  11. package/dist/Window-CgGFIYHS.d.cts +429 -0
  12. package/dist/chunk-CNVJ5UF2.js +2069 -0
  13. package/dist/chunk-CNVJ5UF2.js.map +1 -0
  14. package/dist/chunk-CVHHTWDQ.cjs +72 -0
  15. package/dist/chunk-CVHHTWDQ.cjs.map +1 -0
  16. package/dist/chunk-H4VHCHCP.cjs +1268 -0
  17. package/dist/chunk-H4VHCHCP.cjs.map +1 -0
  18. package/dist/chunk-JQ6Q7MDQ.js +67 -0
  19. package/dist/chunk-JQ6Q7MDQ.js.map +1 -0
  20. package/dist/chunk-KNSPBTTJ.cjs +2158 -0
  21. package/dist/chunk-KNSPBTTJ.cjs.map +1 -0
  22. package/dist/chunk-MNXQDDWP.js +2143 -0
  23. package/dist/chunk-MNXQDDWP.js.map +1 -0
  24. package/dist/chunk-P4Q3MHIY.cjs +2093 -0
  25. package/dist/chunk-P4Q3MHIY.cjs.map +1 -0
  26. package/dist/chunk-PAOXD7DF.js +1253 -0
  27. package/dist/chunk-PAOXD7DF.js.map +1 -0
  28. package/dist/copilotkit/index.cjs +611 -0
  29. package/dist/copilotkit/index.cjs.map +1 -0
  30. package/dist/copilotkit/index.d.cts +162 -0
  31. package/dist/copilotkit/index.d.ts +162 -0
  32. package/dist/copilotkit/index.js +538 -0
  33. package/dist/copilotkit/index.js.map +1 -0
  34. package/dist/icons/index.cjs +48 -0
  35. package/dist/icons/index.cjs.map +1 -0
  36. package/dist/icons/index.d.cts +375 -0
  37. package/dist/icons/index.d.ts +375 -0
  38. package/dist/icons/index.js +3 -0
  39. package/dist/icons/index.js.map +1 -0
  40. package/dist/index.cjs +536 -0
  41. package/dist/index.cjs.map +1 -0
  42. package/dist/index.d-DYU1eVeb.d.cts +252 -0
  43. package/dist/index.d-DYU1eVeb.d.ts +252 -0
  44. package/dist/index.d.cts +185 -0
  45. package/dist/index.d.ts +185 -0
  46. package/dist/index.js +358 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/layout/index.cjs +48 -0
  49. package/dist/layout/index.cjs.map +1 -0
  50. package/dist/layout/index.d.cts +206 -0
  51. package/dist/layout/index.d.ts +206 -0
  52. package/dist/layout/index.js +3 -0
  53. package/dist/layout/index.js.map +1 -0
  54. package/dist/theme/index.cjs +24 -0
  55. package/dist/theme/index.cjs.map +1 -0
  56. package/dist/theme/index.d.cts +95 -0
  57. package/dist/theme/index.d.ts +95 -0
  58. package/dist/theme/index.js +3 -0
  59. package/dist/theme/index.js.map +1 -0
  60. package/package.json +148 -0
  61. package/public/assets/bg-set/brand-logos/Google.svg +1 -0
  62. package/public/assets/bg-set/brand-logos/Google2.svg +1 -0
  63. package/public/assets/bg-set/brand-logos/Microsoft.svg +1 -0
  64. package/public/assets/bg-set/brand-logos/Microsoft2.svg +1 -0
  65. package/public/assets/bg-set/brand-logos/Slack.svg +1 -0
  66. package/public/assets/bg-set/brand-logos/Slack2.svg +1 -0
  67. package/public/assets/bg-set/brand-logos/YouTube.svg +1 -0
  68. package/public/assets/bg-set/brand-logos/YouTube2.svg +1 -0
  69. package/public/assets/bg-set/pattern/Size=lg, Type=Waves Rays2.svg +1 -0
  70. package/public/assets/bg-set/pattern/Size=md, Type=Waves Rays2.svg +1 -0
  71. package/public/assets/bg-set/pattern/Size=sm, Type=Waves Rays2.svg +1 -0
  72. package/public/assets/bg-set/pattern/Size=xl, Type=Waves Rays2.svg +1 -0
  73. package/public/assets/bg-set/pattern/Size=xs, Type=Waves Rays2.svg +1 -0
  74. package/public/assets/icon-set/Icon-add-circle-fill.svg +1 -0
  75. package/public/assets/icon-set/Icon-calendar-fill.svg +1 -0
  76. package/public/assets/icon-set/Icon-chat-1-fill.svg +1 -0
  77. package/public/assets/icon-set/Icon-download-2-fill.svg +1 -0
  78. package/public/assets/icon-set/Icon-home-fill.svg +1 -0
  79. package/public/assets/icon-set/Icon-mic-fill.svg +1 -0
  80. package/public/assets/icon-set/Icon-settings-3-fill.svg +1 -0
  81. package/public/assets/icon-set/Icon-settings-fill.svg +1 -0
  82. package/public/assets/icon-set/Icon-settings-line.svg +1 -0
@@ -0,0 +1,2143 @@
1
+ import styled8, { css } from 'styled-components';
2
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
+ import { useButton } from '@react-aria/button';
4
+ import { useRef, useState } from 'react';
5
+ import { useMeter } from '@react-aria/meter';
6
+ import { useTabList, useTabPanel, useTab } from '@react-aria/tabs';
7
+ import { Item } from '@react-stately/collections';
8
+ import { useTabListState } from '@react-stately/tabs';
9
+ import { DisclosureGroup, Disclosure, Button, DisclosurePanel, Heading } from 'react-aria-components';
10
+
11
+ // src/components/layout/Icon/Icon.styles.ts
12
+ var IconWrapper = styled8.span`
13
+ display: inline-flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ width: ${({ $size }) => $size}px;
17
+ height: ${({ $size }) => $size}px;
18
+ color: ${({ $color }) => $color};
19
+ line-height: 1;
20
+
21
+ img {
22
+ width: 100%;
23
+ height: 100%;
24
+ filter: ${({ $color }) => {
25
+ if ($color === "currentColor" || !$color) return "inherit";
26
+ if ($color === "white" || $color === "#ffffff" || $color === "#fff") {
27
+ return "brightness(0) saturate(100%) invert(100%)";
28
+ }
29
+ if ($color === "#b9bbbe") {
30
+ return "brightness(0) saturate(100%) invert(75%) sepia(8%) saturate(223%) hue-rotate(180deg) brightness(94%) contrast(86%)";
31
+ }
32
+ if ($color === "#ed4245" || $color === "#f04747") {
33
+ return "brightness(0) saturate(100%) invert(38%) sepia(97%) saturate(1459%) hue-rotate(334deg) brightness(95%) contrast(93%)";
34
+ }
35
+ return "none";
36
+ }};
37
+ }
38
+ `;
39
+
40
+ // src/components/layout/Icon/icons.ts
41
+ var ICON_BASE_PATH = "/assets/icon-set";
42
+ var IconNames = {
43
+ MIC: "mic-fill",
44
+ MIC_OFF: "mic-off-fill",
45
+ HEADPHONE: "headphone-fill",
46
+ VOLUME_MUTE: "volume-mute-fill",
47
+ SETTINGS: "settings-3-fill",
48
+ SETTINGS_FILL: "settings-fill",
49
+ SETTINGS_LINE: "settings-line",
50
+ HOME: "home-fill",
51
+ ADD_CIRCLE: "add-circle-fill",
52
+ COMPASS_DISCOVER: "compass-discover-fill",
53
+ DOWNLOAD: "download-2-fill",
54
+ ARROW_LEFT: "arrow-left-fill",
55
+ CALENDAR: "calendar-fill",
56
+ CHAT: "chat-1-fill"
57
+ };
58
+ var iconFiles = {
59
+ "mic-fill": "Icon-mic-fill.svg",
60
+ "mic-off-fill": "Icon-mic-off-fill.svg",
61
+ "headphone-fill": "Icon-headphone-fill.svg",
62
+ "volume-mute-fill": "Icon-volume-mute-fill.svg",
63
+ "settings-3-fill": "Icon-settings-3-fill.svg",
64
+ "settings-fill": "Icon-settings-fill.svg",
65
+ "settings-line": "Icon-settings-line.svg",
66
+ "home-fill": "Icon-home-fill.svg",
67
+ "add-circle-fill": "Icon-add-circle-fill.svg",
68
+ "compass-discover-fill": "Icon-compass-discover-fill.svg",
69
+ "download-2-fill": "Icon-download-2-fill.svg",
70
+ "arrow-left-fill": "Icon-arrow-left-fill.svg",
71
+ "calendar-fill": "Icon-calendar-fill.svg",
72
+ "chat-1-fill": "Icon-chat-1-fill.svg"
73
+ };
74
+ function getIconPath(name) {
75
+ return `${ICON_BASE_PATH}/${iconFiles[name]}`;
76
+ }
77
+ function Icon({
78
+ name,
79
+ size = 20,
80
+ color = "currentColor",
81
+ className,
82
+ ...imgProps
83
+ }) {
84
+ const iconPath = getIconPath(name);
85
+ return /* @__PURE__ */ jsx(IconWrapper, { $size: size, $color: color, className, "aria-hidden": "true", children: /* @__PURE__ */ jsx("img", { src: iconPath, alt: "", width: size, height: size, ...imgProps }) });
86
+ }
87
+ Icon.displayName = "Icon";
88
+ var NAV_BG = "#232428";
89
+ var NAV_BORDER = "#1E1F22";
90
+ var Container = styled8.nav`
91
+ position: absolute;
92
+ bottom: 0;
93
+ left: 0;
94
+ right: 0;
95
+ background-color: ${NAV_BG};
96
+ border-top: 1px solid ${NAV_BORDER};
97
+ height: 52px;
98
+ z-index: 10;
99
+
100
+ /* Dark theme support */
101
+ @media (prefers-color-scheme: dark) {
102
+ background-color: #1a1b1e;
103
+ }
104
+ `;
105
+ var ContentWrapper = styled8.div`
106
+ display: flex;
107
+ justify-content: space-between;
108
+ align-items: center;
109
+ height: 100%;
110
+ padding: 0 8px;
111
+ max-width: 100%;
112
+
113
+ /* Responsive padding */
114
+ @media (min-width: 768px) {
115
+ padding: 0 16px;
116
+ }
117
+ `;
118
+ var UserStatusSlot = styled8.div`
119
+ display: flex;
120
+ align-items: center;
121
+ min-width: 0; /* Allow flex item to shrink */
122
+ flex: 0 1 auto;
123
+
124
+ /* Handle overflow for long usernames */
125
+ > * {
126
+ overflow: hidden;
127
+ text-overflow: ellipsis;
128
+ white-space: nowrap;
129
+ }
130
+ `;
131
+ var ActionButtonsSlot = styled8.div`
132
+ display: flex;
133
+ align-items: center;
134
+ gap: 4px;
135
+ flex-shrink: 0;
136
+
137
+ /* Ensure buttons stay visible */
138
+ @media (min-width: 480px) {
139
+ gap: 8px;
140
+ }
141
+ `;
142
+ function NavHorizontal({
143
+ userStatusSlot,
144
+ actionsSlot,
145
+ className,
146
+ "aria-label": ariaLabel = "Horizontal navigation bar"
147
+ }) {
148
+ return /* @__PURE__ */ jsx(Container, { className, role: "navigation", "aria-label": ariaLabel, children: /* @__PURE__ */ jsxs(ContentWrapper, { children: [
149
+ /* @__PURE__ */ jsx(UserStatusSlot, { children: userStatusSlot }),
150
+ /* @__PURE__ */ jsx(ActionButtonsSlot, { children: actionsSlot })
151
+ ] }) });
152
+ }
153
+ NavHorizontal.displayName = "NavHorizontal";
154
+ var NAV_BG2 = "#202225";
155
+ var NAV_SEPARATOR = "#36393F";
156
+ var Container2 = styled8.nav`
157
+ position: absolute;
158
+ top: 0;
159
+ left: 0;
160
+ bottom: 52px; /* Account for horizontal nav height */
161
+ width: 72px;
162
+ background-color: ${NAV_BG2};
163
+ display: flex;
164
+ flex-direction: column;
165
+ z-index: 9; /* Below horizontal nav and chat sidebar */
166
+ overflow-y: auto;
167
+ overflow-x: hidden;
168
+ scrollbar-width: none; /* Firefox */
169
+
170
+ /* Hide scrollbar for Chrome, Safari and Opera */
171
+ &::-webkit-scrollbar {
172
+ display: none;
173
+ }
174
+
175
+ /* Dark theme support */
176
+ @media (prefers-color-scheme: dark) {
177
+ background-color: #1a1b1e;
178
+ }
179
+
180
+ /* Responsive adjustments */
181
+ @media (max-width: 768px) {
182
+ width: 60px; /* Match MainPane left offset on mobile */
183
+ }
184
+ `;
185
+ var TopSection = styled8.div`
186
+ display: flex;
187
+ flex-direction: column;
188
+ align-items: center;
189
+ height: 56px; /* Same as PaneSectionHeader on mobile */
190
+ padding: 0;
191
+ flex-shrink: 0;
192
+ position: relative;
193
+
194
+ @media (min-width: 768px) {
195
+ height: 64px; /* Same as PaneSectionHeader on desktop */
196
+ }
197
+ `;
198
+ var BackButton = styled8.button`
199
+ position: absolute;
200
+ top: 50%;
201
+ left: 50%;
202
+ transform: translate(-50%, -50%);
203
+ width: 40px;
204
+ height: 40px;
205
+ border-radius: 50%;
206
+ border: none;
207
+ background-color: ${NAV_SEPARATOR};
208
+ color: #ffffff;
209
+ cursor: pointer;
210
+ display: flex;
211
+ align-items: center;
212
+ justify-content: center;
213
+ transition: all 0.2s ease-in-out;
214
+
215
+ &:hover {
216
+ background-color: #5865F2;
217
+ }
218
+
219
+ &:active {
220
+ transform: translate(-50%, -50%) scale(0.95);
221
+ }
222
+
223
+ &:focus {
224
+ outline: none;
225
+ }
226
+
227
+ &:focus-visible {
228
+ outline: 2px solid #5865F2;
229
+ outline-offset: 2px;
230
+ }
231
+ `;
232
+ styled8.span`
233
+ font-size: 20px;
234
+ line-height: 1;
235
+ font-weight: bold;
236
+ `;
237
+ var Separator = styled8.div`
238
+ width: 32px;
239
+ height: 2px;
240
+ background-color: ${NAV_SEPARATOR};
241
+ align-self: center;
242
+ margin: 8px auto 12px;
243
+ border-radius: 1px;
244
+ `;
245
+ var FolderGroupsSlot = styled8.div`
246
+ display: flex;
247
+ flex-direction: column;
248
+ align-items: center;
249
+ gap: 8px;
250
+ padding: 0 12px 12px;
251
+ flex: 1;
252
+
253
+ /* Server/workspace icons styling */
254
+ > * {
255
+ width: 48px;
256
+ height: 48px;
257
+ border-radius: 50%;
258
+ transition: border-radius 0.15s ease-out;
259
+ cursor: pointer;
260
+
261
+ &:hover {
262
+ border-radius: 16px;
263
+ }
264
+ }
265
+
266
+ /* Responsive adjustments */
267
+ @media (max-width: 768px) {
268
+ padding: 0 6px 12px; /* Reduce horizontal padding on mobile */
269
+ }
270
+ `;
271
+ function NavVertical({
272
+ onBackClick,
273
+ onHomeClick,
274
+ folderGroupsSlot,
275
+ className,
276
+ "aria-label": ariaLabel = "Vertical navigation sidebar"
277
+ }) {
278
+ const backButtonRef = useRef(null);
279
+ const homeButtonRef = useRef(null);
280
+ const { buttonProps: backButtonProps } = useButton(
281
+ {
282
+ onPress: onBackClick,
283
+ "aria-label": "Go back"
284
+ },
285
+ backButtonRef
286
+ );
287
+ const { buttonProps: homeButtonProps } = useButton(
288
+ {
289
+ onPress: onHomeClick,
290
+ "aria-label": "Home"
291
+ },
292
+ homeButtonRef
293
+ );
294
+ return /* @__PURE__ */ jsxs(Container2, { className, role: "navigation", "aria-label": ariaLabel, children: [
295
+ /* @__PURE__ */ jsx(TopSection, { children: onBackClick ? /* @__PURE__ */ jsx(BackButton, { ...backButtonProps, ref: backButtonRef, children: /* @__PURE__ */ jsx(Icon, { name: "arrow-left-fill", size: 20, color: "white" }) }) : onHomeClick ? /* @__PURE__ */ jsx(BackButton, { ...homeButtonProps, ref: homeButtonRef, children: /* @__PURE__ */ jsx(Icon, { name: "home-fill", size: 24, color: "white" }) }) : null }),
296
+ /* @__PURE__ */ jsx(Separator, {}),
297
+ /* @__PURE__ */ jsx(FolderGroupsSlot, { children: folderGroupsSlot })
298
+ ] });
299
+ }
300
+ NavVertical.displayName = "NavVertical";
301
+ var Container3 = styled8.div`
302
+ position: relative;
303
+ width: 100%;
304
+ height: 100vh;
305
+ background-color: #36393f;
306
+ overflow: hidden;
307
+
308
+ /* Dark theme support */
309
+ @media (prefers-color-scheme: dark) {
310
+ background-color: #2f3136;
311
+ }
312
+ `;
313
+ var MainPane = styled8.main`
314
+ position: absolute;
315
+ top: 0;
316
+ left: 72px; /* Width of vertical nav */
317
+ right: 0;
318
+ bottom: 52px; /* Height of horizontal nav */
319
+ background-color: #36393f;
320
+ overflow: auto;
321
+
322
+ /* Custom scrollbar styling */
323
+ &::-webkit-scrollbar {
324
+ width: 8px;
325
+ height: 8px;
326
+ }
327
+
328
+ &::-webkit-scrollbar-track {
329
+ background: transparent;
330
+ }
331
+
332
+ &::-webkit-scrollbar-thumb {
333
+ background-color: #202225;
334
+ border-radius: 4px;
335
+ }
336
+
337
+ &::-webkit-scrollbar-thumb:hover {
338
+ background-color: #18191c;
339
+ }
340
+
341
+ /* Firefox scrollbar */
342
+ scrollbar-width: thin;
343
+ scrollbar-color: #202225 transparent;
344
+
345
+ /* Dark theme support */
346
+ @media (prefers-color-scheme: dark) {
347
+ background-color: #2f3136;
348
+ }
349
+
350
+ /* Responsive adjustments */
351
+ @media (max-width: 768px) {
352
+ left: 60px; /* Smaller nav on mobile */
353
+ }
354
+ `;
355
+ function Layout({
356
+ mainPaneSlot,
357
+ navVerticalSlot,
358
+ navHorizontalUserSlot,
359
+ navHorizontalActionsSlot,
360
+ onNavBackClick,
361
+ className
362
+ }) {
363
+ return /* @__PURE__ */ jsxs(Container3, { className, children: [
364
+ /* @__PURE__ */ jsx(NavVertical, { folderGroupsSlot: navVerticalSlot, onBackClick: onNavBackClick }),
365
+ /* @__PURE__ */ jsx(MainPane, { children: mainPaneSlot }),
366
+ /* @__PURE__ */ jsx(
367
+ NavHorizontal,
368
+ {
369
+ userStatusSlot: navHorizontalUserSlot,
370
+ actionsSlot: navHorizontalActionsSlot
371
+ }
372
+ )
373
+ ] });
374
+ }
375
+ Layout.displayName = "Layout";
376
+ var Container4 = styled8.div`
377
+ display: flex;
378
+ align-items: center;
379
+ justify-content: flex-end;
380
+ gap: 4px;
381
+ `;
382
+ var ActionButton = styled8.button`
383
+ width: ${({ $size = 32 }) => $size}px;
384
+ height: ${({ $size = 32 }) => $size}px;
385
+ min-width: ${({ $size = 32 }) => $size}px;
386
+ min-height: ${({ $size = 32 }) => $size}px;
387
+ border-radius: ${({ $isPrimary }) => $isPrimary ? "50%" : "4px"};
388
+ border: none;
389
+ background-color: ${({ $isPrimary }) => $isPrimary ? "#5865F2" : "transparent"};
390
+ color: ${({ $isPrimary }) => $isPrimary ? "#FFFFFF" : "#b9bbbe"};
391
+ cursor: pointer;
392
+ display: flex;
393
+ align-items: center;
394
+ justify-content: center;
395
+ transition: all 0.15s ease;
396
+ font-size: 16px;
397
+
398
+ &:hover {
399
+ background-color: ${({ $isPrimary }) => $isPrimary ? "#4752C4" : "rgba(255, 255, 255, 0.1)"};
400
+ color: ${({ $isPrimary }) => $isPrimary ? "#FFFFFF" : "#dcddde"};
401
+ }
402
+
403
+ &:active {
404
+ transform: scale(0.95);
405
+ }
406
+
407
+ ${({ $isActive, $isPrimary }) => $isActive && !$isPrimary && css`
408
+ background-color: rgba(255, 255, 255, 0.08);
409
+ color: #ffffff;
410
+ `}
411
+
412
+ ${({ $isActive, $isPrimary }) => $isActive && $isPrimary && css`
413
+ background-color: #4752C4;
414
+ color: #ffffff;
415
+ `}
416
+
417
+ &:focus {
418
+ outline: none;
419
+ }
420
+
421
+ &:focus-visible {
422
+ outline: 2px solid #5865f2;
423
+ outline-offset: 2px;
424
+ }
425
+ `;
426
+ function ActionButtonItem({ icon, label, onClick, isActive, size, isPrimary }) {
427
+ const ref = useRef(null);
428
+ const { buttonProps } = useButton(
429
+ {
430
+ onPress: onClick,
431
+ "aria-label": label,
432
+ "aria-pressed": isActive
433
+ },
434
+ ref
435
+ );
436
+ return /* @__PURE__ */ jsx(
437
+ ActionButton,
438
+ {
439
+ ...buttonProps,
440
+ ref,
441
+ $isActive: isActive,
442
+ $size: size,
443
+ $isPrimary: isPrimary,
444
+ children: icon
445
+ }
446
+ );
447
+ }
448
+ function ActionButtons({
449
+ onCalendarClick,
450
+ onSettingsClick,
451
+ onChatClick: _onChatClick,
452
+ isCalendarActive = false,
453
+ isSettingsActive = false,
454
+ isChatActive: _isChatActive = false,
455
+ className
456
+ }) {
457
+ return /* @__PURE__ */ jsxs(Container4, { className, children: [
458
+ /* @__PURE__ */ jsx(
459
+ ActionButtonItem,
460
+ {
461
+ icon: /* @__PURE__ */ jsx(Icon, { name: "calendar-fill", size: 16, color: "#b9bbbe" }),
462
+ label: "Calendar",
463
+ onClick: onCalendarClick,
464
+ isActive: isCalendarActive,
465
+ size: 32
466
+ }
467
+ ),
468
+ /* @__PURE__ */ jsx(
469
+ ActionButtonItem,
470
+ {
471
+ icon: /* @__PURE__ */ jsx(Icon, { name: "settings-3-fill", size: 16, color: "#b9bbbe" }),
472
+ label: "Settings",
473
+ onClick: onSettingsClick,
474
+ isActive: isSettingsActive,
475
+ size: 32
476
+ }
477
+ ),
478
+ /* @__PURE__ */ jsx("div", { style: { width: "36px", height: "36px", visibility: "hidden" }, "aria-hidden": "true" })
479
+ ] });
480
+ }
481
+ ActionButtons.displayName = "ActionButtons";
482
+ var statusColors = {
483
+ online: "#43B581",
484
+ idle: "#FAA61A",
485
+ busy: "#F04747",
486
+ offline: "#747F8D"
487
+ };
488
+ var Container5 = styled8.button`
489
+ display: flex;
490
+ align-items: center;
491
+ gap: 8px;
492
+ padding: 4px 6px;
493
+ border-radius: 4px;
494
+ border: none;
495
+ background: transparent;
496
+ color: inherit;
497
+ font: inherit;
498
+ transition: background-color 0.2s ease, opacity 0.2s ease;
499
+ cursor: ${(props) => props.$isDisabled ? "not-allowed" : "pointer"};
500
+ opacity: ${(props) => props.$isDisabled ? 0.5 : 1};
501
+ text-align: left;
502
+ width: 100%;
503
+
504
+ &:hover:not(:disabled) {
505
+ background-color: rgba(255, 255, 255, 0.05);
506
+ }
507
+
508
+ &:focus-visible {
509
+ outline: 2px solid #5865F2;
510
+ outline-offset: 2px;
511
+ }
512
+
513
+ &:active:not(:disabled) {
514
+ background-color: rgba(255, 255, 255, 0.08);
515
+ }
516
+ `;
517
+ var IconWrapper2 = styled8.div`
518
+ position: relative;
519
+ width: 32px;
520
+ height: 32px;
521
+ border-radius: 8px;
522
+ background-color: #36393f;
523
+ display: flex;
524
+ align-items: center;
525
+ justify-content: center;
526
+ flex-shrink: 0;
527
+ overflow: hidden;
528
+ `;
529
+ var WorkflowInfo = styled8.div`
530
+ display: flex;
531
+ flex-direction: column;
532
+ min-width: 0;
533
+ `;
534
+ var WorkflowName = styled8.span`
535
+ color: #ffffff;
536
+ font-size: 13px;
537
+ font-weight: 600;
538
+ line-height: 1.2;
539
+ overflow: hidden;
540
+ text-overflow: ellipsis;
541
+ white-space: nowrap;
542
+ `;
543
+ var WorkflowStatus = styled8.div`
544
+ display: flex;
545
+ align-items: center;
546
+ gap: 4px;
547
+ color: #b9bbbe;
548
+ font-size: 11px;
549
+ line-height: 1.2;
550
+ `;
551
+ var StatusIndicatorOuter = styled8.span`
552
+ position: absolute;
553
+ bottom: -2px;
554
+ right: -2px;
555
+ width: 10px;
556
+ height: 10px;
557
+ border-radius: 50%;
558
+ background-color: #232428;
559
+ display: flex;
560
+ align-items: center;
561
+ justify-content: center;
562
+ flex-shrink: 0;
563
+ `;
564
+ var StatusIndicatorInner = styled8.span`
565
+ width: 6px;
566
+ height: 6px;
567
+ border-radius: 50%;
568
+ background-color: ${({ $status }) => statusColors[$status]};
569
+ flex-shrink: 0;
570
+ `;
571
+ function WorkflowStatusCard({
572
+ icon,
573
+ workflowName,
574
+ status = "offline",
575
+ statusText,
576
+ className,
577
+ onClick,
578
+ onPress,
579
+ isDisabled,
580
+ ...ariaProps
581
+ }) {
582
+ const displayStatus = statusText || status;
583
+ const ref = useRef(null);
584
+ const handlePress = () => {
585
+ if (onClick) onClick();
586
+ if (onPress) onPress({});
587
+ };
588
+ const { buttonProps } = useButton(
589
+ {
590
+ ...ariaProps,
591
+ onPress: handlePress,
592
+ isDisabled,
593
+ "aria-label": ariaProps["aria-label"] || `${workflowName} workflow, status: ${displayStatus}`
594
+ },
595
+ ref
596
+ );
597
+ return /* @__PURE__ */ jsxs(Container5, { ...buttonProps, ref, className, $isDisabled: isDisabled, children: [
598
+ /* @__PURE__ */ jsxs(IconWrapper2, { children: [
599
+ icon,
600
+ /* @__PURE__ */ jsx(StatusIndicatorOuter, { $status: status, children: /* @__PURE__ */ jsx(StatusIndicatorInner, { $status: status }) })
601
+ ] }),
602
+ /* @__PURE__ */ jsxs(WorkflowInfo, { children: [
603
+ /* @__PURE__ */ jsx(WorkflowName, { children: workflowName }),
604
+ /* @__PURE__ */ jsx(WorkflowStatus, { children: displayStatus })
605
+ ] })
606
+ ] });
607
+ }
608
+ WorkflowStatusCard.displayName = "WorkflowStatusCard";
609
+ var BG_TERTIARY = "#36393F";
610
+ var TEXT_PRIMARY = "#FFFFFF";
611
+ var TEXT_SECONDARY = "#B9BBBE";
612
+ var TEXT_MUTED = "#72767D";
613
+ var ACCENT_COLOR = "#5865F2";
614
+ var HOVER_BG = "rgba(255, 255, 255, 0.05)";
615
+ var DarkNotificationCardContainer = styled8.div`
616
+ display: flex;
617
+ flex-direction: column;
618
+ padding: 6px;
619
+ background: ${BG_TERTIARY};
620
+ border-radius: 8px;
621
+ gap: 4px;
622
+ flex: 1;
623
+ min-width: 0;
624
+ overflow: hidden;
625
+ `;
626
+ var DarkSectionHeader = styled8.button`
627
+ display: flex;
628
+ align-items: center;
629
+ justify-content: space-between;
630
+ width: 100%;
631
+ padding: 4px 2px;
632
+ border: none;
633
+ background: transparent;
634
+ font-family: ${(props) => props.theme?.fonts?.body || "system-ui, sans-serif"};
635
+ font-size: 11px;
636
+ font-weight: 600;
637
+ color: ${TEXT_SECONDARY};
638
+ text-align: left;
639
+ cursor: pointer;
640
+ transition: all 0.2s ease;
641
+
642
+ &:hover {
643
+ color: ${TEXT_PRIMARY};
644
+ }
645
+
646
+ &:focus-visible {
647
+ outline: 2px solid ${ACCENT_COLOR};
648
+ outline-offset: 2px;
649
+ border-radius: 4px;
650
+ }
651
+ `;
652
+ var DarkChevronIcon = styled8.span`
653
+ display: inline-flex;
654
+ align-items: center;
655
+ justify-content: center;
656
+ transition: transform 0.2s ease;
657
+ color: ${TEXT_MUTED};
658
+
659
+ ${(props) => props.$isExpanded ? `
660
+ transform: rotate(0deg);
661
+ ` : `
662
+ transform: rotate(-90deg);
663
+ `}
664
+
665
+ svg {
666
+ width: 12px;
667
+ height: 12px;
668
+ }
669
+ `;
670
+ var DarkSectionContent = styled8.div`
671
+ display: flex;
672
+ flex-direction: column;
673
+ gap: 2px;
674
+ padding-left: 4px;
675
+ margin-top: 2px;
676
+ min-width: 0;
677
+ overflow: hidden;
678
+ `;
679
+ var DarkNotificationItemWrapper = styled8.button`
680
+ display: flex;
681
+ align-items: center;
682
+ gap: 6px;
683
+ width: 100%;
684
+ padding: 4px 6px;
685
+ border: none;
686
+ cursor: pointer;
687
+ text-align: left;
688
+ transition: all 0.2s ease;
689
+ border-radius: 4px;
690
+ min-width: 0;
691
+ overflow: hidden;
692
+
693
+ /* Default state - transparent background */
694
+ background-color: ${(props) => props.$isSelected ? ACCENT_COLOR : "transparent"};
695
+
696
+ /* Hover state */
697
+ &:hover:not(:disabled) {
698
+ background-color: ${(props) => props.$isSelected ? "#4752C4" : HOVER_BG};
699
+ }
700
+
701
+ /* Active state */
702
+ &:active:not(:disabled) {
703
+ transform: scale(0.99);
704
+ }
705
+
706
+ /* Focus state */
707
+ &:focus-visible {
708
+ outline: 2px solid ${ACCENT_COLOR};
709
+ outline-offset: 2px;
710
+ }
711
+
712
+ /* Disabled state */
713
+ &:disabled {
714
+ cursor: not-allowed;
715
+ opacity: 0.5;
716
+ }
717
+ `;
718
+ var DarkItemIcon = styled8.span`
719
+ display: inline-flex;
720
+ align-items: center;
721
+ justify-content: center;
722
+ width: 16px;
723
+ height: 16px;
724
+ flex-shrink: 0;
725
+ border-radius: ${(props) => props.$hasCustomIcon ? "4px" : "50%"};
726
+ background-color: ${(props) => props.$iconColor || "transparent"};
727
+ color: ${(props) => props.$hasCustomIcon ? TEXT_PRIMARY : TEXT_MUTED};
728
+ font-size: 12px;
729
+
730
+ /* Default circle icon styling */
731
+ ${(props) => !props.$hasCustomIcon && `
732
+ svg {
733
+ width: 14px;
734
+ height: 14px;
735
+ }
736
+ `}
737
+
738
+ /* Custom icon (emoji or colored icon) styling */
739
+ ${(props) => props.$hasCustomIcon && `
740
+ padding: 2px;
741
+ `}
742
+ `;
743
+ var DarkItemText = styled8.span`
744
+ flex: 1;
745
+ font-family: ${(props) => props.theme?.fonts?.body || "system-ui, sans-serif"};
746
+ font-size: 11px;
747
+ font-weight: ${(props) => props.$isSelected ? "500" : "400"};
748
+ color: ${(props) => props.$isSelected ? TEXT_PRIMARY : TEXT_SECONDARY};
749
+ line-height: 1.3;
750
+ word-wrap: break-word;
751
+ min-width: 0;
752
+ overflow: hidden;
753
+ text-overflow: ellipsis;
754
+ `;
755
+ var DarkMenuButton = styled8.button`
756
+ display: inline-flex;
757
+ align-items: center;
758
+ justify-content: center;
759
+ width: 20px;
760
+ height: 20px;
761
+ padding: 0;
762
+ border: none;
763
+ border-radius: 4px;
764
+ background-color: transparent;
765
+ color: ${TEXT_PRIMARY};
766
+ cursor: pointer;
767
+ transition: all 0.2s ease;
768
+ flex-shrink: 0;
769
+
770
+ &:hover:not(:disabled) {
771
+ background-color: rgba(255, 255, 255, 0.1);
772
+ }
773
+
774
+ &:active:not(:disabled) {
775
+ background-color: rgba(255, 255, 255, 0.15);
776
+ transform: scale(0.95);
777
+ }
778
+
779
+ &:focus-visible {
780
+ outline: 2px solid ${ACCENT_COLOR};
781
+ outline-offset: 2px;
782
+ }
783
+
784
+ svg {
785
+ width: 14px;
786
+ height: 14px;
787
+ }
788
+ `;
789
+ var DarkTimestamp = styled8.span`
790
+ font-size: 10px;
791
+ color: ${TEXT_MUTED};
792
+ white-space: normal;
793
+ word-wrap: break-word;
794
+ text-align: right;
795
+ max-width: 60px;
796
+ `;
797
+ var DarkNotificationCard = ({
798
+ sections,
799
+ onItemClick,
800
+ selectedItemId,
801
+ onMenuClick,
802
+ className,
803
+ "aria-label": ariaLabel = "Action log history"
804
+ }) => {
805
+ const [collapsedSections, setCollapsedSections] = useState(() => {
806
+ const initial = {};
807
+ for (const section of sections) {
808
+ initial[section.title] = section.isCollapsed || false;
809
+ }
810
+ return initial;
811
+ });
812
+ const toggleSection = (sectionTitle) => {
813
+ setCollapsedSections((prev) => ({
814
+ ...prev,
815
+ [sectionTitle]: !prev[sectionTitle]
816
+ }));
817
+ };
818
+ return /* @__PURE__ */ jsx(DarkNotificationCardContainer, { className, "aria-label": ariaLabel, role: "region", children: sections.map((section) => /* @__PURE__ */ jsx(
819
+ DarkSectionComponent,
820
+ {
821
+ section,
822
+ isCollapsed: collapsedSections[section.title] ?? false,
823
+ onToggle: () => toggleSection(section.title),
824
+ onItemClick,
825
+ selectedItemId,
826
+ onMenuClick
827
+ },
828
+ section.title
829
+ )) });
830
+ };
831
+ var DarkSectionComponent = ({
832
+ section,
833
+ isCollapsed,
834
+ onToggle,
835
+ onItemClick,
836
+ selectedItemId,
837
+ onMenuClick
838
+ }) => {
839
+ const headerRef = useRef(null);
840
+ const { buttonProps } = useButton(
841
+ {
842
+ onPress: onToggle,
843
+ "aria-label": `${section.title} section, ${isCollapsed ? "collapsed" : "expanded"}`,
844
+ "aria-expanded": !isCollapsed
845
+ },
846
+ headerRef
847
+ );
848
+ return /* @__PURE__ */ jsxs("section", { "aria-label": `${section.title} actions`, children: [
849
+ /* @__PURE__ */ jsxs(DarkSectionHeader, { ...buttonProps, ref: headerRef, children: [
850
+ section.title,
851
+ /* @__PURE__ */ jsx(DarkChevronIcon, { $isExpanded: !isCollapsed, "aria-hidden": "true", children: /* @__PURE__ */ jsxs(
852
+ "svg",
853
+ {
854
+ width: "14",
855
+ height: "14",
856
+ viewBox: "0 0 14 14",
857
+ fill: "none",
858
+ xmlns: "http://www.w3.org/2000/svg",
859
+ role: "img",
860
+ "aria-label": "Expand/collapse icon",
861
+ children: [
862
+ /* @__PURE__ */ jsx("title", { children: "Expand/collapse icon" }),
863
+ /* @__PURE__ */ jsx(
864
+ "path",
865
+ {
866
+ d: "M4 5L7 8L10 5",
867
+ stroke: "currentColor",
868
+ strokeWidth: "1.5",
869
+ strokeLinecap: "round",
870
+ strokeLinejoin: "round"
871
+ }
872
+ )
873
+ ]
874
+ }
875
+ ) })
876
+ ] }),
877
+ !isCollapsed && /* @__PURE__ */ jsx(DarkSectionContent, { role: "list", children: section.items.map((item) => /* @__PURE__ */ jsx(
878
+ DarkNotificationItemComponent,
879
+ {
880
+ item,
881
+ isSelected: item.id === selectedItemId,
882
+ onItemClick,
883
+ onMenuClick
884
+ },
885
+ item.id
886
+ )) })
887
+ ] });
888
+ };
889
+ var DarkNotificationItemComponent = ({
890
+ item,
891
+ isSelected,
892
+ onItemClick,
893
+ onMenuClick
894
+ }) => {
895
+ const itemRef = useRef(null);
896
+ const menuRef = useRef(null);
897
+ const { buttonProps: itemButtonProps } = useButton(
898
+ {
899
+ onPress: () => onItemClick?.(item),
900
+ "aria-label": `Action: ${item.text}`,
901
+ "aria-current": isSelected ? "true" : void 0
902
+ },
903
+ itemRef
904
+ );
905
+ const { buttonProps: menuButtonProps } = useButton(
906
+ {
907
+ onPress: () => onMenuClick?.(item),
908
+ "aria-label": `Options for ${item.text}`
909
+ },
910
+ menuRef
911
+ );
912
+ const handleItemKeyDown = (e) => {
913
+ if (isSelected && e.key === "Tab" && !e.shiftKey) {
914
+ return;
915
+ }
916
+ };
917
+ return /* @__PURE__ */ jsxs(
918
+ DarkNotificationItemWrapper,
919
+ {
920
+ ...itemButtonProps,
921
+ ref: itemRef,
922
+ $isSelected: isSelected,
923
+ $hasIcon: !!item.icon,
924
+ role: "listitem",
925
+ onKeyDown: handleItemKeyDown,
926
+ children: [
927
+ /* @__PURE__ */ jsx(DarkItemIcon, { $iconColor: item.iconColor, $hasCustomIcon: !!item.icon, children: item.icon || /* @__PURE__ */ jsx(
928
+ "svg",
929
+ {
930
+ width: "16",
931
+ height: "16",
932
+ viewBox: "0 0 16 16",
933
+ fill: "none",
934
+ xmlns: "http://www.w3.org/2000/svg",
935
+ "aria-hidden": "true",
936
+ children: /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "6", stroke: "currentColor", strokeWidth: "1.5" })
937
+ }
938
+ ) }),
939
+ /* @__PURE__ */ jsx(DarkItemText, { $isSelected: isSelected, children: item.text }),
940
+ item.timestamp && /* @__PURE__ */ jsx(DarkTimestamp, { children: item.timestamp }),
941
+ isSelected && onMenuClick && /* @__PURE__ */ jsx(
942
+ DarkMenuButton,
943
+ {
944
+ ...menuButtonProps,
945
+ ref: menuRef,
946
+ onClick: (e) => {
947
+ e.stopPropagation();
948
+ menuButtonProps.onClick?.(e);
949
+ },
950
+ children: /* @__PURE__ */ jsxs(
951
+ "svg",
952
+ {
953
+ width: "16",
954
+ height: "16",
955
+ viewBox: "0 0 16 16",
956
+ fill: "none",
957
+ xmlns: "http://www.w3.org/2000/svg",
958
+ "aria-hidden": "true",
959
+ children: [
960
+ /* @__PURE__ */ jsx("title", { children: "More options" }),
961
+ /* @__PURE__ */ jsx("circle", { cx: "8", cy: "3", r: "1", fill: "currentColor" }),
962
+ /* @__PURE__ */ jsx("circle", { cx: "8", cy: "8", r: "1", fill: "currentColor" }),
963
+ /* @__PURE__ */ jsx("circle", { cx: "8", cy: "13", r: "1", fill: "currentColor" })
964
+ ]
965
+ }
966
+ )
967
+ }
968
+ )
969
+ ]
970
+ }
971
+ );
972
+ };
973
+ DarkNotificationCard.displayName = "DarkNotificationCard";
974
+ var BG_PRIMARY = "#2F3136";
975
+ var BG_SECONDARY = "#202225";
976
+ var BG_TERTIARY2 = "#36393F";
977
+ var TEXT_PRIMARY2 = "#FFFFFF";
978
+ var TEXT_SECONDARY2 = "#B9BBBE";
979
+ var TEXT_MUTED2 = "#72767D";
980
+ var ACCENT_COLOR2 = "#5865F2";
981
+ var HOVER_BG2 = "rgba(255, 255, 255, 0.05)";
982
+ var Container6 = styled8.div`
983
+ width: 100%;
984
+ height: 100%;
985
+ background-color: ${BG_PRIMARY};
986
+ color: ${TEXT_PRIMARY2};
987
+ display: flex;
988
+ flex-direction: column;
989
+ font-family: ${(props) => props.theme?.fonts?.body || "system-ui, sans-serif"};
990
+ overflow: hidden; // Prevent content from escaping container bounds
991
+ `;
992
+ var TabListWrapper = styled8.div`
993
+ display: flex;
994
+ border-bottom: 2px solid ${BG_TERTIARY2};
995
+ background-color: ${BG_SECONDARY};
996
+ padding: 0 16px;
997
+ gap: 8px;
998
+ overflow-x: auto;
999
+ scrollbar-width: none;
1000
+ -ms-overflow-style: none;
1001
+ flex-shrink: 0; // Prevent shrinking when content overflows
1002
+
1003
+ &::-webkit-scrollbar {
1004
+ display: none;
1005
+ }
1006
+
1007
+ @media (max-width: 640px) {
1008
+ padding: 0 8px;
1009
+ gap: 4px;
1010
+ }
1011
+ `;
1012
+ var TabButton = styled8.button`
1013
+ padding: 12px 20px;
1014
+ background: none;
1015
+ border: none;
1016
+ color: ${(props) => props.$isSelected ? TEXT_PRIMARY2 : TEXT_SECONDARY2};
1017
+ font-size: 14px;
1018
+ font-weight: 600;
1019
+ cursor: pointer;
1020
+ position: relative;
1021
+ transition: color 0.2s ease;
1022
+ white-space: nowrap;
1023
+ flex-shrink: 0;
1024
+
1025
+ @media (max-width: 640px) {
1026
+ padding: 10px 12px;
1027
+ font-size: 12px;
1028
+ }
1029
+
1030
+ &:hover {
1031
+ color: ${TEXT_PRIMARY2};
1032
+ }
1033
+
1034
+ &:focus {
1035
+ outline: none;
1036
+ }
1037
+
1038
+ &:focus-visible {
1039
+ outline: 2px solid ${ACCENT_COLOR2};
1040
+ outline-offset: -2px;
1041
+ border-radius: 4px;
1042
+ }
1043
+
1044
+ ${(props) => props.$isSelected && `
1045
+ &::after {
1046
+ content: '';
1047
+ position: absolute;
1048
+ bottom: -2px;
1049
+ left: 0;
1050
+ right: 0;
1051
+ height: 2px;
1052
+ background-color: ${ACCENT_COLOR2};
1053
+ }
1054
+ `}
1055
+ `;
1056
+ var TabPanelWrapper = styled8.div`
1057
+ flex: 1;
1058
+ padding: 24px;
1059
+ overflow-y: auto;
1060
+ overflow-x: hidden; // Prevent horizontal overflow
1061
+ background-color: ${BG_PRIMARY};
1062
+ min-height: 0; // Enable proper flex shrinking and scrolling
1063
+
1064
+ @media (max-width: 640px) {
1065
+ padding: 16px;
1066
+ }
1067
+
1068
+ @media (max-width: 480px) {
1069
+ padding: 12px;
1070
+ }
1071
+
1072
+ /* Custom scrollbar */
1073
+ scrollbar-width: thin;
1074
+ scrollbar-color: ${BG_TERTIARY2} ${BG_PRIMARY};
1075
+
1076
+ &::-webkit-scrollbar {
1077
+ width: 8px;
1078
+ }
1079
+
1080
+ &::-webkit-scrollbar-track {
1081
+ background: ${BG_PRIMARY};
1082
+ }
1083
+
1084
+ &::-webkit-scrollbar-thumb {
1085
+ background: ${BG_TERTIARY2};
1086
+ border-radius: 4px;
1087
+ }
1088
+
1089
+ &::-webkit-scrollbar-thumb:hover {
1090
+ background: #4a4d52;
1091
+ }
1092
+ `;
1093
+ var RunsContainer = styled8.div`
1094
+ display: flex;
1095
+ flex-direction: column;
1096
+ gap: 20px;
1097
+ width: 100%;
1098
+ flex: 1;
1099
+ min-width: 0;
1100
+ overflow: hidden;
1101
+
1102
+ @media (max-width: 640px) {
1103
+ gap: 16px;
1104
+ }
1105
+ `;
1106
+ var BrowseButton = styled8.button`
1107
+ display: flex;
1108
+ align-items: center;
1109
+ gap: 12px;
1110
+ width: 100%;
1111
+ padding: 12px 16px;
1112
+ background-color: ${BG_SECONDARY};
1113
+ border: 1px solid ${BG_TERTIARY2};
1114
+ border-radius: 8px;
1115
+ color: ${TEXT_SECONDARY2};
1116
+ font-size: 14px;
1117
+ font-weight: 500;
1118
+ cursor: pointer;
1119
+ transition: all 0.2s ease;
1120
+ white-space: nowrap;
1121
+ overflow: hidden;
1122
+
1123
+ @media (max-width: 640px) {
1124
+ padding: 10px 12px;
1125
+ font-size: 13px;
1126
+ gap: 8px;
1127
+ }
1128
+
1129
+ &:hover {
1130
+ background-color: ${HOVER_BG2};
1131
+ color: ${TEXT_PRIMARY2};
1132
+ }
1133
+
1134
+ &:focus {
1135
+ outline: none;
1136
+ }
1137
+
1138
+ &:focus-visible {
1139
+ outline: 2px solid ${ACCENT_COLOR2};
1140
+ outline-offset: 2px;
1141
+ }
1142
+ `;
1143
+ var StyledDisclosureGroup = styled8(DisclosureGroup)`
1144
+ display: flex;
1145
+ flex-direction: column;
1146
+ gap: 8px;
1147
+ width: 100%;
1148
+ flex: 1;
1149
+ min-width: 0;
1150
+ overflow: hidden;
1151
+ `;
1152
+ var CategoryDisclosure = styled8(Disclosure)`
1153
+ background-color: transparent;
1154
+ display: flex;
1155
+ flex-direction: column;
1156
+ width: 100%;
1157
+ flex: 1;
1158
+ min-width: 0;
1159
+ overflow: hidden;
1160
+
1161
+ &[data-expanded] {
1162
+ /* Styles when expanded */
1163
+ }
1164
+
1165
+ &[data-disabled] {
1166
+ opacity: 0.5;
1167
+ cursor: not-allowed;
1168
+ }
1169
+ `;
1170
+ var CategoryHeader = styled8(Button)`
1171
+ width: 100%;
1172
+ padding: 4px 0;
1173
+ background: none;
1174
+ border: none;
1175
+ color: ${TEXT_SECONDARY2};
1176
+ display: flex;
1177
+ justify-content: space-between;
1178
+ align-items: center;
1179
+ cursor: pointer;
1180
+ transition: color 0.2s ease;
1181
+ font-size: 12px;
1182
+ font-weight: 600;
1183
+ text-transform: uppercase;
1184
+ letter-spacing: 0.5px;
1185
+
1186
+ &:hover {
1187
+ color: ${TEXT_PRIMARY2};
1188
+ }
1189
+
1190
+ &:focus {
1191
+ outline: none;
1192
+ }
1193
+
1194
+ &[data-focus-visible] {
1195
+ outline: 2px solid ${ACCENT_COLOR2};
1196
+ outline-offset: 2px;
1197
+ border-radius: 4px;
1198
+ }
1199
+ `;
1200
+ var CategoryTitle = styled8.div`
1201
+ display: flex;
1202
+ align-items: center;
1203
+ gap: 8px;
1204
+
1205
+ @media (max-width: 640px) {
1206
+ gap: 6px;
1207
+ }
1208
+ `;
1209
+ styled8.img`
1210
+ width: 16px;
1211
+ height: 16px;
1212
+ opacity: 0.6;
1213
+ flex-shrink: 0;
1214
+
1215
+ @media (max-width: 640px) {
1216
+ width: 14px;
1217
+ height: 14px;
1218
+ }
1219
+ `;
1220
+ var HashtagIcon = styled8.img`
1221
+ width: 14px;
1222
+ height: 14px;
1223
+ opacity: 0.6;
1224
+ flex-shrink: 0;
1225
+
1226
+ @media (max-width: 640px) {
1227
+ width: 12px;
1228
+ height: 12px;
1229
+ }
1230
+ `;
1231
+ var ChevronIcon = styled8.div`
1232
+ display: flex;
1233
+ align-items: center;
1234
+ transition: transform 0.2s ease;
1235
+ transform: ${(props) => props.$isExpanded ? "rotate(0deg)" : "rotate(-90deg)"};
1236
+ flex-shrink: 0;
1237
+ margin-left: 4px;
1238
+
1239
+ img {
1240
+ width: 16px;
1241
+ height: 16px;
1242
+ opacity: 0.6;
1243
+ }
1244
+
1245
+ @media (max-width: 640px) {
1246
+ img {
1247
+ width: 14px;
1248
+ height: 14px;
1249
+ }
1250
+ }
1251
+ `;
1252
+ var CategoryDisclosurePanel = styled8(DisclosurePanel)`
1253
+ display: flex;
1254
+ flex-direction: column;
1255
+ gap: 2px;
1256
+ padding-left: 4px;
1257
+ width: 100%;
1258
+ flex: 1;
1259
+ min-width: 0;
1260
+ overflow: hidden;
1261
+
1262
+ @media (max-width: 640px) {
1263
+ padding-left: 2px;
1264
+ }
1265
+
1266
+ &[data-entering] {
1267
+ animation: slideDown 0.2s ease;
1268
+ }
1269
+
1270
+ @keyframes slideDown {
1271
+ from {
1272
+ opacity: 0;
1273
+ transform: translateY(-8px);
1274
+ }
1275
+ to {
1276
+ opacity: 1;
1277
+ transform: translateY(0);
1278
+ }
1279
+ }
1280
+ `;
1281
+ var ItemContainer = styled8.div`
1282
+ display: flex;
1283
+ align-items: center;
1284
+ gap: 8px;
1285
+ padding: 4px 8px;
1286
+ border-radius: 4px;
1287
+ cursor: pointer;
1288
+ transition: background-color 0.1s ease;
1289
+ min-width: 0;
1290
+ overflow: hidden;
1291
+
1292
+ @media (max-width: 640px) {
1293
+ gap: 6px;
1294
+ padding: 4px 6px;
1295
+ }
1296
+
1297
+ &:hover {
1298
+ background-color: ${HOVER_BG2};
1299
+ }
1300
+ `;
1301
+ var ItemDisclosure = styled8(Disclosure)`
1302
+ background-color: transparent;
1303
+ margin-bottom: 4px;
1304
+ display: flex;
1305
+ flex-direction: column;
1306
+ width: 100%;
1307
+ flex: 1;
1308
+ min-width: 0;
1309
+ overflow: hidden;
1310
+
1311
+ &[data-expanded] {
1312
+ background-color: ${BG_SECONDARY};
1313
+ border-radius: 8px;
1314
+ }
1315
+ `;
1316
+ var ItemHeader = styled8(Button)`
1317
+ width: 100%;
1318
+ padding: 0;
1319
+ background: none;
1320
+ border: none;
1321
+ cursor: pointer;
1322
+ transition: all 0.1s ease;
1323
+
1324
+ &:focus {
1325
+ outline: none;
1326
+ }
1327
+
1328
+ &[data-focus-visible] {
1329
+ outline: 2px solid ${ACCENT_COLOR2};
1330
+ outline-offset: 2px;
1331
+ border-radius: 4px;
1332
+ }
1333
+ `;
1334
+ var ItemDisclosurePanel = styled8(DisclosurePanel)`
1335
+ padding: 6px;
1336
+ background-color: ${BG_SECONDARY};
1337
+ border-radius: 0 0 8px 8px;
1338
+ margin-top: -4px;
1339
+ display: flex;
1340
+ flex-direction: column;
1341
+ flex: 1;
1342
+ min-width: 0;
1343
+ overflow: hidden;
1344
+
1345
+ @media (max-width: 640px) {
1346
+ padding: 6px;
1347
+ }
1348
+
1349
+ &[data-entering] {
1350
+ animation: slideDown 0.2s ease;
1351
+ }
1352
+
1353
+ @keyframes slideDown {
1354
+ from {
1355
+ opacity: 0;
1356
+ transform: translateY(-8px);
1357
+ }
1358
+ to {
1359
+ opacity: 1;
1360
+ transform: translateY(0);
1361
+ }
1362
+ }
1363
+ `;
1364
+ var ItemIcon = styled8.img`
1365
+ width: 20px;
1366
+ height: 20px;
1367
+ opacity: 0.6;
1368
+ flex-shrink: 0;
1369
+
1370
+ @media (max-width: 640px) {
1371
+ width: 18px;
1372
+ height: 18px;
1373
+ }
1374
+ `;
1375
+ var ItemName = styled8.span`
1376
+ flex: 1;
1377
+ font-size: 14px;
1378
+ color: ${(props) => props.$dimmed ? TEXT_MUTED2 : TEXT_SECONDARY2};
1379
+ font-weight: ${(props) => props.$dimmed ? "normal" : "500"};
1380
+ overflow: hidden;
1381
+ text-overflow: ellipsis;
1382
+ white-space: nowrap;
1383
+ min-width: 0;
1384
+
1385
+ @media (max-width: 640px) {
1386
+ font-size: 13px;
1387
+ }
1388
+
1389
+ ${ItemContainer}:hover & {
1390
+ color: ${(props) => props.$dimmed ? TEXT_SECONDARY2 : TEXT_PRIMARY2};
1391
+ }
1392
+ `;
1393
+ var RunStatus = styled8.span`
1394
+ font-size: 14px;
1395
+ font-weight: 500;
1396
+ flex-shrink: 0;
1397
+ margin-left: auto;
1398
+ color: ${(props) => {
1399
+ switch (props.$status) {
1400
+ case "completed":
1401
+ return "#10b981";
1402
+ // green
1403
+ case "running":
1404
+ return "#f59e0b";
1405
+ // yellow
1406
+ case "failed":
1407
+ return "#ef4444";
1408
+ // red
1409
+ default:
1410
+ return TEXT_SECONDARY2;
1411
+ }
1412
+ }};
1413
+
1414
+ @media (max-width: 640px) {
1415
+ font-size: 12px;
1416
+ }
1417
+ `;
1418
+ styled8.div`
1419
+ margin-bottom: 12px;
1420
+ border-radius: 12px;
1421
+ background-color: ${BG_SECONDARY};
1422
+ overflow: hidden;
1423
+ `;
1424
+ styled8.button`
1425
+ width: 100%;
1426
+ padding: 16px;
1427
+ background: ${BG_SECONDARY};
1428
+ border: none;
1429
+ color: ${TEXT_PRIMARY2};
1430
+ display: flex;
1431
+ justify-content: space-between;
1432
+ align-items: center;
1433
+ cursor: pointer;
1434
+ transition: background-color 0.2s ease;
1435
+ text-align: left;
1436
+
1437
+ &:hover {
1438
+ background-color: ${HOVER_BG2};
1439
+ }
1440
+
1441
+ &:focus {
1442
+ outline: none;
1443
+ }
1444
+
1445
+ &:focus-visible {
1446
+ outline: 2px solid ${ACCENT_COLOR2};
1447
+ outline-offset: -2px;
1448
+ }
1449
+
1450
+ > div {
1451
+ flex: 1;
1452
+ }
1453
+
1454
+ strong {
1455
+ display: block;
1456
+ font-size: 14px;
1457
+ margin-bottom: 4px;
1458
+ }
1459
+ `;
1460
+ styled8.span`
1461
+ font-size: 12px;
1462
+ color: ${TEXT_SECONDARY2};
1463
+ transition: transform 0.2s ease;
1464
+ transform: ${(props) => props.$isExpanded ? "rotate(180deg)" : "rotate(0deg)"};
1465
+ `;
1466
+ styled8.div`
1467
+ padding: 16px;
1468
+ padding-top: 0;
1469
+ background-color: ${BG_TERTIARY2};
1470
+ color: ${TEXT_SECONDARY2};
1471
+ font-size: 13px;
1472
+ line-height: 1.6;
1473
+ animation: slideDown 0.2s ease;
1474
+
1475
+ @keyframes slideDown {
1476
+ from {
1477
+ opacity: 0;
1478
+ transform: translateY(-8px);
1479
+ }
1480
+ to {
1481
+ opacity: 1;
1482
+ transform: translateY(0);
1483
+ }
1484
+ }
1485
+ `;
1486
+ var MeterContainer = styled8.div`
1487
+ max-width: 600px;
1488
+ margin: 0 auto;
1489
+ `;
1490
+ var MeterLabel = styled8.div`
1491
+ font-size: 16px;
1492
+ font-weight: 600;
1493
+ margin-bottom: 16px;
1494
+ color: ${TEXT_PRIMARY2};
1495
+ `;
1496
+ var MeterBar = styled8.div`
1497
+ width: 100%;
1498
+ height: 24px;
1499
+ background-color: ${BG_SECONDARY};
1500
+ border-radius: 12px;
1501
+ overflow: hidden;
1502
+ position: relative;
1503
+ margin-bottom: 12px;
1504
+ `;
1505
+ var MeterFill = styled8.div`
1506
+ height: 100%;
1507
+ width: ${(props) => props.$percentage}%;
1508
+ background: linear-gradient(90deg, ${(props) => props.$color}dd, ${(props) => props.$color});
1509
+ border-radius: 12px;
1510
+ transition: width 0.3s ease, background 0.3s ease;
1511
+ position: relative;
1512
+
1513
+ &::after {
1514
+ content: '';
1515
+ position: absolute;
1516
+ top: 0;
1517
+ left: 0;
1518
+ right: 0;
1519
+ bottom: 0;
1520
+ background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
1521
+ animation: shimmer 2s infinite;
1522
+ }
1523
+
1524
+ @keyframes shimmer {
1525
+ 0% {
1526
+ transform: translateX(-100%);
1527
+ }
1528
+ 100% {
1529
+ transform: translateX(100%);
1530
+ }
1531
+ }
1532
+ `;
1533
+ var MeterStats = styled8.div`
1534
+ font-size: 14px;
1535
+ color: ${TEXT_SECONDARY2};
1536
+ text-align: center;
1537
+
1538
+ small {
1539
+ font-size: 12px;
1540
+ color: ${TEXT_SECONDARY2};
1541
+ opacity: 0.8;
1542
+ }
1543
+ `;
1544
+ var ConnectionsContainer = styled8.div`
1545
+ max-width: 500px;
1546
+ margin: 0 auto;
1547
+ text-align: center;
1548
+ `;
1549
+ var ConnectionDescription = styled8.p`
1550
+ font-size: 14px;
1551
+ color: ${TEXT_SECONDARY2};
1552
+ line-height: 1.6;
1553
+ margin-bottom: 24px;
1554
+ `;
1555
+ var GoogleButton = styled8.button`
1556
+ width: 100%;
1557
+ padding: 16px 24px;
1558
+ font-size: 15px;
1559
+ font-weight: 600;
1560
+ color: ${(props) => props.$isConnected ? TEXT_PRIMARY2 : "#FFFFFF"};
1561
+ background: ${(props) => props.$isConnected ? BG_TERTIARY2 : "linear-gradient(135deg, #4285F4, #34A853)"};
1562
+ border: none;
1563
+ border-radius: 8px;
1564
+ cursor: pointer;
1565
+ transition: all 0.2s ease;
1566
+ display: flex;
1567
+ align-items: center;
1568
+ justify-content: center;
1569
+ gap: 8px;
1570
+
1571
+ &:hover {
1572
+ transform: translateY(-2px);
1573
+ box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
1574
+ }
1575
+
1576
+ &:active {
1577
+ transform: translateY(0);
1578
+ }
1579
+
1580
+ &:focus {
1581
+ outline: none;
1582
+ }
1583
+
1584
+ &:focus-visible {
1585
+ outline: 2px solid ${ACCENT_COLOR2};
1586
+ outline-offset: 2px;
1587
+ }
1588
+
1589
+ ${(props) => props.$isConnected && `
1590
+ &:hover {
1591
+ background-color: #ef4444;
1592
+ box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
1593
+ }
1594
+ `}
1595
+ `;
1596
+ var ICONS = {
1597
+ hashtag: "/assets/icon-set/Icon-hashtag.svg",
1598
+ bell: "/assets/icon-set/Icon-bell-fill.svg",
1599
+ file: "/assets/icon-set/Icon-file-3-fill.svg",
1600
+ link: "/assets/icon-set/Icon-external-link-fill.svg",
1601
+ chat: "/assets/icon-set/Icon-chat-1-fill.svg",
1602
+ community: "/assets/icon-set/Icon-community-fill.svg",
1603
+ cpu: "/assets/icon-set/Icon-cpu-fill.svg",
1604
+ chevronDown: "/assets/icon-set/Icon-arrow-down-s-fill.svg",
1605
+ warning: "/assets/icon-set/Icon-error-warning-fill.svg"
1606
+ };
1607
+ function ItemWithLogs({ run }) {
1608
+ const [isExpanded, setIsExpanded] = useState(false);
1609
+ const logSections = run.logs ? [
1610
+ {
1611
+ title: "Action History",
1612
+ items: run.logs.map((log) => ({
1613
+ id: log.id,
1614
+ text: log.text,
1615
+ icon: log.icon,
1616
+ iconColor: log.iconColor,
1617
+ timestamp: log.timestamp
1618
+ }))
1619
+ }
1620
+ ] : [];
1621
+ return /* @__PURE__ */ jsxs(ItemDisclosure, { id: run.id, children: [
1622
+ /* @__PURE__ */ jsx(
1623
+ ItemHeader,
1624
+ {
1625
+ slot: "trigger",
1626
+ onClick: () => setIsExpanded(!isExpanded),
1627
+ $isExpanded: isExpanded,
1628
+ children: /* @__PURE__ */ jsxs(ItemContainer, { as: "div", children: [
1629
+ /* @__PURE__ */ jsx(ItemIcon, { src: ICONS[run.icon || "bell"], alt: "" }),
1630
+ /* @__PURE__ */ jsx(ItemName, { children: run.name }),
1631
+ /* @__PURE__ */ jsxs(RunStatus, { $status: run.status, children: [
1632
+ run.status === "completed" && "\u2713",
1633
+ run.status === "running" && "\u27F3",
1634
+ run.status === "failed" && "\u2715"
1635
+ ] }),
1636
+ /* @__PURE__ */ jsx(ChevronIcon, { $isExpanded: isExpanded, children: /* @__PURE__ */ jsx("img", { src: ICONS.chevronDown, alt: "" }) })
1637
+ ] })
1638
+ }
1639
+ ),
1640
+ isExpanded && /* @__PURE__ */ jsx(ItemDisclosurePanel, { children: run.logs && run.logs.length > 0 ? /* @__PURE__ */ jsx(DarkNotificationCard, { sections: logSections }) : /* @__PURE__ */ jsx("div", { style: { color: "#72767D", fontSize: "13px", padding: "8px" }, children: "No action logs available" }) })
1641
+ ] });
1642
+ }
1643
+ function RunsTabContent({
1644
+ runs,
1645
+ onBrowseAutomations
1646
+ }) {
1647
+ const [expandedKeys, setExpandedKeys] = useState(
1648
+ /* @__PURE__ */ new Set(["scheduled", "completed", "issues"])
1649
+ // All sections open by default
1650
+ );
1651
+ const scheduledRuns = runs.filter((r) => r.category === "scheduled");
1652
+ const completedRuns = runs.filter((r) => r.category === "completed");
1653
+ const issuesRuns = runs.filter((r) => r.category === "issues");
1654
+ const buttonRef = useRef(null);
1655
+ const { buttonProps } = useButton(
1656
+ {
1657
+ onPress: onBrowseAutomations
1658
+ },
1659
+ buttonRef
1660
+ );
1661
+ return /* @__PURE__ */ jsxs(RunsContainer, { children: [
1662
+ /* @__PURE__ */ jsxs(BrowseButton, { ...buttonProps, ref: buttonRef, children: [
1663
+ /* @__PURE__ */ jsx(ItemIcon, { src: ICONS.cpu, alt: "" }),
1664
+ /* @__PURE__ */ jsx("span", { children: "Browse Automations" })
1665
+ ] }),
1666
+ /* @__PURE__ */ jsxs(
1667
+ StyledDisclosureGroup,
1668
+ {
1669
+ expandedKeys,
1670
+ onExpandedChange: setExpandedKeys,
1671
+ allowsMultipleExpanded: true,
1672
+ "aria-label": "Run sections",
1673
+ children: [
1674
+ /* @__PURE__ */ jsxs(CategoryDisclosure, { id: "scheduled", children: [
1675
+ /* @__PURE__ */ jsx(Heading, { level: 3, children: /* @__PURE__ */ jsxs(CategoryHeader, { slot: "trigger", children: [
1676
+ /* @__PURE__ */ jsxs(CategoryTitle, { children: [
1677
+ /* @__PURE__ */ jsx(HashtagIcon, { src: ICONS.hashtag, alt: "" }),
1678
+ /* @__PURE__ */ jsx("span", { children: "SCHEDULED" })
1679
+ ] }),
1680
+ /* @__PURE__ */ jsx(ChevronIcon, { $isExpanded: expandedKeys.has("scheduled"), children: /* @__PURE__ */ jsx("img", { src: ICONS.chevronDown, alt: "" }) })
1681
+ ] }) }),
1682
+ /* @__PURE__ */ jsx(CategoryDisclosurePanel, { children: scheduledRuns.length > 0 ? scheduledRuns.map((run) => /* @__PURE__ */ jsx(ItemWithLogs, { run }, run.id)) : /* @__PURE__ */ jsx(ItemContainer, { children: /* @__PURE__ */ jsx(ItemName, { $dimmed: true, children: "No scheduled items" }) }) })
1683
+ ] }),
1684
+ /* @__PURE__ */ jsxs(CategoryDisclosure, { id: "completed", children: [
1685
+ /* @__PURE__ */ jsx(Heading, { level: 3, children: /* @__PURE__ */ jsxs(CategoryHeader, { slot: "trigger", children: [
1686
+ /* @__PURE__ */ jsxs(CategoryTitle, { children: [
1687
+ /* @__PURE__ */ jsx(HashtagIcon, { src: ICONS.hashtag, alt: "" }),
1688
+ /* @__PURE__ */ jsx("span", { children: "COMPLETED" })
1689
+ ] }),
1690
+ /* @__PURE__ */ jsx(ChevronIcon, { $isExpanded: expandedKeys.has("completed"), children: /* @__PURE__ */ jsx("img", { src: ICONS.chevronDown, alt: "" }) })
1691
+ ] }) }),
1692
+ /* @__PURE__ */ jsx(CategoryDisclosurePanel, { children: completedRuns.length > 0 ? completedRuns.map((run) => /* @__PURE__ */ jsx(ItemWithLogs, { run }, run.id)) : /* @__PURE__ */ jsx(ItemContainer, { children: /* @__PURE__ */ jsx(ItemName, { $dimmed: true, children: "No completed items" }) }) })
1693
+ ] }),
1694
+ /* @__PURE__ */ jsxs(CategoryDisclosure, { id: "issues", children: [
1695
+ /* @__PURE__ */ jsx(Heading, { level: 3, children: /* @__PURE__ */ jsxs(CategoryHeader, { slot: "trigger", children: [
1696
+ /* @__PURE__ */ jsxs(CategoryTitle, { children: [
1697
+ /* @__PURE__ */ jsx(HashtagIcon, { src: ICONS.hashtag, alt: "" }),
1698
+ /* @__PURE__ */ jsx("span", { children: "ISSUES" })
1699
+ ] }),
1700
+ /* @__PURE__ */ jsx(ChevronIcon, { $isExpanded: expandedKeys.has("issues"), children: /* @__PURE__ */ jsx("img", { src: ICONS.chevronDown, alt: "" }) })
1701
+ ] }) }),
1702
+ /* @__PURE__ */ jsx(CategoryDisclosurePanel, { children: issuesRuns.length > 0 ? issuesRuns.map((run) => /* @__PURE__ */ jsx(ItemWithLogs, { run }, run.id)) : /* @__PURE__ */ jsx(ItemContainer, { children: /* @__PURE__ */ jsx(ItemName, { $dimmed: true, children: "No issues" }) }) })
1703
+ ] })
1704
+ ]
1705
+ }
1706
+ )
1707
+ ] });
1708
+ }
1709
+ function UsageTabContent({
1710
+ currentUsage = 0,
1711
+ maxUsage = 1e5
1712
+ }) {
1713
+ const ref = useRef(null);
1714
+ const { meterProps, labelProps } = useMeter({
1715
+ label: "Token Usage",
1716
+ value: currentUsage,
1717
+ minValue: 0,
1718
+ maxValue: maxUsage
1719
+ });
1720
+ const percentage = Math.round(currentUsage / maxUsage * 100);
1721
+ let color = "#10b981";
1722
+ if (percentage >= 75)
1723
+ color = "#ef4444";
1724
+ else if (percentage >= 50) color = "#f59e0b";
1725
+ return /* @__PURE__ */ jsxs(MeterContainer, { children: [
1726
+ /* @__PURE__ */ jsx(MeterLabel, { ...labelProps, children: "Token Usage" }),
1727
+ /* @__PURE__ */ jsx(MeterBar, { ...meterProps, ref, children: /* @__PURE__ */ jsx(MeterFill, { $percentage: percentage, $color: color }) }),
1728
+ /* @__PURE__ */ jsxs(MeterStats, { children: [
1729
+ percentage,
1730
+ "% of ",
1731
+ maxUsage.toLocaleString(),
1732
+ " tokens used",
1733
+ /* @__PURE__ */ jsx("br", {}),
1734
+ /* @__PURE__ */ jsxs("small", { children: [
1735
+ currentUsage.toLocaleString(),
1736
+ " / ",
1737
+ maxUsage.toLocaleString(),
1738
+ " tokens"
1739
+ ] })
1740
+ ] })
1741
+ ] });
1742
+ }
1743
+ function ConnectionsTabContent({
1744
+ isGoogleConnected = false,
1745
+ onGoogleConnect,
1746
+ onGoogleDisconnect
1747
+ }) {
1748
+ const ref = useRef(null);
1749
+ const { buttonProps } = useButton(
1750
+ {
1751
+ onPress: isGoogleConnected ? onGoogleDisconnect : onGoogleConnect
1752
+ },
1753
+ ref
1754
+ );
1755
+ return /* @__PURE__ */ jsxs(ConnectionsContainer, { children: [
1756
+ /* @__PURE__ */ jsx(ConnectionDescription, { children: isGoogleConnected ? "Your Google account is connected. You can access Google services and data." : "Connect your Google account to access Google services and integrate with your workflows." }),
1757
+ /* @__PURE__ */ jsx(GoogleButton, { ...buttonProps, ref, $isConnected: isGoogleConnected, children: isGoogleConnected ? "\u2713 Disconnect from Google" : "Connect with Google" })
1758
+ ] });
1759
+ }
1760
+ function Tab({ item, state }) {
1761
+ const ref = useRef(null);
1762
+ const { tabProps } = useTab({ key: item.key }, state, ref);
1763
+ return /* @__PURE__ */ jsx(TabButton, { ...tabProps, ref, $isSelected: state.selectedKey === item.key, children: item.rendered });
1764
+ }
1765
+ function TabList({
1766
+ state,
1767
+ ...props
1768
+ }) {
1769
+ const ref = useRef(null);
1770
+ const { tabListProps } = useTabList(props, state, ref);
1771
+ return /* @__PURE__ */ jsx(TabListWrapper, { ...tabListProps, ref, children: [...state.collection].map((item) => /* @__PURE__ */ jsx(Tab, { item, state }, item.key)) });
1772
+ }
1773
+ function TabPanel({
1774
+ state,
1775
+ ...props
1776
+ }) {
1777
+ const ref = useRef(null);
1778
+ const { tabPanelProps } = useTabPanel(props, state, ref);
1779
+ return /* @__PURE__ */ jsx(TabPanelWrapper, { ...tabPanelProps, ref, children: state.selectedItem?.props.children });
1780
+ }
1781
+ function PaneMenus({
1782
+ activeTab = "runs",
1783
+ onTabChange,
1784
+ runs = [],
1785
+ currentUsage = 0,
1786
+ maxUsage = 1e5,
1787
+ isGoogleConnected = false,
1788
+ onGoogleConnect,
1789
+ onGoogleDisconnect,
1790
+ onBrowseAutomations
1791
+ }) {
1792
+ const state = useTabListState({
1793
+ defaultSelectedKey: activeTab,
1794
+ onSelectionChange: (key) => {
1795
+ if (onTabChange) {
1796
+ onTabChange(key);
1797
+ }
1798
+ },
1799
+ children: /* @__PURE__ */ jsxs(Fragment, { children: [
1800
+ /* @__PURE__ */ jsx(Item, { title: "Runs", children: /* @__PURE__ */ jsx(RunsTabContent, { runs, onBrowseAutomations }) }, "runs"),
1801
+ /* @__PURE__ */ jsx(Item, { title: "Usage", children: /* @__PURE__ */ jsx(UsageTabContent, { currentUsage, maxUsage }) }, "usage"),
1802
+ /* @__PURE__ */ jsx(Item, { title: "Connections", children: /* @__PURE__ */ jsx(
1803
+ ConnectionsTabContent,
1804
+ {
1805
+ isGoogleConnected,
1806
+ onGoogleConnect,
1807
+ onGoogleDisconnect
1808
+ }
1809
+ ) }, "connections")
1810
+ ] })
1811
+ });
1812
+ return /* @__PURE__ */ jsxs(Container6, { children: [
1813
+ /* @__PURE__ */ jsx(TabList, { state, "aria-label": "Main pane menu" }),
1814
+ /* @__PURE__ */ jsx(TabPanel, { state }, state.selectedItem?.key)
1815
+ ] });
1816
+ }
1817
+ var HEADER_BG = "#202225";
1818
+ var HEADER_BG_DARK = "#18191c";
1819
+ var BUTTON_BG = "#36393f";
1820
+ var BUTTON_BG_HOVER = "#40444b";
1821
+ var breakpoints = {
1822
+ xs: "640px",
1823
+ sm: "768px",
1824
+ md: "1024px",
1825
+ lg: "1280px"
1826
+ };
1827
+ var Container7 = styled8.header`
1828
+ position: relative;
1829
+ width: 100%;
1830
+ height: 56px;
1831
+ background-color: ${HEADER_BG};
1832
+ overflow: hidden;
1833
+ display: flex;
1834
+ align-items: center;
1835
+ justify-content: center;
1836
+
1837
+ /* Background pattern - responsive sizes */
1838
+ &::before {
1839
+ content: '';
1840
+ position: absolute;
1841
+ top: 0;
1842
+ left: 0;
1843
+ right: 0;
1844
+ bottom: 0;
1845
+ background-image: url('/assets/bg-set/pattern/Size=xs, Type=Waves Rays2.svg');
1846
+ background-size: cover;
1847
+ background-position: center;
1848
+ background-repeat: no-repeat;
1849
+ opacity: 0.6;
1850
+ z-index: 0;
1851
+ }
1852
+
1853
+ /* Small screens */
1854
+ @media (min-width: ${breakpoints.xs}) {
1855
+ &::before {
1856
+ background-image: url('/assets/bg-set/pattern/Size=sm, Type=Waves Rays2.svg');
1857
+ }
1858
+ }
1859
+
1860
+ /* Medium screens */
1861
+ @media (min-width: ${breakpoints.sm}) {
1862
+ height: 64px;
1863
+
1864
+ &::before {
1865
+ background-image: url('/assets/bg-set/pattern/Size=md, Type=Waves Rays2.svg');
1866
+ }
1867
+ }
1868
+
1869
+ /* Large screens */
1870
+ @media (min-width: ${breakpoints.md}) {
1871
+ &::before {
1872
+ background-image: url('/assets/bg-set/pattern/Size=lg, Type=Waves Rays2.svg');
1873
+ }
1874
+ }
1875
+
1876
+ /* Extra large screens */
1877
+ @media (min-width: ${breakpoints.lg}) {
1878
+ &::before {
1879
+ background-image: url('/assets/bg-set/pattern/Size=xl, Type=Waves Rays2.svg');
1880
+ }
1881
+ }
1882
+
1883
+ /* Dark theme support */
1884
+ @media (prefers-color-scheme: dark) {
1885
+ background-color: ${HEADER_BG_DARK};
1886
+ }
1887
+ `;
1888
+ var BrandLogo = styled8.img`
1889
+ position: relative;
1890
+ z-index: 1;
1891
+ max-height: 28px;
1892
+ height: auto;
1893
+ width: auto;
1894
+ object-fit: contain;
1895
+ pointer-events: none;
1896
+ user-select: none;
1897
+
1898
+ /* Slightly larger on desktop */
1899
+ @media (min-width: ${breakpoints.sm}) {
1900
+ max-height: 32px;
1901
+ }
1902
+ `;
1903
+ var SettingsButton = styled8.button`
1904
+ position: absolute;
1905
+ top: 50%;
1906
+ right: 12px;
1907
+ transform: translateY(-50%);
1908
+ z-index: 2;
1909
+
1910
+ /* Button appearance */
1911
+ width: 40px;
1912
+ height: 40px;
1913
+ border-radius: 50%;
1914
+ border: none;
1915
+ background-color: ${BUTTON_BG};
1916
+ cursor: pointer;
1917
+
1918
+ /* Center the icon */
1919
+ display: flex;
1920
+ align-items: center;
1921
+ justify-content: center;
1922
+
1923
+ /* Smooth transitions */
1924
+ transition: background-color 0.2s ease, transform 0.1s ease;
1925
+
1926
+ /* Hover state */
1927
+ &:hover {
1928
+ background-color: ${BUTTON_BG_HOVER};
1929
+ }
1930
+
1931
+ /* Active state */
1932
+ &:active {
1933
+ transform: translateY(-50%) scale(0.95);
1934
+ }
1935
+
1936
+ /* Focus visible state for accessibility */
1937
+ &:focus-visible {
1938
+ outline: 2px solid #5865f2;
1939
+ outline-offset: 2px;
1940
+ }
1941
+
1942
+ /* Disabled state */
1943
+ &:disabled {
1944
+ opacity: 0.5;
1945
+ cursor: not-allowed;
1946
+ }
1947
+
1948
+ /* Responsive positioning */
1949
+ @media (min-width: ${breakpoints.sm}) {
1950
+ right: 16px;
1951
+ }
1952
+
1953
+ @media (min-width: ${breakpoints.md}) {
1954
+ right: 24px;
1955
+ }
1956
+ `;
1957
+ var BackButton2 = styled8.button`
1958
+ position: absolute;
1959
+ top: 50%;
1960
+ left: 12px;
1961
+ transform: translateY(-50%);
1962
+ z-index: 2;
1963
+
1964
+ /* Button appearance */
1965
+ width: 40px;
1966
+ height: 40px;
1967
+ border-radius: 50%;
1968
+ border: none;
1969
+ background-color: ${BUTTON_BG};
1970
+ cursor: pointer;
1971
+
1972
+ /* Center the icon */
1973
+ display: flex;
1974
+ align-items: center;
1975
+ justify-content: center;
1976
+
1977
+ /* Smooth transitions */
1978
+ transition: background-color 0.2s ease, transform 0.1s ease;
1979
+
1980
+ /* Hover state */
1981
+ &:hover {
1982
+ background-color: ${BUTTON_BG_HOVER};
1983
+ }
1984
+
1985
+ /* Active state */
1986
+ &:active {
1987
+ transform: translateY(-50%) scale(0.95);
1988
+ }
1989
+
1990
+ /* Focus visible state for accessibility */
1991
+ &:focus-visible {
1992
+ outline: 2px solid #5865f2;
1993
+ outline-offset: 2px;
1994
+ }
1995
+
1996
+ /* Disabled state */
1997
+ &:disabled {
1998
+ opacity: 0.5;
1999
+ cursor: not-allowed;
2000
+ }
2001
+
2002
+ /* Responsive positioning */
2003
+ @media (min-width: ${breakpoints.sm}) {
2004
+ left: 16px;
2005
+ }
2006
+
2007
+ @media (min-width: ${breakpoints.md}) {
2008
+ left: 24px;
2009
+ }
2010
+ `;
2011
+ function PaneSectionHeader({
2012
+ brand = "Google",
2013
+ onBackClick,
2014
+ onSettingsClick,
2015
+ className,
2016
+ "aria-label": ariaLabel = "Pane section header"
2017
+ }) {
2018
+ const [isBackHovered, setIsBackHovered] = useState(false);
2019
+ const [isSettingsHovered, setIsSettingsHovered] = useState(false);
2020
+ const backButtonRef = useRef(null);
2021
+ const settingsButtonRef = useRef(null);
2022
+ const { buttonProps: backButtonProps } = useButton(
2023
+ {
2024
+ onPress: onBackClick,
2025
+ "aria-label": "Go back"
2026
+ },
2027
+ backButtonRef
2028
+ );
2029
+ const { buttonProps: settingsButtonProps } = useButton(
2030
+ {
2031
+ onPress: onSettingsClick,
2032
+ "aria-label": "Settings"
2033
+ },
2034
+ settingsButtonRef
2035
+ );
2036
+ return /* @__PURE__ */ jsxs(Container7, { className, role: "banner", "aria-label": ariaLabel, children: [
2037
+ onBackClick && /* @__PURE__ */ jsx(
2038
+ BackButton2,
2039
+ {
2040
+ ...backButtonProps,
2041
+ ref: backButtonRef,
2042
+ onMouseEnter: () => setIsBackHovered(true),
2043
+ onMouseLeave: () => setIsBackHovered(false),
2044
+ $isHovered: isBackHovered,
2045
+ children: /* @__PURE__ */ jsx(Icon, { name: "arrow-left-fill", size: 20, color: "#b9bbbe" })
2046
+ }
2047
+ ),
2048
+ /* @__PURE__ */ jsx(BrandLogo, { src: `/assets/bg-set/brand-logos/${brand}2.svg`, alt: brand }),
2049
+ /* @__PURE__ */ jsx(
2050
+ SettingsButton,
2051
+ {
2052
+ ...settingsButtonProps,
2053
+ ref: settingsButtonRef,
2054
+ onMouseEnter: () => setIsSettingsHovered(true),
2055
+ onMouseLeave: () => setIsSettingsHovered(false),
2056
+ $isHovered: isSettingsHovered,
2057
+ children: /* @__PURE__ */ jsx(
2058
+ Icon,
2059
+ {
2060
+ name: isSettingsHovered ? "settings-line" : "settings-fill",
2061
+ size: 20,
2062
+ color: "#b9bbbe"
2063
+ }
2064
+ )
2065
+ }
2066
+ )
2067
+ ] });
2068
+ }
2069
+ PaneSectionHeader.displayName = "PaneSectionHeader";
2070
+ var NAV_BG3 = "#36393F";
2071
+ var NAV_BG_HOVER = "#40444b";
2072
+ var Container8 = styled8.button`
2073
+ /* Base button styling */
2074
+ width: 48px;
2075
+ height: 48px;
2076
+ border: none;
2077
+ padding: 4px;
2078
+ border-radius: ${({ $active }) => $active ? "16px" : "50%"};
2079
+ background-color: ${NAV_BG3};
2080
+ display: flex;
2081
+ align-items: center;
2082
+ justify-content: center;
2083
+ cursor: pointer;
2084
+ transition: all 0.15s ease-out;
2085
+ position: relative;
2086
+ overflow: hidden;
2087
+
2088
+ /* Hover state */
2089
+ &:hover {
2090
+ border-radius: 16px;
2091
+ background-color: ${NAV_BG_HOVER};
2092
+ }
2093
+
2094
+ /* Focus visible state for accessibility */
2095
+ &:focus-visible {
2096
+ outline: 2px solid #5865f2;
2097
+ outline-offset: 2px;
2098
+ }
2099
+
2100
+ /* Active indicator */
2101
+ ${({ $active }) => $active && `
2102
+ &::before {
2103
+ content: '';
2104
+ position: absolute;
2105
+ left: -16px;
2106
+ top: 50%;
2107
+ transform: translateY(-50%);
2108
+ width: 4px;
2109
+ height: 40px;
2110
+ background-color: #ffffff;
2111
+ border-radius: 0 4px 4px 0;
2112
+ }
2113
+ `}
2114
+
2115
+ /* Disabled state */
2116
+ &:disabled {
2117
+ opacity: 0.5;
2118
+ cursor: not-allowed;
2119
+ }
2120
+ `;
2121
+ var LogoImage = styled8.img`
2122
+ width: 100%;
2123
+ height: 100%;
2124
+ object-fit: contain;
2125
+ pointer-events: none;
2126
+ user-select: none;
2127
+ `;
2128
+ function ServiceIcon({ brand, active = false, className, ...ariaProps }) {
2129
+ const ref = useRef(null);
2130
+ const { buttonProps } = useButton(
2131
+ {
2132
+ ...ariaProps,
2133
+ "aria-pressed": active
2134
+ },
2135
+ ref
2136
+ );
2137
+ return /* @__PURE__ */ jsx(Container8, { ...buttonProps, ref, $active: active, className, children: /* @__PURE__ */ jsx(LogoImage, { src: `/assets/icons/Brand/${brand}.svg`, alt: brand }) });
2138
+ }
2139
+ ServiceIcon.displayName = "ServiceIcon";
2140
+
2141
+ export { ActionButtons, Icon, IconNames, Layout, NavHorizontal, NavVertical, PaneMenus, PaneSectionHeader, ServiceIcon, WorkflowStatusCard };
2142
+ //# sourceMappingURL=chunk-MNXQDDWP.js.map
2143
+ //# sourceMappingURL=chunk-MNXQDDWP.js.map