@pisell/private-materials 6.11.125 → 6.11.126

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.
@@ -0,0 +1,320 @@
1
+ .pisell-booking-change-modal {
2
+ position: fixed;
3
+ inset: 0;
4
+ display: flex;
5
+ align-items: center;
6
+ justify-content: center;
7
+ padding: 16px;
8
+ background: rgba(0, 0, 0, 0.45);
9
+ backdrop-filter: blur(8px);
10
+ opacity: 0;
11
+ transition: opacity 0.18s ease;
12
+
13
+ &.is-visible {
14
+ opacity: 1;
15
+ }
16
+
17
+ &.is-dark {
18
+ color: #ffffff;
19
+ }
20
+
21
+ &.is-light {
22
+ color: #0f172a;
23
+ }
24
+ }
25
+
26
+ .pisell-booking-change-modal__panel {
27
+ width: 100%;
28
+ max-width: 980px;
29
+ padding: 24px;
30
+ border: 1px solid #3f3f46;
31
+ border-radius: 24px;
32
+ background: #121217;
33
+ box-shadow: 0 24px 64px rgba(0, 0, 0, 0.38);
34
+ transform: translateY(8px) scale(0.96);
35
+ transition: transform 0.18s ease, opacity 0.18s ease;
36
+ opacity: 0;
37
+ }
38
+
39
+ .pisell-booking-change-modal.is-visible .pisell-booking-change-modal__panel {
40
+ transform: translateY(0) scale(1);
41
+ opacity: 1;
42
+ }
43
+
44
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__panel {
45
+ border-color: #dbe2ea;
46
+ background: #ffffff;
47
+ box-shadow: 0 24px 64px rgba(15, 23, 42, 0.16);
48
+ }
49
+
50
+ .pisell-booking-change-modal__title {
51
+ font-size: 22px;
52
+ font-weight: 600;
53
+ line-height: 1.3;
54
+ }
55
+
56
+ .pisell-booking-change-modal__description {
57
+ margin-top: 8px;
58
+ font-size: 14px;
59
+ line-height: 1.5;
60
+ color: #a1a1aa;
61
+ }
62
+
63
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__description {
64
+ color: #64748b;
65
+ }
66
+
67
+ .pisell-booking-change-modal__body {
68
+ display: flex;
69
+ flex-direction: column;
70
+ gap: 16px;
71
+ margin-top: 20px;
72
+ }
73
+
74
+ .pisell-booking-change-modal__card {
75
+ padding: 20px;
76
+ border: 1px solid #3f3f46;
77
+ border-radius: 24px;
78
+ background: #171820;
79
+ }
80
+
81
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__card {
82
+ border-color: #dbe2ea;
83
+ background: #f8fafc;
84
+ }
85
+
86
+ .pisell-booking-change-modal__customer {
87
+ display: flex;
88
+ gap: 16px;
89
+ align-items: flex-start;
90
+ justify-content: space-between;
91
+ }
92
+
93
+ .pisell-booking-change-modal__customer-info {
94
+ flex: 1;
95
+ min-width: 0;
96
+ }
97
+
98
+ .pisell-booking-change-modal__section-label {
99
+ font-size: 11px;
100
+ font-weight: 600;
101
+ line-height: 1.4;
102
+ letter-spacing: 0.14em;
103
+ text-transform: uppercase;
104
+ color: #71717a;
105
+ }
106
+
107
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__section-label {
108
+ color: #64748b;
109
+ }
110
+
111
+ .pisell-booking-change-modal__customer-name {
112
+ margin-top: 12px;
113
+ font-size: 20px;
114
+ font-weight: 600;
115
+ line-height: 1.4;
116
+ }
117
+
118
+ .pisell-booking-change-modal__customer-meta {
119
+ margin-top: 8px;
120
+ font-size: 14px;
121
+ line-height: 1.5;
122
+ color: #a1a1aa;
123
+ }
124
+
125
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__customer-meta {
126
+ color: #64748b;
127
+ }
128
+
129
+ .pisell-booking-change-modal__grid {
130
+ display: grid;
131
+ grid-template-columns: repeat(2, minmax(0, 1fr));
132
+ gap: 16px;
133
+ }
134
+
135
+ .pisell-booking-change-modal__field {
136
+ min-width: 0;
137
+ }
138
+
139
+ .pisell-booking-change-modal__field-label {
140
+ display: block;
141
+ margin-bottom: 8px;
142
+ font-size: 14px;
143
+ line-height: 1.5;
144
+ color: #a1a1aa;
145
+ }
146
+
147
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__field-label {
148
+ color: #64748b;
149
+ }
150
+
151
+ .pisell-booking-change-modal__control {
152
+ width: 100%;
153
+ min-height: 56px;
154
+ padding: 16px;
155
+ border: 1px solid #3f3f46;
156
+ border-radius: 18px;
157
+ outline: none;
158
+ background: #171820;
159
+ color: #ffffff;
160
+ transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
161
+
162
+ &:focus {
163
+ border-color: #8b5cf6;
164
+ box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.18);
165
+ }
166
+
167
+ &:disabled {
168
+ cursor: not-allowed;
169
+ opacity: 0.7;
170
+ }
171
+ }
172
+
173
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__control {
174
+ border-color: #cbd5e1;
175
+ background: #ffffff;
176
+ color: #0f172a;
177
+ }
178
+
179
+ .pisell-booking-change-modal__compare-grid {
180
+ display: grid;
181
+ grid-template-columns: repeat(2, minmax(0, 1fr));
182
+ gap: 12px;
183
+ margin-top: 12px;
184
+ }
185
+
186
+ .pisell-booking-change-modal__compare-card {
187
+ padding: 16px;
188
+ border-radius: 18px;
189
+ background: #101117;
190
+ }
191
+
192
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__compare-card {
193
+ background: #ffffff;
194
+ box-shadow: inset 0 0 0 1px #e2e8f0;
195
+ }
196
+
197
+ .pisell-booking-change-modal__compare-card.is-highlighted {
198
+ border: 1px solid rgba(139, 92, 246, 0.35);
199
+ background: rgba(139, 92, 246, 0.1);
200
+ }
201
+
202
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__compare-card.is-highlighted {
203
+ border-color: #c4b5fd;
204
+ background: #f5f3ff;
205
+ }
206
+
207
+ .pisell-booking-change-modal__compare-title {
208
+ font-size: 12px;
209
+ line-height: 1.4;
210
+ color: #c4b5fd;
211
+ }
212
+
213
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__compare-title {
214
+ color: #6d28d9;
215
+ }
216
+
217
+ .pisell-booking-change-modal__compare-value {
218
+ margin-top: 8px;
219
+ font-size: 14px;
220
+ line-height: 1.5;
221
+ color: #d4d4d8;
222
+ }
223
+
224
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__compare-value {
225
+ color: #334155;
226
+ }
227
+
228
+ .pisell-booking-change-modal__error {
229
+ margin-top: 16px;
230
+ padding: 12px 16px;
231
+ border: 1px solid rgba(239, 68, 68, 0.3);
232
+ border-radius: 16px;
233
+ background: rgba(239, 68, 68, 0.1);
234
+ color: #fecaca;
235
+ font-size: 14px;
236
+ line-height: 1.5;
237
+ }
238
+
239
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__error {
240
+ color: #b91c1c;
241
+ background: #fef2f2;
242
+ }
243
+
244
+ .pisell-booking-change-modal__footer {
245
+ display: flex;
246
+ justify-content: flex-end;
247
+ gap: 12px;
248
+ margin-top: 24px;
249
+ }
250
+
251
+ .pisell-booking-change-modal__ghost-button,
252
+ .pisell-booking-change-modal__primary-button {
253
+ display: inline-flex;
254
+ align-items: center;
255
+ justify-content: center;
256
+ min-height: 48px;
257
+ padding: 12px 20px;
258
+ border-radius: 16px;
259
+ font-size: 14px;
260
+ font-weight: 600;
261
+ line-height: 1;
262
+ transition: all 0.16s ease;
263
+ }
264
+
265
+ .pisell-booking-change-modal__ghost-button {
266
+ border: 1px solid #3f3f46;
267
+ background: rgba(255, 255, 255, 0.05);
268
+ color: #d4d4d8;
269
+
270
+ &:hover:not(:disabled) {
271
+ background: rgba(255, 255, 255, 0.1);
272
+ }
273
+ }
274
+
275
+ .pisell-booking-change-modal.is-light .pisell-booking-change-modal__ghost-button {
276
+ border-color: #cbd5e1;
277
+ background: #ffffff;
278
+ color: #334155;
279
+
280
+ &:hover:not(:disabled) {
281
+ background: #f8fafc;
282
+ }
283
+ }
284
+
285
+ .pisell-booking-change-modal__primary-button {
286
+ border: none;
287
+ background: #7c3aed;
288
+ color: #ffffff;
289
+
290
+ &:hover:not(:disabled) {
291
+ background: #8b5cf6;
292
+ }
293
+
294
+ &:disabled {
295
+ cursor: not-allowed;
296
+ background: #3f3f46;
297
+ color: #a1a1aa;
298
+ }
299
+ }
300
+
301
+ @media (max-width: 768px) {
302
+ .pisell-booking-change-modal__panel {
303
+ padding: 20px;
304
+ }
305
+
306
+ .pisell-booking-change-modal__grid,
307
+ .pisell-booking-change-modal__compare-grid {
308
+ grid-template-columns: minmax(0, 1fr);
309
+ }
310
+
311
+ .pisell-booking-change-modal__customer,
312
+ .pisell-booking-change-modal__footer {
313
+ flex-direction: column;
314
+ }
315
+
316
+ .pisell-booking-change-modal__ghost-button,
317
+ .pisell-booking-change-modal__primary-button {
318
+ width: 100%;
319
+ }
320
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: () => JSX.Element;
2
+ export default _default;
@@ -0,0 +1,388 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/plus/pisellReservation/components/bookingChangeModal/demo.tsx
30
+ var demo_exports = {};
31
+ __export(demo_exports, {
32
+ default: () => demo_default
33
+ });
34
+ module.exports = __toCommonJS(demo_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_index = __toESM(require("./index"));
37
+ var courts = [
38
+ { id: "court-a", name: "Court A" },
39
+ { id: "court-b", name: "Court B" },
40
+ { id: "court-c", name: "Court C" }
41
+ ];
42
+ var bookings = [
43
+ {
44
+ id: "booking-1",
45
+ courtId: "court-a",
46
+ date: "2026-04-17",
47
+ startHour: 10,
48
+ endHour: 12,
49
+ name: "Alice Johnson",
50
+ kind: "booking",
51
+ phone: "0412 111 222"
52
+ },
53
+ {
54
+ id: "booking-2",
55
+ courtId: "court-b",
56
+ date: "2026-04-17",
57
+ startHour: 13,
58
+ endHour: 15,
59
+ name: "Bob Martin",
60
+ kind: "booking",
61
+ phone: "0412 333 444"
62
+ },
63
+ {
64
+ id: "booking-3",
65
+ courtId: "court-c",
66
+ date: "2026-04-18",
67
+ startHour: 9,
68
+ endHour: 10.5,
69
+ name: "Cindy Brown",
70
+ kind: "booking",
71
+ phone: "0412 555 666"
72
+ },
73
+ {
74
+ id: "booking-4",
75
+ courtId: "court-a",
76
+ date: "2026-04-18",
77
+ startHour: 15,
78
+ endHour: 17,
79
+ name: "David Lee",
80
+ kind: "booking",
81
+ phone: "0412 777 888"
82
+ }
83
+ ];
84
+ var hourSlots = Array.from({ length: 25 }, (_, index) => 8 + index * 0.5);
85
+ function formatHourLabel(hour) {
86
+ const hours = Math.floor(hour);
87
+ const minutes = Math.round((hour - hours) * 60);
88
+ return `${String(hours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}`;
89
+ }
90
+ function hasConflict(list, targetCourtId, targetDate, startHour, endHour, excludeBookingId) {
91
+ return list.some((booking) => {
92
+ if (booking.id === excludeBookingId) {
93
+ return false;
94
+ }
95
+ if (booking.courtId !== targetCourtId || booking.date !== targetDate) {
96
+ return false;
97
+ }
98
+ return !(endHour <= booking.startHour || startHour >= booking.endHour);
99
+ });
100
+ }
101
+ function getBookingDetailData(item) {
102
+ var _a;
103
+ const courtName = ((_a = courts.find((court) => court.id === item.courtId)) == null ? void 0 : _a.name) || "Court";
104
+ return {
105
+ customer: {
106
+ name: item.name || "Unknown customer",
107
+ phone: item.phone || "",
108
+ email: `${String(item.name || "guest").toLowerCase().replace(/\s+/g, ".")}@example.com`
109
+ },
110
+ headerSummary: {
111
+ customerName: item.name || "Unknown customer",
112
+ resourceLabel: courtName
113
+ }
114
+ };
115
+ }
116
+ function createCustomerChangeHandler(scenarioLabel) {
117
+ return async ({ customer }) => {
118
+ if (scenarioLabel === "No customer change") {
119
+ return null;
120
+ }
121
+ return {
122
+ name: `${customer.name} (${scenarioLabel})`,
123
+ phone: "0400 000 000",
124
+ email: `${scenarioLabel.toLowerCase().replace(/\s+/g, "-")}@example.com`
125
+ };
126
+ };
127
+ }
128
+ var demo_default = () => {
129
+ const [latestResult, setLatestResult] = (0, import_react.useState)(null);
130
+ const [latestReject, setLatestReject] = (0, import_react.useState)(null);
131
+ const [activeScenario, setActiveScenario] = (0, import_react.useState)("");
132
+ const currentItem = (0, import_react.useMemo)(() => bookings[0], []);
133
+ const scenarios = (0, import_react.useMemo)(
134
+ () => [
135
+ {
136
+ key: "default-dark",
137
+ title: "Default dark",
138
+ description: "最基础的打开方式,初始值与当前 booking 一致。",
139
+ buildOptions: (item) => ({
140
+ item,
141
+ targetCourtId: item.courtId,
142
+ targetDate: item.date,
143
+ targetHour: item.startHour,
144
+ theme: "dark",
145
+ onCustomerChange: createCustomerChangeHandler("Default dark")
146
+ })
147
+ },
148
+ {
149
+ key: "drag-target",
150
+ title: "Drag target preset",
151
+ description: "模拟从日历拖拽进入弹窗,打开时就已经带有新的 court 和 time。",
152
+ buildOptions: (item) => ({
153
+ item,
154
+ targetCourtId: "court-c",
155
+ targetDate: item.date,
156
+ targetHour: 16,
157
+ theme: "dark",
158
+ onCustomerChange: createCustomerChangeHandler("Drag target")
159
+ })
160
+ },
161
+ {
162
+ key: "cross-date",
163
+ title: "Change date",
164
+ description: "初始目标日期不是原日期,方便验证 Original / Drop target 对比。",
165
+ buildOptions: (item) => ({
166
+ item,
167
+ targetCourtId: "court-b",
168
+ targetDate: "2026-04-18",
169
+ targetHour: 11,
170
+ theme: "dark",
171
+ onCustomerChange: createCustomerChangeHandler("Change date")
172
+ })
173
+ },
174
+ {
175
+ key: "light-theme",
176
+ title: "Light theme",
177
+ description: "浅色主题展示,便于确认两套视觉是否都正常。",
178
+ buildOptions: (item) => ({
179
+ item,
180
+ targetCourtId: "court-b",
181
+ targetDate: item.date,
182
+ targetHour: 9,
183
+ theme: "light",
184
+ onCustomerChange: createCustomerChangeHandler("Light theme")
185
+ })
186
+ },
187
+ {
188
+ key: "conflict-case",
189
+ title: "Conflict state",
190
+ description: "目标时间与已有 booking 冲突,确认底部错误提示和 Confirm disabled。",
191
+ buildOptions: (item) => ({
192
+ item,
193
+ targetCourtId: "court-b",
194
+ targetDate: "2026-04-17",
195
+ targetHour: 13,
196
+ theme: "dark",
197
+ onCustomerChange: createCustomerChangeHandler("Conflict state")
198
+ })
199
+ },
200
+ {
201
+ key: "custom-copy",
202
+ title: "Custom copy",
203
+ description: "自定义标题、描述和按钮文案,验证配置项是否生效。",
204
+ buildOptions: (item) => ({
205
+ item,
206
+ targetCourtId: "court-c",
207
+ targetDate: "2026-04-18",
208
+ targetHour: 9.5,
209
+ theme: "dark",
210
+ title: "Move this booking",
211
+ description: "Review the destination before saving the booking update.",
212
+ confirmText: "Save change",
213
+ cancelText: "Dismiss",
214
+ onCustomerChange: createCustomerChangeHandler("Custom copy")
215
+ })
216
+ },
217
+ {
218
+ key: "no-customer-change",
219
+ title: "Without customer change",
220
+ description: "不传或无效切换客户时,顶部 Change 区域也能正常展示禁用态。",
221
+ buildOptions: (item) => ({
222
+ item,
223
+ targetCourtId: item.courtId,
224
+ targetDate: item.date,
225
+ targetHour: item.startHour,
226
+ theme: "dark"
227
+ })
228
+ }
229
+ ],
230
+ []
231
+ );
232
+ const openScenario = async (scenario) => {
233
+ setActiveScenario(scenario.title);
234
+ setLatestResult(null);
235
+ setLatestReject(null);
236
+ try {
237
+ const result = await import_index.default.open({
238
+ courts,
239
+ visibleCourts: courts,
240
+ bookings,
241
+ hourSlots,
242
+ firstTimelineHour: 8,
243
+ endTimelineExclusive: 20.5,
244
+ getBookingDetailData,
245
+ formatHourLabel,
246
+ isBusinessHour: (hour) => hour >= 8 && hour <= 20,
247
+ hasConflict,
248
+ ...scenario.buildOptions(currentItem)
249
+ });
250
+ setLatestResult(result);
251
+ } catch (error) {
252
+ setLatestReject(error);
253
+ }
254
+ };
255
+ return /* @__PURE__ */ import_react.default.createElement("div", { style: { padding: 24, background: "#f8fafc" } }, /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: 8, fontSize: 18, fontWeight: 600 } }, "BookingChangeModal Demo"), /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: 20, color: "#64748b", fontSize: 14 } }, "下面每个按钮都会打开一个不同场景的弹窗,方便快速检查视觉和交互。"), /* @__PURE__ */ import_react.default.createElement(
256
+ "div",
257
+ {
258
+ style: {
259
+ display: "grid",
260
+ gridTemplateColumns: "repeat(auto-fit, minmax(240px, 1fr))",
261
+ gap: 12
262
+ }
263
+ },
264
+ scenarios.map((scenario) => /* @__PURE__ */ import_react.default.createElement(
265
+ "div",
266
+ {
267
+ key: scenario.key,
268
+ style: {
269
+ padding: 16,
270
+ border: "1px solid #e2e8f0",
271
+ borderRadius: 12,
272
+ background: "#fff"
273
+ }
274
+ },
275
+ /* @__PURE__ */ import_react.default.createElement("div", { style: { fontSize: 15, fontWeight: 600, marginBottom: 8 } }, scenario.title),
276
+ /* @__PURE__ */ import_react.default.createElement(
277
+ "div",
278
+ {
279
+ style: {
280
+ minHeight: 40,
281
+ marginBottom: 12,
282
+ color: "#64748b",
283
+ fontSize: 13,
284
+ lineHeight: 1.5
285
+ }
286
+ },
287
+ scenario.description
288
+ ),
289
+ /* @__PURE__ */ import_react.default.createElement(
290
+ "button",
291
+ {
292
+ type: "button",
293
+ onClick: () => openScenario(scenario),
294
+ style: {
295
+ width: "100%",
296
+ padding: "10px 16px",
297
+ border: "none",
298
+ borderRadius: 8,
299
+ background: "#7c3aed",
300
+ color: "#fff",
301
+ cursor: "pointer"
302
+ }
303
+ },
304
+ "Open ",
305
+ scenario.title
306
+ )
307
+ ))
308
+ ), /* @__PURE__ */ import_react.default.createElement(
309
+ "div",
310
+ {
311
+ style: {
312
+ marginTop: 20,
313
+ padding: 16,
314
+ border: "1px solid #e5e7eb",
315
+ borderRadius: 12,
316
+ background: "#fafafa",
317
+ whiteSpace: "pre-wrap",
318
+ fontSize: 13,
319
+ lineHeight: 1.6
320
+ }
321
+ },
322
+ /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: 8, fontWeight: 600 } }, "Current booking"),
323
+ /* @__PURE__ */ import_react.default.createElement("div", null, JSON.stringify(currentItem, null, 2))
324
+ ), /* @__PURE__ */ import_react.default.createElement(
325
+ "div",
326
+ {
327
+ style: {
328
+ marginTop: 16,
329
+ padding: 16,
330
+ border: "1px solid #e5e7eb",
331
+ borderRadius: 12,
332
+ background: "#fff",
333
+ whiteSpace: "pre-wrap",
334
+ fontSize: 13,
335
+ lineHeight: 1.6
336
+ }
337
+ },
338
+ /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: 8, fontWeight: 600 } }, "All bookings"),
339
+ /* @__PURE__ */ import_react.default.createElement("div", null, JSON.stringify(bookings, null, 2))
340
+ ), activeScenario && /* @__PURE__ */ import_react.default.createElement(
341
+ "div",
342
+ {
343
+ style: {
344
+ marginTop: 16,
345
+ padding: 12,
346
+ borderRadius: 12,
347
+ background: "#ede9fe",
348
+ color: "#5b21b6",
349
+ fontSize: 13,
350
+ fontWeight: 600
351
+ }
352
+ },
353
+ "Last opened scenario: ",
354
+ activeScenario
355
+ ), latestResult && /* @__PURE__ */ import_react.default.createElement(
356
+ "div",
357
+ {
358
+ style: {
359
+ marginTop: 16,
360
+ padding: 16,
361
+ border: "1px solid #d1fae5",
362
+ borderRadius: 12,
363
+ background: "#ecfdf5",
364
+ whiteSpace: "pre-wrap",
365
+ fontSize: 13,
366
+ lineHeight: 1.6
367
+ }
368
+ },
369
+ /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: 8, fontWeight: 600 } }, "Resolved result"),
370
+ /* @__PURE__ */ import_react.default.createElement("div", null, JSON.stringify(latestResult, null, 2))
371
+ ), latestReject && /* @__PURE__ */ import_react.default.createElement(
372
+ "div",
373
+ {
374
+ style: {
375
+ marginTop: 16,
376
+ padding: 16,
377
+ border: "1px solid #fecaca",
378
+ borderRadius: 12,
379
+ background: "#fef2f2",
380
+ whiteSpace: "pre-wrap",
381
+ fontSize: 13,
382
+ lineHeight: 1.6
383
+ }
384
+ },
385
+ /* @__PURE__ */ import_react.default.createElement("div", { style: { marginBottom: 8, fontWeight: 600 } }, "Rejected reason"),
386
+ /* @__PURE__ */ import_react.default.createElement("div", null, JSON.stringify(latestReject, null, 2))
387
+ ));
388
+ };