@bigz-app/booking-widget 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/booking-widget.js +2517 -343
- package/dist/booking-widget.js.map +1 -1
- package/dist/components/PromoDialog.d.ts +0 -29
- package/dist/components/PromoDialog.d.ts.map +1 -1
- package/dist/components/Sidebar.d.ts +2 -1
- package/dist/components/Sidebar.d.ts.map +1 -1
- package/dist/components/UniversalBookingWidget.d.ts.map +1 -1
- package/dist/components/booking/BookingForm.d.ts +15 -1
- package/dist/components/booking/BookingForm.d.ts.map +1 -1
- package/dist/components/booking/BookingSuccessModal.d.ts.map +1 -1
- package/dist/components/booking/PaymentForm.d.ts +7 -1
- package/dist/components/booking/PaymentForm.d.ts.map +1 -1
- package/dist/components/booking/VoucherInput.d.ts.map +1 -1
- package/dist/components/events/EventInstanceSelection.d.ts.map +1 -1
- package/dist/components/events/EventTypeDetailsDialog.d.ts.map +1 -1
- package/dist/components/events/EventTypeSelection.d.ts.map +1 -1
- package/dist/components/events/ImageCarousel.d.ts.map +1 -1
- package/dist/components/events/NextEventsPreview.d.ts.map +1 -1
- package/dist/components/shared/Badge.d.ts +18 -0
- package/dist/components/shared/Badge.d.ts.map +1 -0
- package/dist/components/shared/Button.d.ts +1 -1
- package/dist/components/shared/Button.d.ts.map +1 -1
- package/dist/components/shared/EmptyState.d.ts +19 -0
- package/dist/components/shared/EmptyState.d.ts.map +1 -0
- package/dist/components/shared/ErrorBoundary.d.ts.map +1 -1
- package/dist/components/shared/FormGroup.d.ts +23 -0
- package/dist/components/shared/FormGroup.d.ts.map +1 -0
- package/dist/components/shared/Input.d.ts.map +1 -1
- package/dist/components/shared/SectionHeader.d.ts +15 -0
- package/dist/components/shared/SectionHeader.d.ts.map +1 -0
- package/dist/components/shared/Spinner.d.ts.map +1 -1
- package/dist/components/shared/index.d.ts +4 -0
- package/dist/components/shared/index.d.ts.map +1 -1
- package/dist/components/shared/skeletons/EventCardSkeleton.d.ts.map +1 -1
- package/dist/components/shared/skeletons/EventInstanceSkeleton.d.ts.map +1 -1
- package/dist/components/shared/skeletons/NextEventsSkeleton.d.ts.map +1 -1
- package/dist/components/upsells/UpsellCard.d.ts +10 -0
- package/dist/components/upsells/UpsellCard.d.ts.map +1 -0
- package/dist/components/upsells/UpsellsStep.d.ts +39 -0
- package/dist/components/upsells/UpsellsStep.d.ts.map +1 -0
- package/dist/components/upsells/index.d.ts +4 -0
- package/dist/components/upsells/index.d.ts.map +1 -0
- package/dist/index.cjs +2502 -342
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +2502 -342
- package/dist/index.esm.js.map +1 -1
- package/dist/index.vanilla.d.ts.map +1 -1
- package/dist/styles/shared-styles.d.ts +71 -0
- package/dist/styles/shared-styles.d.ts.map +1 -0
- package/package.json +2 -3
package/dist/index.esm.js
CHANGED
|
@@ -3974,25 +3974,72 @@ var reactStripe_umdExports = reactStripe_umd.exports;
|
|
|
3974
3974
|
* A reusable input component with focus states, labels, and error handling.
|
|
3975
3975
|
* Uses forwardRef to support react-hook-form integration.
|
|
3976
3976
|
*/
|
|
3977
|
-
const Input = forwardRef(({ label, error, helperText, leftIcon, rightIcon, fullWidth = false, className = "", containerClassName = "", id, ...props }, ref) => {
|
|
3977
|
+
const Input = forwardRef(({ label, error, helperText, leftIcon, rightIcon, fullWidth = false, className = "", containerClassName = "", id, style, ...props }, ref) => {
|
|
3978
3978
|
const [isFocused, setIsFocused] = useState(false);
|
|
3979
|
-
const
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3979
|
+
const containerStyles = {
|
|
3980
|
+
display: "flex",
|
|
3981
|
+
flexDirection: "column",
|
|
3982
|
+
gap: "4px",
|
|
3983
|
+
width: fullWidth ? "100%" : "auto",
|
|
3984
|
+
};
|
|
3985
|
+
const inputWrapperStyles = {
|
|
3986
|
+
position: "relative",
|
|
3987
|
+
display: "flex",
|
|
3988
|
+
alignItems: "center",
|
|
3989
|
+
};
|
|
3990
|
+
const inputStyles = {
|
|
3991
|
+
width: "100%",
|
|
3992
|
+
padding: "12px",
|
|
3993
|
+
paddingLeft: leftIcon ? "40px" : "12px",
|
|
3994
|
+
paddingRight: rightIcon ? "40px" : "12px",
|
|
3995
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
3996
|
+
color: "var(--bw-text-color)",
|
|
3997
|
+
fontSize: "16px",
|
|
3998
|
+
fontFamily: "var(--bw-font-family)",
|
|
3999
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4000
|
+
outline: "none",
|
|
4001
|
+
transition: "all 0.2s ease",
|
|
4002
|
+
border: error
|
|
4003
|
+
? "1px solid var(--bw-error-color)"
|
|
4004
|
+
: isFocused
|
|
4005
|
+
? "1px solid var(--bw-highlight-color)"
|
|
4006
|
+
: "1px solid var(--bw-border-color)",
|
|
4007
|
+
boxShadow: isFocused && !error
|
|
4008
|
+
? "0 0 0 2px var(--bw-highlight-color)"
|
|
4009
|
+
: "none",
|
|
4010
|
+
...style,
|
|
4011
|
+
};
|
|
4012
|
+
const iconStyles = {
|
|
4013
|
+
position: "absolute",
|
|
4014
|
+
display: "flex",
|
|
4015
|
+
alignItems: "center",
|
|
4016
|
+
justifyContent: "center",
|
|
4017
|
+
color: "var(--bw-text-muted)",
|
|
4018
|
+
pointerEvents: "none",
|
|
4019
|
+
};
|
|
4020
|
+
return (jsxs("div", { className: containerClassName, style: containerStyles, children: [label && (jsx("label", { htmlFor: id, style: {
|
|
4021
|
+
fontSize: "16px",
|
|
4022
|
+
fontWeight: 500,
|
|
4023
|
+
color: "var(--bw-text-color)",
|
|
4024
|
+
fontFamily: "var(--bw-font-family)",
|
|
4025
|
+
}, children: label })), jsxs("div", { style: inputWrapperStyles, children: [leftIcon && (jsx("span", { style: { ...iconStyles, left: "12px" }, children: leftIcon })), jsx("input", { ref: ref, id: id, className: `bw-input ${error ? "bw-input-error" : ""} ${className}`, style: inputStyles, onFocus: (e) => {
|
|
3990
4026
|
setIsFocused(true);
|
|
3991
4027
|
props.onFocus?.(e);
|
|
3992
4028
|
}, onBlur: (e) => {
|
|
3993
4029
|
setIsFocused(false);
|
|
3994
4030
|
props.onBlur?.(e);
|
|
3995
|
-
}, ...props }), rightIcon && jsx("span", {
|
|
4031
|
+
}, ...props }), rightIcon && (jsx("span", { style: { ...iconStyles, right: "12px" }, children: rightIcon }))] }), error && (jsx("p", { style: {
|
|
4032
|
+
color: "var(--bw-error-color)",
|
|
4033
|
+
fontSize: "14px",
|
|
4034
|
+
marginTop: "4px",
|
|
4035
|
+
fontFamily: "var(--bw-font-family)",
|
|
4036
|
+
margin: 0,
|
|
4037
|
+
}, children: error })), helperText && !error && (jsx("p", { style: {
|
|
4038
|
+
color: "var(--bw-text-muted)",
|
|
4039
|
+
fontSize: "14px",
|
|
4040
|
+
fontFamily: "var(--bw-font-family)",
|
|
4041
|
+
margin: 0,
|
|
4042
|
+
}, children: helperText }))] }));
|
|
3996
4043
|
});
|
|
3997
4044
|
Input.displayName = "Input";
|
|
3998
4045
|
|
|
@@ -4000,10 +4047,16 @@ Input.displayName = "Input";
|
|
|
4000
4047
|
* A simple dotted spinner component for loading states.
|
|
4001
4048
|
* Uses the spin animation from animations.css
|
|
4002
4049
|
*/
|
|
4003
|
-
const Spinner = ({ size = 16, borderColor = "var(--bw-highlight-color)", className = "", }) => (jsx("div", { className: `
|
|
4050
|
+
const Spinner = ({ size = 16, borderColor = "var(--bw-highlight-color)", className = "", }) => (jsx("div", { className: `bw-spinner ${className}`, style: {
|
|
4051
|
+
display: "flex",
|
|
4052
|
+
justifyContent: "center",
|
|
4053
|
+
alignItems: "center",
|
|
4054
|
+
}, children: jsx("div", { className: "animate-spin", style: {
|
|
4004
4055
|
width: `${size}px`,
|
|
4005
4056
|
height: `${size}px`,
|
|
4006
4057
|
border: `3px dotted ${borderColor}`,
|
|
4058
|
+
borderRadius: "50%",
|
|
4059
|
+
animation: "spin 1s linear infinite",
|
|
4007
4060
|
} }) }));
|
|
4008
4061
|
/**
|
|
4009
4062
|
* A spinner function that returns a spinner element.
|
|
@@ -4199,13 +4252,173 @@ function DialogWrapper({ isOpen, onClose, children, maxWidth = "700px", classNam
|
|
|
4199
4252
|
* Skeleton loading state for event type cards.
|
|
4200
4253
|
* Matches the layout of EventTypeSelection cards.
|
|
4201
4254
|
*/
|
|
4202
|
-
const EventCardSkeleton = ({ count = 4 }) => (jsx("div", {
|
|
4255
|
+
const EventCardSkeleton = ({ count = 4 }) => (jsx("div", { style: { padding: 0 }, children: jsx("div", { style: {
|
|
4256
|
+
display: "flex",
|
|
4257
|
+
flexWrap: "wrap",
|
|
4258
|
+
justifyContent: "center",
|
|
4259
|
+
gap: "24px",
|
|
4260
|
+
}, children: Array.from({ length: count }).map((_, idx) => (jsxs("div", { className: "skeleton-shimmer", style: {
|
|
4261
|
+
position: "relative",
|
|
4262
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
4263
|
+
border: "1px solid var(--bw-border-color)",
|
|
4264
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4265
|
+
overflow: "hidden",
|
|
4266
|
+
boxShadow: "var(--bw-shadow-md)",
|
|
4267
|
+
fontFamily: "var(--bw-font-family)",
|
|
4268
|
+
maxWidth: "500px",
|
|
4269
|
+
flex: "1 1 350px",
|
|
4270
|
+
display: "flex",
|
|
4271
|
+
flexDirection: "column",
|
|
4272
|
+
}, children: [jsx("div", { style: { position: "absolute", top: "16px", left: "16px", zIndex: 10 }, children: jsx("div", { style: {
|
|
4273
|
+
width: "80px",
|
|
4274
|
+
height: "24px",
|
|
4275
|
+
backgroundColor: "rgba(255, 255, 255, 0.2)",
|
|
4276
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
4277
|
+
} }) }), jsx("div", { style: {
|
|
4278
|
+
position: "relative",
|
|
4279
|
+
width: "100%",
|
|
4280
|
+
height: "300px",
|
|
4281
|
+
backgroundColor: "var(--bw-border-color)",
|
|
4282
|
+
} }), jsxs("div", { style: { padding: "16px 24px", flex: 1 }, children: [jsx("div", { style: {
|
|
4283
|
+
width: "60%",
|
|
4284
|
+
height: "14px",
|
|
4285
|
+
backgroundColor: "var(--bw-border-color)",
|
|
4286
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4287
|
+
marginBottom: "8px",
|
|
4288
|
+
} }), jsx("div", { style: {
|
|
4289
|
+
width: "80%",
|
|
4290
|
+
height: "24px",
|
|
4291
|
+
backgroundColor: "var(--bw-border-color)",
|
|
4292
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4293
|
+
marginBottom: "12px",
|
|
4294
|
+
} }), jsxs("div", { style: { marginBottom: "16px" }, children: [jsx("div", { style: {
|
|
4295
|
+
width: "100%",
|
|
4296
|
+
height: "12px",
|
|
4297
|
+
backgroundColor: "var(--bw-border-color)",
|
|
4298
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4299
|
+
marginBottom: "8px",
|
|
4300
|
+
} }), jsx("div", { style: {
|
|
4301
|
+
width: "90%",
|
|
4302
|
+
height: "12px",
|
|
4303
|
+
backgroundColor: "var(--bw-border-color)",
|
|
4304
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4305
|
+
marginBottom: "8px",
|
|
4306
|
+
} }), jsx("div", { style: {
|
|
4307
|
+
width: "70%",
|
|
4308
|
+
height: "12px",
|
|
4309
|
+
backgroundColor: "var(--bw-border-color)",
|
|
4310
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4311
|
+
} })] }), jsxs("div", { style: { display: "flex", gap: "16px", marginBottom: "16px" }, children: [jsx("div", { style: {
|
|
4312
|
+
width: "80px",
|
|
4313
|
+
height: "16px",
|
|
4314
|
+
backgroundColor: "var(--bw-border-color)",
|
|
4315
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4316
|
+
} }), jsx("div", { style: {
|
|
4317
|
+
width: "100px",
|
|
4318
|
+
height: "16px",
|
|
4319
|
+
backgroundColor: "var(--bw-border-color)",
|
|
4320
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4321
|
+
} })] }), jsxs("div", { style: {
|
|
4322
|
+
display: "flex",
|
|
4323
|
+
justifyContent: "space-between",
|
|
4324
|
+
alignItems: "center",
|
|
4325
|
+
paddingTop: "12px",
|
|
4326
|
+
borderTop: "1px solid var(--bw-border-color)",
|
|
4327
|
+
}, children: [jsx("div", { style: {
|
|
4328
|
+
width: "100px",
|
|
4329
|
+
height: "28px",
|
|
4330
|
+
backgroundColor: "var(--bw-border-color)",
|
|
4331
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4332
|
+
} }), jsx("div", { style: {
|
|
4333
|
+
width: "120px",
|
|
4334
|
+
height: "40px",
|
|
4335
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
4336
|
+
opacity: 0.3,
|
|
4337
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4338
|
+
} })] })] })] }, idx))) }) }));
|
|
4203
4339
|
|
|
4204
4340
|
/**
|
|
4205
4341
|
* Skeleton loading state for the next events preview.
|
|
4206
4342
|
* Shows a header and list of upcoming event placeholders.
|
|
4207
4343
|
*/
|
|
4208
|
-
const NextEventsSkeleton = ({ count = 3 }) => (jsxs("div", {
|
|
4344
|
+
const NextEventsSkeleton = ({ count = 3 }) => (jsxs("div", { style: {
|
|
4345
|
+
maxWidth: "500px",
|
|
4346
|
+
margin: "0 auto",
|
|
4347
|
+
padding: "16px",
|
|
4348
|
+
fontFamily: "var(--bw-font-family)",
|
|
4349
|
+
}, children: [jsxs("div", { style: { marginBottom: "24px", textAlign: "center" }, children: [jsx("div", { className: "skeleton-shimmer", style: {
|
|
4350
|
+
width: "280px",
|
|
4351
|
+
height: "24px",
|
|
4352
|
+
backgroundColor: "var(--bw-border-color)",
|
|
4353
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4354
|
+
margin: "0 auto 8px auto",
|
|
4355
|
+
} }), jsx("div", { className: "skeleton-shimmer", style: {
|
|
4356
|
+
width: "320px",
|
|
4357
|
+
height: "16px",
|
|
4358
|
+
backgroundColor: "var(--bw-border-color)",
|
|
4359
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4360
|
+
margin: "0 auto",
|
|
4361
|
+
} })] }), jsx("div", { style: {
|
|
4362
|
+
display: "flex",
|
|
4363
|
+
flexDirection: "column",
|
|
4364
|
+
gap: "12px",
|
|
4365
|
+
marginBottom: "24px",
|
|
4366
|
+
}, children: Array.from({ length: count }).map((_, idx) => (jsxs("div", { className: "skeleton-shimmer", style: {
|
|
4367
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
4368
|
+
border: "1px solid var(--bw-border-color)",
|
|
4369
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4370
|
+
padding: "8px 10px",
|
|
4371
|
+
fontFamily: "var(--bw-font-family)",
|
|
4372
|
+
}, children: [jsxs("div", { style: {
|
|
4373
|
+
display: "flex",
|
|
4374
|
+
justifyContent: "space-between",
|
|
4375
|
+
width: "100%",
|
|
4376
|
+
alignItems: "flex-start",
|
|
4377
|
+
gap: "12px",
|
|
4378
|
+
marginBottom: "4px",
|
|
4379
|
+
}, children: [jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsx("div", { style: {
|
|
4380
|
+
width: "40px",
|
|
4381
|
+
height: "40px",
|
|
4382
|
+
backgroundColor: "var(--bw-border-color)",
|
|
4383
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
4384
|
+
} }), jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [jsx("div", { style: {
|
|
4385
|
+
width: "80px",
|
|
4386
|
+
height: "16px",
|
|
4387
|
+
backgroundColor: "var(--bw-border-color)",
|
|
4388
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4389
|
+
} }), jsx("div", { style: {
|
|
4390
|
+
width: "60px",
|
|
4391
|
+
height: "14px",
|
|
4392
|
+
backgroundColor: "var(--bw-border-color)",
|
|
4393
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4394
|
+
} })] })] }), jsxs("div", { style: {
|
|
4395
|
+
display: "flex",
|
|
4396
|
+
flexDirection: "column",
|
|
4397
|
+
alignItems: "flex-end",
|
|
4398
|
+
gap: "4px",
|
|
4399
|
+
}, children: [jsx("div", { style: {
|
|
4400
|
+
width: "70px",
|
|
4401
|
+
height: "20px",
|
|
4402
|
+
backgroundColor: "var(--bw-border-color)",
|
|
4403
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4404
|
+
} }), jsx("div", { style: {
|
|
4405
|
+
width: "50px",
|
|
4406
|
+
height: "14px",
|
|
4407
|
+
backgroundColor: "var(--bw-border-color)",
|
|
4408
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4409
|
+
} })] })] }), jsx("div", { style: {
|
|
4410
|
+
width: "70%",
|
|
4411
|
+
height: "16px",
|
|
4412
|
+
backgroundColor: "var(--bw-border-color)",
|
|
4413
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4414
|
+
marginTop: "8px",
|
|
4415
|
+
} })] }, idx))) }), jsx("div", { className: "skeleton-shimmer", style: {
|
|
4416
|
+
width: "100%",
|
|
4417
|
+
height: "48px",
|
|
4418
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
4419
|
+
opacity: 0.3,
|
|
4420
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4421
|
+
} })] }));
|
|
4209
4422
|
|
|
4210
4423
|
// Clock icon - used for duration displays
|
|
4211
4424
|
const IconClock = ({ size = 16, color = "#10b981", className, }) => (jsxs("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: className, children: [jsx("circle", { cx: "12", cy: "12", r: "10" }), jsx("polyline", { points: "12 6 12 12 16 14" })] }));
|
|
@@ -4231,14 +4444,13 @@ const IconChevronLeft = ({ size = 20, color = "white", className, }) => (jsx("sv
|
|
|
4231
4444
|
const IconChevronRight = ({ size = 20, color = "white", className, }) => (jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: className, children: jsx("polyline", { points: "9 18 15 12 9 6" }) }));
|
|
4232
4445
|
|
|
4233
4446
|
// Component for bookings fully covered by gift cards (no Stripe payment needed)
|
|
4234
|
-
function GiftCardOnlyBooking({ config, eventDetails, formData, discountCode, giftCards, onSuccess, onError, }) {
|
|
4447
|
+
function GiftCardOnlyBooking({ config, eventDetails, formData, discountCode, giftCards, onSuccess, onError, upsellSelections = [], }) {
|
|
4235
4448
|
const [isLoading, setIsLoading] = useState(false);
|
|
4236
4449
|
const [error, setError] = useState(null);
|
|
4237
4450
|
const handleBooking = async () => {
|
|
4238
4451
|
setIsLoading(true);
|
|
4239
4452
|
setError(null);
|
|
4240
4453
|
try {
|
|
4241
|
-
// Create booking directly without Stripe payment
|
|
4242
4454
|
const requestData = {
|
|
4243
4455
|
eventInstanceId: config.eventInstanceId || eventDetails.id,
|
|
4244
4456
|
organizationId: config.organizationId,
|
|
@@ -4250,6 +4462,7 @@ function GiftCardOnlyBooking({ config, eventDetails, formData, discountCode, gif
|
|
|
4250
4462
|
customerPhone: formData.customerPhone?.trim(),
|
|
4251
4463
|
comment: formData.comment?.trim(),
|
|
4252
4464
|
paymentMethod: "gift_card",
|
|
4465
|
+
...(upsellSelections.length > 0 && { upsellSelections }),
|
|
4253
4466
|
};
|
|
4254
4467
|
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/create-gift-card-booking"), {
|
|
4255
4468
|
method: "POST",
|
|
@@ -4278,7 +4491,56 @@ function GiftCardOnlyBooking({ config, eventDetails, formData, discountCode, gif
|
|
|
4278
4491
|
}
|
|
4279
4492
|
};
|
|
4280
4493
|
const totalGiftCardAmount = giftCards.reduce((sum, gc) => sum + (gc.balanceToUse || gc.discountAmount || 0), 0);
|
|
4281
|
-
return (jsxs("div", {
|
|
4494
|
+
return (jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [jsxs("div", { style: {
|
|
4495
|
+
backgroundColor: "rgba(var(--bw-success-color), 0.15)",
|
|
4496
|
+
border: "1px solid rgba(var(--bw-success-color), 0.4)",
|
|
4497
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4498
|
+
padding: "16px",
|
|
4499
|
+
}, children: [jsx("div", { style: {
|
|
4500
|
+
display: "flex",
|
|
4501
|
+
alignItems: "center",
|
|
4502
|
+
gap: "8px",
|
|
4503
|
+
marginBottom: "8px",
|
|
4504
|
+
color: "var(--bw-success-color)",
|
|
4505
|
+
fontFamily: "var(--bw-font-family)",
|
|
4506
|
+
fontWeight: 600,
|
|
4507
|
+
}, children: "\uD83C\uDF81 Vollst\u00E4ndig durch Gutschein(e) gedeckt" }), jsxs("div", { style: {
|
|
4508
|
+
fontSize: "16px",
|
|
4509
|
+
color: "var(--bw-text-muted)",
|
|
4510
|
+
fontFamily: "var(--bw-font-family)",
|
|
4511
|
+
}, children: ["Gutschein-Guthaben: ", formatCurrency(totalGiftCardAmount)] })] }), error && (jsxs("div", { style: {
|
|
4512
|
+
backgroundColor: "rgba(var(--bw-error-color), 0.15)",
|
|
4513
|
+
border: "1px solid rgba(var(--bw-error-color), 0.4)",
|
|
4514
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4515
|
+
padding: "16px",
|
|
4516
|
+
color: "var(--bw-error-color)",
|
|
4517
|
+
fontSize: "16px",
|
|
4518
|
+
fontFamily: "var(--bw-font-family)",
|
|
4519
|
+
}, children: ["\u26A0\uFE0F ", error] })), jsx("button", { type: "button", onClick: handleBooking, disabled: isLoading, style: {
|
|
4520
|
+
width: "100%",
|
|
4521
|
+
padding: "12px 24px",
|
|
4522
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
4523
|
+
color: "#ffffff",
|
|
4524
|
+
border: "none",
|
|
4525
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4526
|
+
fontSize: "16px",
|
|
4527
|
+
fontWeight: 600,
|
|
4528
|
+
fontFamily: "var(--bw-font-family)",
|
|
4529
|
+
transition: "all 0.2s ease",
|
|
4530
|
+
display: "flex",
|
|
4531
|
+
alignItems: "center",
|
|
4532
|
+
justifyContent: "center",
|
|
4533
|
+
gap: "8px",
|
|
4534
|
+
cursor: isLoading ? "not-allowed" : "pointer",
|
|
4535
|
+
opacity: isLoading ? 0.6 : 1,
|
|
4536
|
+
}, children: isLoading ? (jsxs(Fragment, { children: [jsx("div", { style: {
|
|
4537
|
+
width: "16px",
|
|
4538
|
+
height: "16px",
|
|
4539
|
+
border: "2px solid #ffffff",
|
|
4540
|
+
borderTopColor: "transparent",
|
|
4541
|
+
borderRadius: "50%",
|
|
4542
|
+
animation: "spin 1s linear infinite",
|
|
4543
|
+
} }), "Buchung wird erstellt..."] })) : ("Mit Gutschein buchen") })] }));
|
|
4282
4544
|
}
|
|
4283
4545
|
// Inner component that uses the Stripe hooks
|
|
4284
4546
|
function PaymentFormInner({ config, eventDetails, formData, totalAmount, onSuccess, onError, }) {
|
|
@@ -4294,7 +4556,6 @@ function PaymentFormInner({ config, eventDetails, formData, totalAmount, onSucce
|
|
|
4294
4556
|
setIsLoading(true);
|
|
4295
4557
|
setPaymentError(null);
|
|
4296
4558
|
try {
|
|
4297
|
-
// Validate participant count before proceeding with payment
|
|
4298
4559
|
const participantCount = formData.participants.filter((p) => p.name.trim()).length;
|
|
4299
4560
|
const availableSpots = eventDetails.availableSpots || 0;
|
|
4300
4561
|
if (participantCount > availableSpots) {
|
|
@@ -4305,7 +4566,6 @@ function PaymentFormInner({ config, eventDetails, formData, totalAmount, onSucce
|
|
|
4305
4566
|
setPaymentError("Mindestens ein Teilnehmer ist erforderlich.");
|
|
4306
4567
|
return;
|
|
4307
4568
|
}
|
|
4308
|
-
// First, confirm the payment with Stripe
|
|
4309
4569
|
const baseUrl = window !== undefined ? window.location.href : `${config.bookingSystemUrl}/booking-success`;
|
|
4310
4570
|
const returnUrl = new URL(baseUrl);
|
|
4311
4571
|
const confirmParams = {
|
|
@@ -4332,7 +4592,6 @@ function PaymentFormInner({ config, eventDetails, formData, totalAmount, onSucce
|
|
|
4332
4592
|
}
|
|
4333
4593
|
return;
|
|
4334
4594
|
}
|
|
4335
|
-
// Payment succeeded, now create the booking
|
|
4336
4595
|
if (paymentIntent && paymentIntent.status === "succeeded") {
|
|
4337
4596
|
onSuccess({
|
|
4338
4597
|
paymentIntent: paymentIntent,
|
|
@@ -4350,7 +4609,12 @@ function PaymentFormInner({ config, eventDetails, formData, totalAmount, onSucce
|
|
|
4350
4609
|
setIsLoading(false);
|
|
4351
4610
|
}
|
|
4352
4611
|
};
|
|
4353
|
-
return (jsxs("form", { onSubmit: handleSubmit,
|
|
4612
|
+
return (jsxs("form", { onSubmit: handleSubmit, style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [jsx("div", { style: {
|
|
4613
|
+
backgroundColor: "rgba(71, 85, 105, 0.3)",
|
|
4614
|
+
border: "1px solid var(--bw-border-color)",
|
|
4615
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4616
|
+
padding: "16px",
|
|
4617
|
+
}, children: jsx(reactStripe_umdExports.PaymentElement, { options: {
|
|
4354
4618
|
layout: "accordion",
|
|
4355
4619
|
defaultValues: {
|
|
4356
4620
|
billingDetails: {
|
|
@@ -4359,22 +4623,46 @@ function PaymentFormInner({ config, eventDetails, formData, totalAmount, onSucce
|
|
|
4359
4623
|
phone: formData.customerPhone,
|
|
4360
4624
|
},
|
|
4361
4625
|
},
|
|
4362
|
-
} }) }), paymentError && (jsxs("div", {
|
|
4626
|
+
} }) }), paymentError && (jsxs("div", { style: {
|
|
4627
|
+
backgroundColor: "rgba(var(--bw-error-color), 0.1)",
|
|
4628
|
+
border: "1px solid var(--bw-error-color)",
|
|
4629
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4630
|
+
padding: "16px",
|
|
4631
|
+
color: "var(--bw-error-color)",
|
|
4632
|
+
fontSize: "16px",
|
|
4633
|
+
fontFamily: "var(--bw-font-family)",
|
|
4634
|
+
}, children: ["\u26A0\uFE0F ", paymentError] })), jsx("button", { type: "submit", disabled: !stripe || isLoading, style: {
|
|
4635
|
+
width: "100%",
|
|
4636
|
+
padding: "12px 24px",
|
|
4637
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
4638
|
+
color: "var(--bw-surface-color)",
|
|
4639
|
+
border: "none",
|
|
4640
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4641
|
+
fontSize: "16px",
|
|
4642
|
+
fontWeight: 600,
|
|
4643
|
+
fontFamily: "var(--bw-font-family)",
|
|
4644
|
+
transition: "all 0.2s ease",
|
|
4645
|
+
display: "flex",
|
|
4646
|
+
alignItems: "center",
|
|
4647
|
+
justifyContent: "center",
|
|
4648
|
+
gap: "8px",
|
|
4649
|
+
cursor: isLoading ? "not-allowed" : "pointer",
|
|
4650
|
+
opacity: isLoading ? 0.6 : 1,
|
|
4651
|
+
}, children: isLoading ? (jsxs(Fragment, { children: [spinner("var(--bw-surface-color)"), " Verarbeite Zahlung..."] })) : (jsx(Fragment, { children: totalAmount <
|
|
4363
4652
|
eventDetails.price * formData.participants.filter((p) => p.name.trim()).length
|
|
4364
4653
|
? "Anzahlen & buchen"
|
|
4365
4654
|
: "Jetzt buchen" })) })] }));
|
|
4366
4655
|
}
|
|
4367
4656
|
// Main PaymentForm component that handles payment intent creation and Elements wrapper
|
|
4368
|
-
function PaymentForm({ config, eventDetails, formData, totalAmount, discountCode, giftCards, onSuccess, onError, systemConfig, stripePromise, stripeAppearance, }) {
|
|
4657
|
+
function PaymentForm({ config, eventDetails, formData, totalAmount, discountCode, giftCards, onSuccess, onError, systemConfig, stripePromise, stripeAppearance, upsellSelections = [], }) {
|
|
4369
4658
|
const [clientSecret, setClientSecret] = useState(null);
|
|
4370
4659
|
const [paymentIntentId, setPaymentIntentId] = useState(null);
|
|
4371
4660
|
const [isCreatingPaymentIntent, setIsCreatingPaymentIntent] = useState(false);
|
|
4372
4661
|
const [paymentError, setPaymentError] = useState(null);
|
|
4373
|
-
// LocalStorage persistence (scoped by organization + event) for paymentIntentId only
|
|
4374
4662
|
const storageKey = typeof window !== "undefined"
|
|
4375
4663
|
? `bw_pi_${config?.organizationId}_${config?.eventInstanceId || eventDetails?.id}`
|
|
4376
4664
|
: "";
|
|
4377
|
-
const PAYMENT_INTENT_TTL = 24 * 60 * 60 * 1000;
|
|
4665
|
+
const PAYMENT_INTENT_TTL = 24 * 60 * 60 * 1000;
|
|
4378
4666
|
function loadPersistedPaymentIntent() {
|
|
4379
4667
|
if (typeof window === "undefined" || !storageKey)
|
|
4380
4668
|
return null;
|
|
@@ -4412,7 +4700,6 @@ function PaymentForm({ config, eventDetails, formData, totalAmount, discountCode
|
|
|
4412
4700
|
}
|
|
4413
4701
|
catch { }
|
|
4414
4702
|
}
|
|
4415
|
-
// On mount (and when scope changes), restore persisted paymentIntentId
|
|
4416
4703
|
useEffect(() => {
|
|
4417
4704
|
if (!paymentIntentId) {
|
|
4418
4705
|
const restored = loadPersistedPaymentIntent();
|
|
@@ -4421,20 +4708,16 @@ function PaymentForm({ config, eventDetails, formData, totalAmount, discountCode
|
|
|
4421
4708
|
}
|
|
4422
4709
|
}
|
|
4423
4710
|
}, [storageKey]);
|
|
4424
|
-
// Persist whenever paymentIntentId changes
|
|
4425
4711
|
useEffect(() => {
|
|
4426
4712
|
if (paymentIntentId) {
|
|
4427
4713
|
persistPaymentIntent(paymentIntentId);
|
|
4428
4714
|
}
|
|
4429
4715
|
}, [paymentIntentId]);
|
|
4430
|
-
// Create payment intent when component mounts or when relevant data changes
|
|
4431
|
-
// Note: Detailed validation is handled by BookingForm before this component renders
|
|
4432
4716
|
useEffect(() => {
|
|
4433
4717
|
const createPaymentIntent = async () => {
|
|
4434
4718
|
if (!systemConfig || !eventDetails || !formData.participants?.length) {
|
|
4435
4719
|
return;
|
|
4436
4720
|
}
|
|
4437
|
-
// Basic safety check - detailed validation already done in BookingForm
|
|
4438
4721
|
const participantCount = formData.participants?.filter((p) => p.name?.trim()).length || 0;
|
|
4439
4722
|
if (participantCount === 0 || !formData.customerEmail?.trim() || !formData.customerName?.trim()) {
|
|
4440
4723
|
return;
|
|
@@ -4455,8 +4738,8 @@ function PaymentForm({ config, eventDetails, formData, totalAmount, discountCode
|
|
|
4455
4738
|
customerPhone: formData.customerPhone?.trim(),
|
|
4456
4739
|
comment: formData.comment?.trim(),
|
|
4457
4740
|
...(paymentIntentId && { paymentIntentId }),
|
|
4741
|
+
...(upsellSelections && upsellSelections.length > 0 && { upsellSelections }),
|
|
4458
4742
|
};
|
|
4459
|
-
// Validate required fields
|
|
4460
4743
|
if (!requestData.eventInstanceId) {
|
|
4461
4744
|
throw new Error("Event instance ID is required");
|
|
4462
4745
|
}
|
|
@@ -4500,7 +4783,6 @@ function PaymentForm({ config, eventDetails, formData, totalAmount, discountCode
|
|
|
4500
4783
|
setIsCreatingPaymentIntent(false);
|
|
4501
4784
|
}
|
|
4502
4785
|
};
|
|
4503
|
-
// Debounce the payment intent creation
|
|
4504
4786
|
const timer = setTimeout(createPaymentIntent, 500);
|
|
4505
4787
|
return () => clearTimeout(timer);
|
|
4506
4788
|
}, [
|
|
@@ -4513,8 +4795,8 @@ function PaymentForm({ config, eventDetails, formData, totalAmount, discountCode
|
|
|
4513
4795
|
discountCode,
|
|
4514
4796
|
giftCards,
|
|
4515
4797
|
config,
|
|
4798
|
+
upsellSelections,
|
|
4516
4799
|
]);
|
|
4517
|
-
// Calculate total gift card coverage
|
|
4518
4800
|
const totalGiftCardAmount = giftCards.reduce((sum, gc) => sum + (gc.balanceToUse || gc.discountAmount || 0), 0);
|
|
4519
4801
|
const baseTotal = eventDetails?.price
|
|
4520
4802
|
? eventDetails.price * (formData.participants?.filter((p) => p.name?.trim()).length || 0)
|
|
@@ -4522,19 +4804,33 @@ function PaymentForm({ config, eventDetails, formData, totalAmount, discountCode
|
|
|
4522
4804
|
const discountAmount = discountCode?.discountAmount || 0;
|
|
4523
4805
|
const amountAfterDiscount = Math.max(0, baseTotal - discountAmount);
|
|
4524
4806
|
const isFullyCoveredByGiftCards = totalGiftCardAmount >= amountAfterDiscount && amountAfterDiscount > 0;
|
|
4525
|
-
// If gift cards fully cover the payment, show a simplified booking button
|
|
4526
4807
|
if (isFullyCoveredByGiftCards && totalAmount <= 0) {
|
|
4527
|
-
return (jsx(GiftCardOnlyBooking, { config: config, eventDetails: eventDetails, formData: formData, discountCode: discountCode, giftCards: giftCards, onSuccess: onSuccess, onError: onError }));
|
|
4808
|
+
return (jsx(GiftCardOnlyBooking, { config: config, eventDetails: eventDetails, formData: formData, discountCode: discountCode, giftCards: giftCards, onSuccess: onSuccess, onError: onError, upsellSelections: upsellSelections }));
|
|
4528
4809
|
}
|
|
4529
|
-
// Show loading state while creating payment intent
|
|
4530
4810
|
if (isCreatingPaymentIntent || !clientSecret) {
|
|
4531
|
-
return (jsxs("div", {
|
|
4811
|
+
return (jsxs("div", { style: {
|
|
4812
|
+
display: "flex",
|
|
4813
|
+
alignItems: "center",
|
|
4814
|
+
justifyContent: "center",
|
|
4815
|
+
padding: "16px",
|
|
4816
|
+
gap: "8px",
|
|
4817
|
+
}, children: [spinner(), jsx("span", { style: {
|
|
4818
|
+
color: "var(--bw-text-muted)",
|
|
4819
|
+
fontFamily: "var(--bw-font-family)",
|
|
4820
|
+
fontSize: "16px",
|
|
4821
|
+
}, children: "Zahlungsm\u00F6glichkeiten werden geladen..." })] }));
|
|
4532
4822
|
}
|
|
4533
|
-
// Show error if payment intent creation failed
|
|
4534
4823
|
if (paymentError) {
|
|
4535
|
-
return (jsxs("div", {
|
|
4824
|
+
return (jsxs("div", { style: {
|
|
4825
|
+
backgroundColor: "rgba(var(--bw-error-color), 0.1)",
|
|
4826
|
+
border: "1px solid var(--bw-error-color)",
|
|
4827
|
+
borderRadius: "var(--bw-border-radius)",
|
|
4828
|
+
padding: "16px",
|
|
4829
|
+
color: "var(--bw-error-color)",
|
|
4830
|
+
fontSize: "16px",
|
|
4831
|
+
fontFamily: "var(--bw-font-family)",
|
|
4832
|
+
}, children: ["\u26A0\uFE0F ", paymentError] }));
|
|
4536
4833
|
}
|
|
4537
|
-
// Render the payment form with Elements wrapper
|
|
4538
4834
|
return (
|
|
4539
4835
|
// @ts-ignore
|
|
4540
4836
|
jsx(reactStripe_umdExports.Elements, { stripe: stripePromise, options: {
|
|
@@ -4542,7 +4838,6 @@ function PaymentForm({ config, eventDetails, formData, totalAmount, discountCode
|
|
|
4542
4838
|
appearance: stripeAppearance || { theme: "stripe" },
|
|
4543
4839
|
locale: (config.locale) || "de",
|
|
4544
4840
|
}, children: jsx(PaymentFormInner, { config: config, eventDetails: eventDetails, formData: formData, totalAmount: totalAmount, onSuccess: (result) => {
|
|
4545
|
-
// Clear persisted PI data on successful payment
|
|
4546
4841
|
clearPersistedPaymentIntent();
|
|
4547
4842
|
setPaymentIntentId(null);
|
|
4548
4843
|
setClientSecret(null);
|
|
@@ -4551,7 +4846,7 @@ function PaymentForm({ config, eventDetails, formData, totalAmount, discountCode
|
|
|
4551
4846
|
}
|
|
4552
4847
|
|
|
4553
4848
|
const SidebarGlobal = Sidebar;
|
|
4554
|
-
function Sidebar({ isOpen, onClose, title, children, width = "450px", }) {
|
|
4849
|
+
function Sidebar({ isOpen, onClose, title, children, width = "450px", footer, }) {
|
|
4555
4850
|
const [isVisible, setIsVisible] = useState(false);
|
|
4556
4851
|
const [isAnimating, setIsAnimating] = useState(false);
|
|
4557
4852
|
const themedStyles = useStyles();
|
|
@@ -4624,36 +4919,135 @@ function Sidebar({ isOpen, onClose, title, children, width = "450px", }) {
|
|
|
4624
4919
|
}, [isOpen, onClose]);
|
|
4625
4920
|
if (!isVisible)
|
|
4626
4921
|
return null;
|
|
4627
|
-
const sidebarContent = (jsxs("div", {
|
|
4922
|
+
const sidebarContent = (jsxs("div", { style: {
|
|
4923
|
+
...themedStyles,
|
|
4924
|
+
position: "fixed",
|
|
4925
|
+
inset: 0,
|
|
4926
|
+
zIndex: 1000,
|
|
4927
|
+
fontFamily: "var(--bw-font-family)",
|
|
4928
|
+
}, children: [jsx("div", { style: {
|
|
4929
|
+
position: "absolute",
|
|
4930
|
+
inset: 0,
|
|
4931
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
4932
|
+
backdropFilter: "blur(4px)",
|
|
4933
|
+
transition: "opacity 0.25s ease-out",
|
|
4934
|
+
opacity: isAnimating ? 1 : 0,
|
|
4935
|
+
}, onClick: onClose }), jsxs("div", { className: "sidebar-mobile", style: {
|
|
4936
|
+
position: "absolute",
|
|
4937
|
+
top: 0,
|
|
4938
|
+
right: 0,
|
|
4939
|
+
bottom: 0,
|
|
4940
|
+
display: "flex",
|
|
4941
|
+
flexDirection: "column",
|
|
4942
|
+
overflow: "hidden",
|
|
4943
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
4944
|
+
borderLeft: "1px solid var(--bw-border-color)",
|
|
4945
|
+
boxShadow: "var(--bw-shadow-lg)",
|
|
4946
|
+
transition: "transform 0.25s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
4947
|
+
willChange: "transform",
|
|
4628
4948
|
width,
|
|
4629
4949
|
maxWidth: "90vw",
|
|
4630
4950
|
transform: isAnimating ? "translateX(0)" : "translateX(100%)",
|
|
4631
|
-
}, children: [jsxs("div", {
|
|
4951
|
+
}, children: [jsxs("div", { style: {
|
|
4952
|
+
display: "flex",
|
|
4953
|
+
alignItems: "center",
|
|
4954
|
+
justifyContent: "space-between",
|
|
4955
|
+
flexShrink: 0,
|
|
4956
|
+
padding: "12px 16px",
|
|
4957
|
+
borderBottom: "1px solid var(--bw-border-color)",
|
|
4958
|
+
backgroundColor: "var(--bw-background-color)",
|
|
4959
|
+
}, children: [jsx("h2", { style: {
|
|
4960
|
+
margin: 0,
|
|
4961
|
+
fontWeight: 600,
|
|
4962
|
+
fontSize: "16px",
|
|
4963
|
+
color: "var(--bw-text-color)",
|
|
4964
|
+
fontFamily: "var(--bw-font-family)",
|
|
4965
|
+
flex: 1,
|
|
4966
|
+
paddingRight: "12px",
|
|
4967
|
+
}, children: title }), jsx("button", { onClick: onClose, "aria-label": "Schlie\u00DFen", style: {
|
|
4968
|
+
display: "flex",
|
|
4969
|
+
alignItems: "center",
|
|
4970
|
+
justifyContent: "center",
|
|
4971
|
+
cursor: "pointer",
|
|
4972
|
+
width: "32px",
|
|
4973
|
+
height: "32px",
|
|
4974
|
+
borderRadius: "50%",
|
|
4975
|
+
backgroundColor: "transparent",
|
|
4976
|
+
border: "1px solid var(--bw-border-color)",
|
|
4977
|
+
color: "var(--bw-text-muted)",
|
|
4978
|
+
fontSize: "18px",
|
|
4979
|
+
fontFamily: "var(--bw-font-family)",
|
|
4980
|
+
fontWeight: 400,
|
|
4981
|
+
transition: "all 0.2s ease",
|
|
4982
|
+
flexShrink: 0,
|
|
4983
|
+
}, children: "\u00D7" })] }), jsx("div", { style: {
|
|
4984
|
+
flex: 1,
|
|
4985
|
+
overflow: "auto",
|
|
4986
|
+
backgroundColor: "var(--bw-background-color)",
|
|
4987
|
+
}, children: children }), footer && (jsx("div", { className: "bw-sidebar-footer", style: {
|
|
4988
|
+
flexShrink: 0,
|
|
4989
|
+
padding: "12px 16px",
|
|
4990
|
+
borderTop: "1px solid var(--bw-border-color)",
|
|
4991
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
4992
|
+
display: "flex",
|
|
4993
|
+
gap: "12px",
|
|
4994
|
+
}, children: footer }))] })] }));
|
|
4632
4995
|
return portalRootRef.current
|
|
4633
4996
|
? ReactDOM.createPortal(sidebarContent, portalRootRef.current)
|
|
4634
4997
|
: null;
|
|
4635
4998
|
}
|
|
4636
4999
|
function Accordion({ title, priceInfo, children, isOpen, onToggle, }) {
|
|
4637
|
-
return (jsxs("div", {
|
|
5000
|
+
return (jsxs("div", { style: {
|
|
5001
|
+
overflow: "hidden",
|
|
5002
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
5003
|
+
border: "1px solid var(--bw-border-color)",
|
|
5004
|
+
borderRadius: "var(--bw-border-radius)",
|
|
5005
|
+
}, children: [jsxs("button", { type: "button", className: "accordion-trigger", onClick: onToggle, style: {
|
|
5006
|
+
width: "100%",
|
|
5007
|
+
display: "flex",
|
|
5008
|
+
justifyContent: "space-between",
|
|
5009
|
+
alignItems: "center",
|
|
5010
|
+
textAlign: "left",
|
|
5011
|
+
cursor: "pointer",
|
|
5012
|
+
padding: "16px",
|
|
5013
|
+
backgroundColor: "transparent",
|
|
5014
|
+
border: "none",
|
|
5015
|
+
fontFamily: "var(--bw-font-family)",
|
|
5016
|
+
transition: "background-color 0.2s ease",
|
|
5017
|
+
}, children: [jsx("span", { style: {
|
|
5018
|
+
fontWeight: 700,
|
|
5019
|
+
fontSize: "18px",
|
|
5020
|
+
color: "var(--bw-text-color)",
|
|
5021
|
+
}, children: title }), priceInfo && (jsx("div", { style: {
|
|
5022
|
+
marginLeft: "auto",
|
|
5023
|
+
fontWeight: 500,
|
|
5024
|
+
fontSize: "16px",
|
|
5025
|
+
color: "var(--bw-highlight-color)",
|
|
5026
|
+
}, children: priceInfo })), jsx("span", { className: "accordion-chevron", style: {
|
|
5027
|
+
marginLeft: "16px",
|
|
5028
|
+
fontSize: "16px",
|
|
5029
|
+
transition: "transform 0.2s ease",
|
|
4638
5030
|
transform: isOpen ? "rotate(180deg)" : "rotate(0deg)",
|
|
4639
|
-
}, children: "\u25BC" })] }), isOpen && (jsx("div", {
|
|
5031
|
+
}, children: "\u25BC" })] }), isOpen && (jsx("div", { style: {
|
|
5032
|
+
padding: "0 16px 16px 16px",
|
|
5033
|
+
borderTop: "1px solid var(--bw-border-color)",
|
|
5034
|
+
backgroundColor: "var(--bw-background-color)",
|
|
5035
|
+
}, children: children }))] }));
|
|
4640
5036
|
}
|
|
4641
5037
|
|
|
4642
5038
|
// Spinner icon (kept local as it has animation style)
|
|
4643
|
-
const IconSpinner = ({ size = 16, color = "currentColor" }) => (jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round",
|
|
5039
|
+
const IconSpinner = ({ size = 16, color = "currentColor" }) => (jsx("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", style: { animation: "spin 1s linear infinite" }, children: jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }));
|
|
4644
5040
|
function VoucherInput({ config, orderValue, eventInstanceId, customerEmail, onVoucherValidated, appliedVouchers, onRemoveVoucher, disabled = false, }) {
|
|
4645
5041
|
const [inputValue, setInputValue] = useState("");
|
|
4646
5042
|
const [isLoading, setIsLoading] = useState(false);
|
|
4647
5043
|
const [error, setError] = useState(null);
|
|
4648
5044
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
4649
|
-
// Check if a discount code is already applied (only one allowed)
|
|
4650
5045
|
const hasDiscountCode = appliedVouchers.some((v) => v.type === "discount");
|
|
4651
5046
|
const validateVoucher = useCallback(async (code) => {
|
|
4652
5047
|
if (!code.trim()) {
|
|
4653
5048
|
setError(null);
|
|
4654
5049
|
return;
|
|
4655
5050
|
}
|
|
4656
|
-
// Check if code is already applied
|
|
4657
5051
|
if (appliedVouchers.some((v) => v.code.toUpperCase() === code.toUpperCase())) {
|
|
4658
5052
|
setError("Dieser Code wurde bereits angewendet");
|
|
4659
5053
|
return;
|
|
@@ -4673,7 +5067,6 @@ function VoucherInput({ config, orderValue, eventInstanceId, customerEmail, onVo
|
|
|
4673
5067
|
});
|
|
4674
5068
|
const data = await response.json();
|
|
4675
5069
|
if (data.valid && data.voucher) {
|
|
4676
|
-
// Check if trying to add a second discount code
|
|
4677
5070
|
if (data.voucher.type === "discount" && hasDiscountCode) {
|
|
4678
5071
|
setError("Es kann nur ein Rabattcode verwendet werden");
|
|
4679
5072
|
onVoucherValidated(null, "Es kann nur ein Rabattcode verwendet werden");
|
|
@@ -4718,18 +5111,122 @@ function VoucherInput({ config, orderValue, eventInstanceId, customerEmail, onVo
|
|
|
4718
5111
|
}
|
|
4719
5112
|
}
|
|
4720
5113
|
};
|
|
4721
|
-
return (jsxs("div", {
|
|
5114
|
+
return (jsxs("div", { style: {
|
|
5115
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
5116
|
+
border: "1px solid var(--bw-border-color)",
|
|
5117
|
+
borderRadius: "var(--bw-border-radius)",
|
|
5118
|
+
overflow: "hidden",
|
|
5119
|
+
}, children: [jsxs("button", { type: "button", onClick: () => setIsExpanded(!isExpanded), style: {
|
|
5120
|
+
width: "100%",
|
|
5121
|
+
padding: "16px",
|
|
5122
|
+
backgroundColor: "transparent",
|
|
5123
|
+
border: "none",
|
|
5124
|
+
cursor: "pointer",
|
|
5125
|
+
display: "flex",
|
|
5126
|
+
alignItems: "center",
|
|
5127
|
+
justifyContent: "space-between",
|
|
5128
|
+
color: "var(--bw-text-color)",
|
|
5129
|
+
fontFamily: "var(--bw-font-family)",
|
|
5130
|
+
fontSize: "16px",
|
|
5131
|
+
fontWeight: 500,
|
|
5132
|
+
}, children: [jsxs("span", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [jsx(IconTicket, { size: 18, color: "var(--bw-highlight-color)" }), "Rabattcode oder Gutschein", appliedVouchers.length > 0 && (jsx("span", { style: {
|
|
5133
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
5134
|
+
color: "#ffffff",
|
|
5135
|
+
padding: "2px 8px",
|
|
5136
|
+
borderRadius: "9999px",
|
|
5137
|
+
fontSize: "12px",
|
|
5138
|
+
fontWeight: 600,
|
|
5139
|
+
}, children: appliedVouchers.length }))] }), jsx("span", { style: {
|
|
5140
|
+
transition: "transform 0.2s ease",
|
|
5141
|
+
transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)",
|
|
5142
|
+
}, children: "\u25BC" })] }), isExpanded && (jsxs("div", { style: { padding: "0 16px 16px 16px" }, children: [appliedVouchers.length > 0 && (jsx("div", { style: { marginBottom: "12px" }, children: appliedVouchers.map((voucher) => (jsxs("div", { style: {
|
|
5143
|
+
display: "flex",
|
|
5144
|
+
alignItems: "center",
|
|
5145
|
+
justifyContent: "space-between",
|
|
5146
|
+
padding: "10px 12px",
|
|
5147
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
5148
|
+
border: "1px solid var(--bw-border-color)",
|
|
5149
|
+
borderRadius: "var(--bw-border-radius)",
|
|
5150
|
+
marginBottom: "8px",
|
|
5151
|
+
}, children: [jsxs("div", { style: { display: "flex", alignItems: "center", gap: "10px" }, children: [voucher.type === "discount" ? (jsx(IconTicket, { size: 18, color: "var(--bw-success-color)" })) : (jsx(IconGift, { size: 18, color: "var(--bw-success-color)" })), jsxs("div", { children: [jsxs("div", { style: {
|
|
5152
|
+
fontFamily: "var(--bw-font-family)",
|
|
5153
|
+
fontSize: "16px",
|
|
5154
|
+
fontWeight: 600,
|
|
5155
|
+
color: "var(--bw-text-color)",
|
|
5156
|
+
display: "flex",
|
|
5157
|
+
alignItems: "center",
|
|
5158
|
+
gap: "6px",
|
|
5159
|
+
}, children: [jsx("span", { style: { fontFamily: "ui-monospace, monospace" }, children: voucher.code }), jsx(IconCheck, { size: 14, color: "var(--bw-success-color)" })] }), jsxs("div", { style: {
|
|
5160
|
+
fontFamily: "var(--bw-font-family)",
|
|
5161
|
+
fontSize: "12px",
|
|
5162
|
+
color: "var(--bw-success-color)",
|
|
5163
|
+
}, children: [voucher.type === "discount"
|
|
4722
5164
|
? `−${formatCurrency(voucher.discountAmount)} Rabatt`
|
|
4723
5165
|
: `−${formatCurrency(voucher.balanceToUse || voucher.discountAmount)} Gutschein`, voucher.type === "giftCard" &&
|
|
4724
5166
|
voucher.remainingBalance !== undefined &&
|
|
4725
|
-
voucher.remainingBalance > 0 && (jsxs("span", {
|
|
5167
|
+
voucher.remainingBalance > 0 && (jsxs("span", { style: { color: "var(--bw-text-muted)", marginLeft: "8px" }, children: ["(Rest: ", formatCurrency(voucher.remainingBalance), ")"] }))] })] })] }), jsx("button", { type: "button", onClick: () => onRemoveVoucher(voucher.code), style: {
|
|
5168
|
+
backgroundColor: "transparent",
|
|
5169
|
+
border: "none",
|
|
5170
|
+
padding: "4px",
|
|
5171
|
+
cursor: "pointer",
|
|
5172
|
+
color: "var(--bw-error-color)",
|
|
5173
|
+
display: "flex",
|
|
5174
|
+
alignItems: "center",
|
|
5175
|
+
justifyContent: "center",
|
|
5176
|
+
borderRadius: "50%",
|
|
5177
|
+
transition: "background-color 0.2s ease",
|
|
5178
|
+
}, title: "Entfernen", children: jsx(IconX, { size: 16 }) })] }, voucher.code))) })), jsxs("div", { style: { display: "flex", gap: "8px" }, children: [jsx("input", { type: "text", value: inputValue, onChange: (e) => {
|
|
4726
5179
|
setInputValue(e.target.value.toUpperCase());
|
|
4727
5180
|
setError(null);
|
|
4728
5181
|
}, onKeyDown: handleKeyDown, placeholder: hasDiscountCode
|
|
4729
5182
|
? "Gutscheincode eingeben..."
|
|
4730
|
-
: "Rabatt- oder Gutscheincode eingeben...",
|
|
4731
|
-
|
|
4732
|
-
: "
|
|
5183
|
+
: "Rabatt- oder Gutscheincode eingeben...", style: {
|
|
5184
|
+
flex: 1,
|
|
5185
|
+
padding: "10px 12px",
|
|
5186
|
+
backgroundColor: "var(--bw-background-color)",
|
|
5187
|
+
border: "1px solid var(--bw-border-color)",
|
|
5188
|
+
borderRadius: "var(--bw-border-radius)",
|
|
5189
|
+
color: "var(--bw-text-color)",
|
|
5190
|
+
fontSize: "16px",
|
|
5191
|
+
fontFamily: "var(--bw-font-family)",
|
|
5192
|
+
outline: "none",
|
|
5193
|
+
transition: "all 0.2s ease",
|
|
5194
|
+
textTransform: "uppercase",
|
|
5195
|
+
}, disabled: disabled || isLoading }), jsx("button", { type: "button", onClick: handleSubmit, disabled: disabled || isLoading || !inputValue.trim(), style: {
|
|
5196
|
+
padding: "10px 16px",
|
|
5197
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
5198
|
+
border: "none",
|
|
5199
|
+
borderRadius: "var(--bw-border-radius)",
|
|
5200
|
+
color: "#ffffff",
|
|
5201
|
+
fontSize: "16px",
|
|
5202
|
+
fontFamily: "var(--bw-font-family)",
|
|
5203
|
+
fontWeight: 600,
|
|
5204
|
+
transition: "all 0.2s ease",
|
|
5205
|
+
display: "flex",
|
|
5206
|
+
alignItems: "center",
|
|
5207
|
+
justifyContent: "center",
|
|
5208
|
+
gap: "6px",
|
|
5209
|
+
minWidth: "100px",
|
|
5210
|
+
cursor: disabled || isLoading ? "not-allowed" : "pointer",
|
|
5211
|
+
opacity: disabled || isLoading ? 0.6 : 1,
|
|
5212
|
+
}, children: isLoading ? (jsx(IconSpinner, { size: 16, color: "#fff" })) : (jsxs(Fragment, { children: [jsx(IconCheck, { size: 16 }), "Einl\u00F6sen"] })) })] }), error && (jsxs("div", { style: {
|
|
5213
|
+
marginTop: "8px",
|
|
5214
|
+
padding: "8px 12px",
|
|
5215
|
+
backgroundColor: "rgba(var(--bw-error-color), 0.15)",
|
|
5216
|
+
border: "1px solid rgba(var(--bw-error-color), 0.4)",
|
|
5217
|
+
borderRadius: "var(--bw-border-radius)",
|
|
5218
|
+
color: "var(--bw-error-color)",
|
|
5219
|
+
fontSize: "16px",
|
|
5220
|
+
fontFamily: "var(--bw-font-family)",
|
|
5221
|
+
display: "flex",
|
|
5222
|
+
alignItems: "center",
|
|
5223
|
+
gap: "8px",
|
|
5224
|
+
}, children: [jsx(IconX, { size: 16 }), error] })), hasDiscountCode && (jsx("div", { style: {
|
|
5225
|
+
marginTop: "8px",
|
|
5226
|
+
fontSize: "12px",
|
|
5227
|
+
color: "var(--bw-text-muted)",
|
|
5228
|
+
fontFamily: "var(--bw-font-family)",
|
|
5229
|
+
}, children: "\uD83D\uDCA1 Es wurde bereits ein Rabattcode angewendet. Du kannst weitere Gutscheine hinzuf\u00FCgen." }))] }))] }));
|
|
4733
5230
|
}
|
|
4734
5231
|
|
|
4735
5232
|
var util;
|
|
@@ -8535,12 +9032,199 @@ function createBookingFormSchema() {
|
|
|
8535
9032
|
// Pre-created schema instance
|
|
8536
9033
|
createBookingFormSchema();
|
|
8537
9034
|
|
|
9035
|
+
/**
|
|
9036
|
+
* Shared inline styles for the booking widget.
|
|
9037
|
+
*
|
|
9038
|
+
* This module provides consistent styling across all components using inline styles.
|
|
9039
|
+
* We use inline styles because:
|
|
9040
|
+
* 1. The widget renders components in portals (outside the main DOM tree)
|
|
9041
|
+
* 2. CSS classes may not be available in all embedding contexts (iframes, shadow DOM)
|
|
9042
|
+
* 3. Inline styles with CSS variables provide theming while guaranteeing styles are applied
|
|
9043
|
+
*
|
|
9044
|
+
* Usage:
|
|
9045
|
+
* import { buttonStyles, cardStyles } from "../../styles/shared-styles";
|
|
9046
|
+
* <button style={buttonStyles.primary}>Click me</button>
|
|
9047
|
+
*/
|
|
9048
|
+
// ============================================
|
|
9049
|
+
// BUTTONS
|
|
9050
|
+
// ============================================
|
|
9051
|
+
const buttonBase = {
|
|
9052
|
+
display: "inline-flex",
|
|
9053
|
+
alignItems: "center",
|
|
9054
|
+
justifyContent: "center",
|
|
9055
|
+
gap: "6px",
|
|
9056
|
+
padding: "12px 16px",
|
|
9057
|
+
borderRadius: "var(--bw-border-radius)",
|
|
9058
|
+
fontSize: "14px",
|
|
9059
|
+
fontWeight: 600,
|
|
9060
|
+
fontFamily: "var(--bw-font-family)",
|
|
9061
|
+
cursor: "pointer",
|
|
9062
|
+
transition: "all 0.2s ease",
|
|
9063
|
+
whiteSpace: "nowrap",
|
|
9064
|
+
border: "none",
|
|
9065
|
+
};
|
|
9066
|
+
const buttonStyles = {
|
|
9067
|
+
primary: {
|
|
9068
|
+
...buttonBase,
|
|
9069
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
9070
|
+
color: "#ffffff",
|
|
9071
|
+
border: "none",
|
|
9072
|
+
},
|
|
9073
|
+
secondary: {
|
|
9074
|
+
...buttonBase,
|
|
9075
|
+
backgroundColor: "transparent",
|
|
9076
|
+
color: "var(--bw-text-muted)",
|
|
9077
|
+
border: "1px solid var(--bw-border-color)",
|
|
9078
|
+
},
|
|
9079
|
+
// Full width modifier
|
|
9080
|
+
fullWidth: {
|
|
9081
|
+
width: "100%",
|
|
9082
|
+
flex: 1,
|
|
9083
|
+
},
|
|
9084
|
+
};
|
|
9085
|
+
// ============================================
|
|
9086
|
+
// CARDS
|
|
9087
|
+
// ============================================
|
|
9088
|
+
const cardStyles$1 = {
|
|
9089
|
+
base: {
|
|
9090
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
9091
|
+
border: "1px solid var(--bw-border-color)",
|
|
9092
|
+
borderRadius: "var(--bw-border-radius)",
|
|
9093
|
+
padding: "20px",
|
|
9094
|
+
marginBottom: "20px",
|
|
9095
|
+
}};
|
|
9096
|
+
// ============================================
|
|
9097
|
+
// FORMS
|
|
9098
|
+
// ============================================
|
|
9099
|
+
const formStyles = {
|
|
9100
|
+
label: {
|
|
9101
|
+
display: "block",
|
|
9102
|
+
fontSize: "14px",
|
|
9103
|
+
fontWeight: 500,
|
|
9104
|
+
color: "var(--bw-text-muted)",
|
|
9105
|
+
marginBottom: "6px",
|
|
9106
|
+
fontFamily: "var(--bw-font-family)",
|
|
9107
|
+
},
|
|
9108
|
+
input: {
|
|
9109
|
+
width: "100%",
|
|
9110
|
+
padding: "8px 12px",
|
|
9111
|
+
backgroundColor: "var(--bw-background-color)",
|
|
9112
|
+
border: "1px solid var(--bw-border-color)",
|
|
9113
|
+
borderRadius: "var(--bw-border-radius)",
|
|
9114
|
+
color: "var(--bw-text-color)",
|
|
9115
|
+
fontSize: "16px", // Keep 16px for iOS zoom prevention
|
|
9116
|
+
fontFamily: "var(--bw-font-family)",
|
|
9117
|
+
outline: "none",
|
|
9118
|
+
transition: "all 0.2s ease",
|
|
9119
|
+
},
|
|
9120
|
+
checkbox: {
|
|
9121
|
+
width: "20px",
|
|
9122
|
+
height: "20px",
|
|
9123
|
+
border: "1px solid var(--bw-border-color)",
|
|
9124
|
+
accentColor: "var(--bw-highlight-color)",
|
|
9125
|
+
cursor: "pointer",
|
|
9126
|
+
},
|
|
9127
|
+
error: {
|
|
9128
|
+
color: "var(--bw-error-color)",
|
|
9129
|
+
fontSize: "13px",
|
|
9130
|
+
marginTop: "4px",
|
|
9131
|
+
fontFamily: "var(--bw-font-family)",
|
|
9132
|
+
}};
|
|
9133
|
+
// ============================================
|
|
9134
|
+
// SECTION HEADERS
|
|
9135
|
+
// ============================================
|
|
9136
|
+
const sectionStyles = {
|
|
9137
|
+
header: {
|
|
9138
|
+
fontSize: "16px",
|
|
9139
|
+
fontWeight: 600,
|
|
9140
|
+
color: "var(--bw-highlight-color)",
|
|
9141
|
+
margin: 0,
|
|
9142
|
+
marginBottom: "12px",
|
|
9143
|
+
fontFamily: "var(--bw-font-family)",
|
|
9144
|
+
borderBottom: "2px solid var(--bw-highlight-color)",
|
|
9145
|
+
paddingBottom: "4px",
|
|
9146
|
+
}};
|
|
9147
|
+
// ============================================
|
|
9148
|
+
// TEXT
|
|
9149
|
+
// ============================================
|
|
9150
|
+
const textStyles = {
|
|
9151
|
+
muted: {
|
|
9152
|
+
fontSize: "14px",
|
|
9153
|
+
color: "var(--bw-text-muted)",
|
|
9154
|
+
fontFamily: "var(--bw-font-family)",
|
|
9155
|
+
}};
|
|
9156
|
+
// ============================================
|
|
9157
|
+
// PARTICIPANT UPSELLS
|
|
9158
|
+
// ============================================
|
|
9159
|
+
const participantUpsellStyles = {
|
|
9160
|
+
container: {
|
|
9161
|
+
display: "flex",
|
|
9162
|
+
flexWrap: "wrap",
|
|
9163
|
+
gap: "8px",
|
|
9164
|
+
marginTop: "10px",
|
|
9165
|
+
paddingTop: "10px",
|
|
9166
|
+
borderTop: "1px dashed var(--bw-border-color)",
|
|
9167
|
+
},
|
|
9168
|
+
label: {
|
|
9169
|
+
display: "inline-flex",
|
|
9170
|
+
alignItems: "center",
|
|
9171
|
+
gap: "6px",
|
|
9172
|
+
padding: "6px 10px",
|
|
9173
|
+
backgroundColor: "var(--bw-background-color)",
|
|
9174
|
+
border: "1px solid var(--bw-border-color)",
|
|
9175
|
+
borderRadius: "var(--bw-border-radius-small, 8px)",
|
|
9176
|
+
fontSize: "13px",
|
|
9177
|
+
fontFamily: "var(--bw-font-family)",
|
|
9178
|
+
color: "var(--bw-text-muted)",
|
|
9179
|
+
cursor: "pointer",
|
|
9180
|
+
transition: "all 0.2s ease",
|
|
9181
|
+
},
|
|
9182
|
+
labelSelected: {
|
|
9183
|
+
display: "inline-flex",
|
|
9184
|
+
alignItems: "center",
|
|
9185
|
+
gap: "6px",
|
|
9186
|
+
padding: "6px 10px",
|
|
9187
|
+
backgroundColor: "rgba(var(--bw-highlight-color-rgb, 0, 177, 170), 0.1)",
|
|
9188
|
+
border: "1px solid var(--bw-highlight-color)",
|
|
9189
|
+
borderRadius: "var(--bw-border-radius-small, 8px)",
|
|
9190
|
+
fontSize: "13px",
|
|
9191
|
+
fontFamily: "var(--bw-font-family)",
|
|
9192
|
+
color: "var(--bw-highlight-color)",
|
|
9193
|
+
cursor: "pointer",
|
|
9194
|
+
transition: "all 0.2s ease",
|
|
9195
|
+
},
|
|
9196
|
+
checkbox: {
|
|
9197
|
+
width: "16px",
|
|
9198
|
+
height: "16px",
|
|
9199
|
+
accentColor: "var(--bw-highlight-color)",
|
|
9200
|
+
cursor: "pointer",
|
|
9201
|
+
},
|
|
9202
|
+
};
|
|
9203
|
+
// ============================================
|
|
9204
|
+
// HELPER FUNCTIONS
|
|
9205
|
+
// ============================================
|
|
9206
|
+
/**
|
|
9207
|
+
* Merge multiple style objects together
|
|
9208
|
+
*/
|
|
9209
|
+
function mergeStyles(...styles) {
|
|
9210
|
+
return Object.assign({}, ...styles.filter(Boolean));
|
|
9211
|
+
}
|
|
9212
|
+
|
|
8538
9213
|
// Pre-typed resolver - cast schema to any to avoid deep type instantiation in zodResolver
|
|
8539
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8540
9214
|
const bookingResolver = t(createBookingFormSchema());
|
|
8541
|
-
|
|
8542
|
-
|
|
9215
|
+
// Local style aliases from shared styles
|
|
9216
|
+
const cardStyles = cardStyles$1.base;
|
|
9217
|
+
const sectionHeaderStyles = sectionStyles.header;
|
|
9218
|
+
const labelStyles = formStyles.label;
|
|
9219
|
+
const inputStyles = formStyles.input;
|
|
9220
|
+
const errorTextStyles = formStyles.error;
|
|
9221
|
+
function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError, onBackToEventInstances, onBackToEventTypes, selectedEventType, selectedEventInstance, isOpen, onClose, systemConfig, selectedUpsells = [], upsells = [], }) {
|
|
8543
9222
|
const [appliedVouchers, setAppliedVouchers] = useState([]);
|
|
9223
|
+
const paymentSectionRef = useRef(null);
|
|
9224
|
+
// Payment option: "deposit" or "full" - only relevant when deposit is available
|
|
9225
|
+
const [paymentOption, setPaymentOption] = useState("deposit");
|
|
9226
|
+
// Per-participant upsell selections: participantIndex -> array of upsell package IDs
|
|
9227
|
+
const [participantUpsells, setParticipantUpsells] = useState({});
|
|
8544
9228
|
const form = useForm({
|
|
8545
9229
|
resolver: bookingResolver,
|
|
8546
9230
|
defaultValues: {
|
|
@@ -8554,18 +9238,64 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
8554
9238
|
},
|
|
8555
9239
|
});
|
|
8556
9240
|
const watchedParticipants = form.watch("participants");
|
|
9241
|
+
const watchedCustomerName = form.watch("customerName");
|
|
8557
9242
|
const watchedCustomerEmail = form.watch("customerEmail");
|
|
8558
9243
|
const customerNameError = form.formState.errors.customerName;
|
|
8559
9244
|
const customerEmailError = form.formState.errors.customerEmail;
|
|
8560
9245
|
const watchedAcceptTerms = form.watch("acceptTerms");
|
|
8561
|
-
|
|
8562
|
-
|
|
9246
|
+
// Initialize participant upsells from selectedUpsells when component mounts or participants change
|
|
9247
|
+
useEffect(() => {
|
|
9248
|
+
if (selectedUpsells.length > 0 && upsells.length > 0) {
|
|
9249
|
+
const globalUpsellIds = selectedUpsells.map(s => s.upsellPackageId);
|
|
9250
|
+
const newParticipantUpsells = {};
|
|
9251
|
+
// Pre-select the global upsells for all current participants
|
|
9252
|
+
watchedParticipants.forEach((_, index) => {
|
|
9253
|
+
// Keep existing selections if they exist, otherwise use global selections
|
|
9254
|
+
if (participantUpsells[index] === undefined) {
|
|
9255
|
+
newParticipantUpsells[index] = [...globalUpsellIds];
|
|
9256
|
+
}
|
|
9257
|
+
else {
|
|
9258
|
+
newParticipantUpsells[index] = participantUpsells[index];
|
|
9259
|
+
}
|
|
9260
|
+
});
|
|
9261
|
+
setParticipantUpsells(newParticipantUpsells);
|
|
9262
|
+
}
|
|
9263
|
+
}, [watchedParticipants.length, selectedUpsells, upsells.length]);
|
|
9264
|
+
// Toggle upsell for a specific participant
|
|
9265
|
+
const toggleParticipantUpsell = (participantIndex, upsellId) => {
|
|
9266
|
+
setParticipantUpsells(prev => {
|
|
9267
|
+
const currentUpsells = prev[participantIndex] || [];
|
|
9268
|
+
const hasUpsell = currentUpsells.includes(upsellId);
|
|
9269
|
+
return {
|
|
9270
|
+
...prev,
|
|
9271
|
+
[participantIndex]: hasUpsell
|
|
9272
|
+
? currentUpsells.filter(id => id !== upsellId)
|
|
9273
|
+
: [...currentUpsells, upsellId]
|
|
9274
|
+
};
|
|
9275
|
+
});
|
|
9276
|
+
};
|
|
8563
9277
|
const calculateBaseTotal = useCallback(() => {
|
|
8564
9278
|
if (!eventDetails)
|
|
8565
9279
|
return 0;
|
|
8566
9280
|
return eventDetails.price * watchedParticipants.filter((p) => p.name.trim()).length;
|
|
8567
9281
|
}, [eventDetails, watchedParticipants]);
|
|
8568
|
-
// Calculate total
|
|
9282
|
+
// Calculate upsells total based on per-participant selections
|
|
9283
|
+
const calculateUpsellsTotal = useCallback(() => {
|
|
9284
|
+
let total = 0;
|
|
9285
|
+
watchedParticipants.forEach((participant, index) => {
|
|
9286
|
+
// Only count upsells for participants with names
|
|
9287
|
+
if (participant.name.trim()) {
|
|
9288
|
+
const participantUpsellIds = participantUpsells[index] || [];
|
|
9289
|
+
participantUpsellIds.forEach(upsellId => {
|
|
9290
|
+
const upsell = upsells.find(u => u.id === upsellId);
|
|
9291
|
+
if (upsell) {
|
|
9292
|
+
total += upsell.price;
|
|
9293
|
+
}
|
|
9294
|
+
});
|
|
9295
|
+
}
|
|
9296
|
+
});
|
|
9297
|
+
return total;
|
|
9298
|
+
}, [participantUpsells, upsells, watchedParticipants]);
|
|
8569
9299
|
const calculateTotalDiscount = useCallback(() => {
|
|
8570
9300
|
return appliedVouchers.reduce((total, voucher) => {
|
|
8571
9301
|
if (voucher.type === "discount") {
|
|
@@ -8577,12 +9307,12 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
8577
9307
|
return total;
|
|
8578
9308
|
}, 0);
|
|
8579
9309
|
}, [appliedVouchers]);
|
|
8580
|
-
// Calculate total amount after discounts
|
|
8581
9310
|
const calculateTotal = useCallback(() => {
|
|
8582
9311
|
const baseTotal = calculateBaseTotal();
|
|
9312
|
+
const upsellsTotal = calculateUpsellsTotal();
|
|
8583
9313
|
const totalDiscount = calculateTotalDiscount();
|
|
8584
|
-
return Math.max(0, baseTotal - totalDiscount);
|
|
8585
|
-
}, [calculateBaseTotal, calculateTotalDiscount]);
|
|
9314
|
+
return Math.max(0, baseTotal + upsellsTotal - totalDiscount);
|
|
9315
|
+
}, [calculateBaseTotal, calculateUpsellsTotal, calculateTotalDiscount]);
|
|
8586
9316
|
const calculateDeposit = () => {
|
|
8587
9317
|
if (!eventDetails || !eventDetails.deposit)
|
|
8588
9318
|
return 0;
|
|
@@ -8590,16 +9320,39 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
8590
9320
|
return eventDetails.deposit * participantCount;
|
|
8591
9321
|
};
|
|
8592
9322
|
const baseTotal = calculateBaseTotal();
|
|
9323
|
+
const upsellsTotal = calculateUpsellsTotal();
|
|
8593
9324
|
const totalDiscount = calculateTotalDiscount();
|
|
8594
9325
|
const totalAmount = calculateTotal();
|
|
8595
9326
|
const depositAmount = calculateDeposit();
|
|
8596
|
-
//
|
|
8597
|
-
|
|
8598
|
-
|
|
9327
|
+
// Deposit stays fixed unless the discounted total is lower than the deposit
|
|
9328
|
+
// (discount applies to total price, not to the deposit itself)
|
|
9329
|
+
const hasDepositOption = depositAmount > 0 && depositAmount < totalAmount;
|
|
9330
|
+
const paymentAmount = hasDepositOption && paymentOption === "deposit"
|
|
9331
|
+
? Math.min(depositAmount, totalAmount)
|
|
9332
|
+
: totalAmount;
|
|
9333
|
+
// Convert per-participant upsells to UpsellSelection[] format for API
|
|
9334
|
+
// Includes participantIndices to track which participants selected each upsell
|
|
9335
|
+
const aggregatedUpsellSelections = useCallback(() => {
|
|
9336
|
+
const upsellParticipantMap = {};
|
|
9337
|
+
watchedParticipants.forEach((participant, index) => {
|
|
9338
|
+
if (participant.name.trim()) {
|
|
9339
|
+
const participantUpsellIds = participantUpsells[index] || [];
|
|
9340
|
+
participantUpsellIds.forEach(upsellId => {
|
|
9341
|
+
if (!upsellParticipantMap[upsellId]) {
|
|
9342
|
+
upsellParticipantMap[upsellId] = [];
|
|
9343
|
+
}
|
|
9344
|
+
upsellParticipantMap[upsellId].push(index);
|
|
9345
|
+
});
|
|
9346
|
+
}
|
|
9347
|
+
});
|
|
9348
|
+
return Object.entries(upsellParticipantMap).map(([upsellPackageId, participantIndices]) => ({
|
|
9349
|
+
upsellPackageId: Number(upsellPackageId),
|
|
9350
|
+
quantity: participantIndices.length,
|
|
9351
|
+
participantIndices,
|
|
9352
|
+
}));
|
|
9353
|
+
}, [participantUpsells, watchedParticipants]);
|
|
8599
9354
|
const appliedDiscountCode = appliedVouchers.find((v) => v.type === "discount");
|
|
8600
|
-
// Get gift cards
|
|
8601
9355
|
const appliedGiftCards = appliedVouchers.filter((v) => v.type === "giftCard");
|
|
8602
|
-
// Voucher handlers
|
|
8603
9356
|
const handleVoucherValidated = useCallback((voucher, _error) => {
|
|
8604
9357
|
if (voucher) {
|
|
8605
9358
|
setAppliedVouchers((prev) => [...prev, voucher]);
|
|
@@ -8608,13 +9361,20 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
8608
9361
|
const handleRemoveVoucher = useCallback((code) => {
|
|
8609
9362
|
setAppliedVouchers((prev) => prev.filter((v) => v.code !== code));
|
|
8610
9363
|
}, []);
|
|
8611
|
-
// Check if form is ready for payment (schema valid + participant count within limit)
|
|
8612
9364
|
const isReadyForPayment = () => {
|
|
8613
|
-
const
|
|
8614
|
-
const
|
|
8615
|
-
|
|
9365
|
+
const participantsWithNames = watchedParticipants.filter((p) => p.name.trim()).length;
|
|
9366
|
+
const totalParticipantRows = watchedParticipants.length;
|
|
9367
|
+
const allParticipantsHaveNames = participantsWithNames === totalParticipantRows;
|
|
9368
|
+
const participantsWithinLimit = participantsWithNames <= (eventDetails?.availableSpots || 0);
|
|
9369
|
+
const hasValidCustomerName = watchedCustomerName && watchedCustomerName.trim().length >= 2;
|
|
9370
|
+
const hasValidCustomerEmail = watchedCustomerEmail && watchedCustomerEmail.trim().length > 0 && !customerEmailError;
|
|
9371
|
+
return allParticipantsHaveNames &&
|
|
9372
|
+
participantsWithinLimit &&
|
|
9373
|
+
participantsWithNames > 0 &&
|
|
9374
|
+
hasValidCustomerName &&
|
|
9375
|
+
hasValidCustomerEmail &&
|
|
9376
|
+
watchedAcceptTerms;
|
|
8616
9377
|
};
|
|
8617
|
-
// Re-validate vouchers when participant count changes (affects order value)
|
|
8618
9378
|
useEffect(() => {
|
|
8619
9379
|
if (appliedVouchers.length > 0) {
|
|
8620
9380
|
const newBaseTotal = eventDetails?.price
|
|
@@ -8653,7 +9413,6 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
8653
9413
|
}));
|
|
8654
9414
|
}
|
|
8655
9415
|
}, [watchedParticipants, eventDetails]);
|
|
8656
|
-
// Helper functions
|
|
8657
9416
|
const addParticipant = () => {
|
|
8658
9417
|
const currentParticipants = form.getValues("participants");
|
|
8659
9418
|
const availableSpots = eventDetails?.availableSpots || 0;
|
|
@@ -8670,7 +9429,6 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
8670
9429
|
form.setValue("participants", currentParticipants.filter((_, i) => i !== index));
|
|
8671
9430
|
}
|
|
8672
9431
|
};
|
|
8673
|
-
// Stripe appearance based on theme CSS variables
|
|
8674
9432
|
const [stripeAppearance, setStripeAppearance] = useState(null);
|
|
8675
9433
|
useEffect(() => {
|
|
8676
9434
|
const container = document.querySelector(".booking-widget-container");
|
|
@@ -8706,10 +9464,79 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
8706
9464
|
onBackToEventTypes?.();
|
|
8707
9465
|
}
|
|
8708
9466
|
};
|
|
9467
|
+
const scrollToPayment = () => {
|
|
9468
|
+
paymentSectionRef.current?.scrollIntoView({ behavior: "smooth", block: "start" });
|
|
9469
|
+
};
|
|
9470
|
+
// Footer navigation
|
|
9471
|
+
const footerContent = (jsxs(Fragment, { children: [jsx("button", { type: "button", onClick: handleClose, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), children: "\u2190 Zur\u00FCck" }), jsx("button", { type: "button", onClick: scrollToPayment, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth), children: "Zur Zahlung \u2193" })] }));
|
|
8709
9472
|
if (!eventDetails.bookingOpen) {
|
|
8710
|
-
return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: "Buchung nicht m\u00F6glich", children: jsx("div", {
|
|
8711
|
-
|
|
8712
|
-
|
|
9473
|
+
return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: "Buchung nicht m\u00F6glich", children: jsx("div", { style: {
|
|
9474
|
+
display: "flex",
|
|
9475
|
+
alignItems: "center",
|
|
9476
|
+
justifyContent: "center",
|
|
9477
|
+
minHeight: "400px",
|
|
9478
|
+
textAlign: "center",
|
|
9479
|
+
padding: "16px",
|
|
9480
|
+
}, children: jsxs("div", { children: [jsx("div", { style: { margin: "0 auto 16px auto", fontSize: "48px" }, children: jsx(IconWarning, { size: 48, color: "var(--bw-error-color)" }) }), jsx("h3", { style: {
|
|
9481
|
+
marginBottom: "8px",
|
|
9482
|
+
fontWeight: 600,
|
|
9483
|
+
fontSize: "18px",
|
|
9484
|
+
color: "var(--bw-text-muted)",
|
|
9485
|
+
fontFamily: "var(--bw-font-family)",
|
|
9486
|
+
}, children: "Buchung nicht m\u00F6glich" }), jsx("p", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "F\u00FCr diese Veranstaltung sind derzeit keine Buchungen m\u00F6glich." })] }) }) }));
|
|
9487
|
+
}
|
|
9488
|
+
return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `Buchung - ${eventDetails.name}`, footer: footerContent, children: jsxs("div", { className: "booking-widget-container", style: { padding: "16px" }, children: [jsxs("div", { style: cardStyles, children: [jsx("h2", { style: sectionHeaderStyles, children: "Event Details" }), jsxs("div", { style: {
|
|
9489
|
+
display: "grid",
|
|
9490
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(200px, 1fr))",
|
|
9491
|
+
gap: "12px",
|
|
9492
|
+
fontSize: "14px",
|
|
9493
|
+
}, children: [jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [jsxs("span", { style: {
|
|
9494
|
+
color: "var(--bw-text-muted)",
|
|
9495
|
+
fontFamily: "var(--bw-font-family)",
|
|
9496
|
+
display: "flex",
|
|
9497
|
+
alignItems: "center",
|
|
9498
|
+
gap: "4px",
|
|
9499
|
+
}, children: [jsx(IconCalendar, { size: 20, color: "var(--bw-highlight-color)" }), " Datum:"] }), jsxs("span", { style: {
|
|
9500
|
+
color: "var(--bw-text-color)",
|
|
9501
|
+
fontWeight: 500,
|
|
9502
|
+
fontFamily: "var(--bw-font-family)",
|
|
9503
|
+
}, children: [formatEventDate(eventDetails.startTime), " \u2022 ", formatTime(eventDetails.startTime, "Europe/Berlin", "de")] })] }), jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [jsxs("span", { style: {
|
|
9504
|
+
color: "var(--bw-text-muted)",
|
|
9505
|
+
fontFamily: "var(--bw-font-family)",
|
|
9506
|
+
display: "flex",
|
|
9507
|
+
alignItems: "center",
|
|
9508
|
+
gap: "4px",
|
|
9509
|
+
}, children: [jsx(IconClock, { size: 20, color: "var(--bw-highlight-color)" }), " Dauer:"] }), jsxs("span", { style: {
|
|
9510
|
+
color: "var(--bw-text-color)",
|
|
9511
|
+
fontWeight: 500,
|
|
9512
|
+
fontFamily: "var(--bw-font-family)",
|
|
9513
|
+
}, children: [eventDetails.durationDays, " Tag", eventDetails.durationDays > 1 ? "e" : ""] })] }), jsxs("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between" }, children: [jsxs("span", { style: {
|
|
9514
|
+
color: "var(--bw-text-muted)",
|
|
9515
|
+
fontFamily: "var(--bw-font-family)",
|
|
9516
|
+
display: "flex",
|
|
9517
|
+
alignItems: "center",
|
|
9518
|
+
gap: "4px",
|
|
9519
|
+
}, children: [jsx(IconMoney, { size: 20, color: "var(--bw-highlight-color)" }), " Preis:"] }), jsxs("span", { style: {
|
|
9520
|
+
color: "var(--bw-text-color)",
|
|
9521
|
+
fontWeight: 500,
|
|
9522
|
+
fontFamily: "var(--bw-font-family)",
|
|
9523
|
+
}, children: [formatCurrency(eventDetails.price), " pro Person"] })] })] })] }), jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "24px" }, children: [jsxs("div", { style: cardStyles, children: [jsx("h2", { style: sectionHeaderStyles, children: "Kontaktdaten" }), jsxs("div", { style: { marginTop: "10px", display: "flex", flexDirection: "column", gap: "16px" }, children: [jsxs("div", { style: {
|
|
9524
|
+
display: "grid",
|
|
9525
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(200px, 1fr))",
|
|
9526
|
+
gap: "16px",
|
|
9527
|
+
}, children: [jsxs("div", { children: [jsx("label", { htmlFor: "customerName", style: labelStyles, children: "Name *" }), jsx("input", { id: "customerName", ...form.register("customerName"), type: "text", style: inputStyles, placeholder: "Dein vollst\u00E4ndiger Name" }), customerNameError && (jsx("p", { style: errorTextStyles, children: customerNameError.message }))] }), jsxs("div", { children: [jsx("label", { htmlFor: "customerEmail", style: labelStyles, children: "E-Mail *" }), jsx("input", { id: "customerEmail", ...form.register("customerEmail"), type: "email", style: inputStyles, placeholder: "deine@email.de" }), customerEmailError && (jsx("p", { style: errorTextStyles, children: customerEmailError.message }))] })] }), jsxs("div", { children: [jsx("label", { htmlFor: "customerPhone", style: labelStyles, children: "Telefon (optional)" }), jsx("input", { id: "customerPhone", ...form.register("customerPhone"), type: "tel", style: inputStyles, placeholder: "+49 123 456789" })] }), jsxs("div", { style: { marginTop: "10px", border: "1px solid var(--bw-border-color)", padding: "16px", borderRadius: "var(--bw-border-radius)" }, children: [jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsx("input", { id: "acceptTerms", ...form.register("acceptTerms"), type: "checkbox", style: formStyles.checkbox }), jsxs("label", { htmlFor: "acceptTerms", style: {
|
|
9528
|
+
fontSize: "14px",
|
|
9529
|
+
color: "var(--bw-text-muted)",
|
|
9530
|
+
fontFamily: "var(--bw-font-family)",
|
|
9531
|
+
maxWidth: "calc(100% - 32px)",
|
|
9532
|
+
overflowWrap: "break-word",
|
|
9533
|
+
cursor: "pointer",
|
|
9534
|
+
}, children: ["Ich akzeptiere die", " ", jsx("a", { href: eventDetails.agbUrl || "/terms", style: { color: "var(--bw-highlight-color)", textDecoration: "none" }, target: "_blank", rel: "noopener noreferrer", children: "AGBs" }), "*"] })] }), form.formState.errors.acceptTerms && (jsx("p", { style: { ...errorTextStyles, marginTop: "8px" }, children: form.formState.errors.acceptTerms.message }))] })] })] }), jsxs("div", { style: cardStyles, children: [jsx("div", { style: {
|
|
9535
|
+
display: "flex",
|
|
9536
|
+
justifyContent: "space-between",
|
|
9537
|
+
alignItems: "center",
|
|
9538
|
+
marginBottom: "16px",
|
|
9539
|
+
}, children: jsx("h2", { style: { ...sectionHeaderStyles, marginBottom: 0 }, children: "Teilnehmer" }) }), jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [watchedParticipants.map((_, index) => (jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [jsxs("div", { style: { display: "flex", gap: "12px", alignItems: "center" }, children: [jsxs("div", { style: { flex: 1 }, children: [jsx("label", { htmlFor: `participant-name-${index}`, style: labelStyles, children: "Name *" }), jsx("input", { id: `participant-name-${index}`, ...form.register(`participants.${index}.name`), type: "text", style: inputStyles, placeholder: "Teilnehmername" }), form.formState.errors.participants?.[index]?.name && (jsx("p", { style: errorTextStyles, children: form.formState.errors.participants[index]?.name?.message }))] }), jsxs("div", { style: { width: "80px" }, children: [jsx("label", { htmlFor: `participant-age-${index}`, style: labelStyles, children: "Alter" }), jsx("input", { id: `participant-age-${index}`, ...form.register(`participants.${index}.age`, {
|
|
8713
9540
|
setValueAs: (value) => {
|
|
8714
9541
|
if (value === "" || value === null || value === undefined) {
|
|
8715
9542
|
return undefined;
|
|
@@ -8717,44 +9544,205 @@ function BookingForm({ config, eventDetails, stripePromise, onSuccess, onError,
|
|
|
8717
9544
|
const num = Number(value);
|
|
8718
9545
|
return Number.isNaN(num) ? undefined : num;
|
|
8719
9546
|
},
|
|
8720
|
-
}), type: "number", min: "0", max: "120",
|
|
8721
|
-
|
|
8722
|
-
|
|
8723
|
-
|
|
8724
|
-
|
|
8725
|
-
|
|
8726
|
-
|
|
8727
|
-
|
|
8728
|
-
|
|
8729
|
-
|
|
8730
|
-
|
|
8731
|
-
|
|
8732
|
-
|
|
8733
|
-
|
|
8734
|
-
|
|
8735
|
-
|
|
8736
|
-
|
|
8737
|
-
|
|
8738
|
-
|
|
8739
|
-
|
|
8740
|
-
|
|
8741
|
-
|
|
9547
|
+
}), type: "number", min: "0", max: "120", style: inputStyles, placeholder: "25" })] }), watchedParticipants.length > 1 && (jsxs("div", { children: [jsx("label", { style: { ...labelStyles, visibility: "hidden" }, children: "\u00A0" }), jsx("button", { type: "button", onClick: () => removeParticipant(index), style: {
|
|
9548
|
+
color: "var(--bw-error-color)",
|
|
9549
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
9550
|
+
border: "1px solid var(--bw-border-color)",
|
|
9551
|
+
borderRadius: "50%",
|
|
9552
|
+
width: "36px",
|
|
9553
|
+
height: "36px",
|
|
9554
|
+
display: "flex",
|
|
9555
|
+
alignItems: "center",
|
|
9556
|
+
justifyContent: "center",
|
|
9557
|
+
cursor: "pointer",
|
|
9558
|
+
transition: "all 0.2s ease",
|
|
9559
|
+
fontSize: "24px",
|
|
9560
|
+
fontWeight: 700,
|
|
9561
|
+
fontFamily: "var(--bw-font-family)",
|
|
9562
|
+
padding: 0,
|
|
9563
|
+
}, children: "\u00D7" })] }))] }), upsells.length > 0 && (jsx("div", { style: participantUpsellStyles.container, children: upsells.map((upsell) => {
|
|
9564
|
+
const isSelected = (participantUpsells[index] || []).includes(upsell.id);
|
|
9565
|
+
return (jsxs("label", { htmlFor: `upsell-${index}-${upsell.id}`, style: isSelected ? participantUpsellStyles.labelSelected : participantUpsellStyles.label, children: [jsx("input", { id: `upsell-${index}-${upsell.id}`, type: "checkbox", style: participantUpsellStyles.checkbox, checked: isSelected, onChange: () => toggleParticipantUpsell(index, upsell.id) }), jsx("span", { style: { fontWeight: 500 }, children: upsell.name }), jsxs("span", { style: { fontSize: "12px", opacity: 0.8 }, children: ["(+", formatCurrency(upsell.price), ")"] })] }, upsell.id));
|
|
9566
|
+
}) }))] }, index))), watchedParticipants.length < eventDetails.availableSpots ? (jsx("div", { style: {
|
|
9567
|
+
display: "flex",
|
|
9568
|
+
flexDirection: "column",
|
|
9569
|
+
alignItems: "center",
|
|
9570
|
+
marginTop: "12px",
|
|
9571
|
+
}, children: jsxs("button", { type: "button", onClick: addParticipant, style: {
|
|
9572
|
+
color: "#ffffff",
|
|
9573
|
+
fontSize: "14px",
|
|
9574
|
+
fontWeight: 600,
|
|
9575
|
+
padding: "8px 16px",
|
|
9576
|
+
borderRadius: "var(--bw-border-radius)",
|
|
9577
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
9578
|
+
border: "1px solid var(--bw-highlight-color)",
|
|
9579
|
+
cursor: "pointer",
|
|
9580
|
+
transition: "all 0.2s ease",
|
|
9581
|
+
marginBottom: "4px",
|
|
9582
|
+
fontFamily: "var(--bw-font-family)",
|
|
9583
|
+
boxShadow: "0 2px 8px 0 var(--bw-highlight-color)",
|
|
9584
|
+
}, children: [watchedParticipants.length + 1, ". Teilnehmer hinzuf\u00FCgen"] }) })) : (jsxs("p", { style: { ...errorTextStyles, margin: 0 }, children: ["Maximal ", eventDetails.availableSpots, " Pl\u00E4tze verf\u00FCgbar."] }))] })] }), jsx(VoucherInput, { config: config, orderValue: baseTotal, eventInstanceId: eventDetails?.id, customerEmail: watchedCustomerEmail, onVoucherValidated: handleVoucherValidated, appliedVouchers: appliedVouchers, onRemoveVoucher: handleRemoveVoucher, disabled: !eventDetails }), jsxs("div", { style: cardStyles, children: [jsx("label", { htmlFor: "booking-comment", style: labelStyles, children: "Kommentar (optional)" }), jsx("textarea", { id: "booking-comment", ...form.register("comment"), placeholder: "Zus\u00E4tzliche Anmerkungen zur Buchung...", rows: 3, style: {
|
|
9585
|
+
...inputStyles,
|
|
9586
|
+
resize: "vertical",
|
|
9587
|
+
minHeight: "80px",
|
|
9588
|
+
} })] }), jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "24px" }, children: [jsxs("div", { style: cardStyles, children: [jsx("h2", { style: { ...sectionHeaderStyles, marginBottom: "16px" }, children: "Buchungszusammenfassung" }), jsxs("div", { style: { marginTop: "10px", display: "flex", flexDirection: "column", gap: "12px" }, children: [jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Preis:" }), jsxs("div", { style: {
|
|
9589
|
+
color: "var(--bw-text-color)",
|
|
9590
|
+
fontWeight: 500,
|
|
9591
|
+
fontFamily: "var(--bw-font-family)",
|
|
9592
|
+
}, children: [jsxs("span", { style: { fontWeight: 200 }, children: [watchedParticipants.length > 1 ? watchedParticipants.filter((p) => p.name.trim()).length : 1, " x "] }), " ", formatCurrency(eventDetails.price)] })] }), depositAmount > 0 && (jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Anzahlung:" }), jsxs("span", { style: {
|
|
9593
|
+
color: "var(--bw-text-color)",
|
|
9594
|
+
fontWeight: 500,
|
|
9595
|
+
fontFamily: "var(--bw-font-family)",
|
|
9596
|
+
}, children: [jsxs("span", { style: { fontWeight: 200 }, children: [watchedParticipants.filter((p) => p.name.trim()).length, " x"] }), " ", formatCurrency(eventDetails.deposit || 0)] })] })), upsellsTotal > 0 && (jsxs("div", { style: { marginTop: "8px", paddingTop: "8px", borderTop: "1px dashed var(--bw-border-color)" }, children: [jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)", fontSize: "13px", display: "block", marginBottom: "4px" }, children: "Extras:" }), upsells.map((upsell) => {
|
|
9597
|
+
// Count how many participants have this upsell selected
|
|
9598
|
+
const countWithUpsell = watchedParticipants.filter((p, idx) => p.name.trim() && (participantUpsells[idx] || []).includes(upsell.id)).length;
|
|
9599
|
+
if (countWithUpsell === 0)
|
|
9600
|
+
return null;
|
|
9601
|
+
const upsellLineTotal = upsell.price * countWithUpsell;
|
|
9602
|
+
return (jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", fontSize: "13px" }, children: [jsxs("span", { style: { color: "var(--bw-highlight-color)", fontFamily: "var(--bw-font-family)" }, children: ["+ ", upsell.name, " (", countWithUpsell, "\u00D7)"] }), jsx("span", { style: { color: "var(--bw-highlight-color)", fontFamily: "var(--bw-font-family)" }, children: formatCurrency(upsellLineTotal) })] }, upsell.id));
|
|
9603
|
+
})] })), appliedVouchers.length > 0 && (jsxs(Fragment, { children: [jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Zwischensumme:" }), jsx("span", { style: {
|
|
9604
|
+
fontFamily: "var(--bw-font-family)",
|
|
9605
|
+
color: totalDiscount > 0 ? "var(--bw-text-muted)" : "var(--bw-text-muted)",
|
|
9606
|
+
textDecoration: totalDiscount > 0 ? "line-through" : "none",
|
|
9607
|
+
}, children: formatCurrency(baseTotal) })] }), appliedDiscountCode && (jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxs("span", { style: {
|
|
9608
|
+
color: "var(--bw-success-color)",
|
|
9609
|
+
fontFamily: "var(--bw-font-family)",
|
|
9610
|
+
fontSize: "14px",
|
|
9611
|
+
}, children: ["Rabatt (", appliedDiscountCode.code, "):"] }), jsxs("span", { style: { color: "var(--bw-success-color)", fontFamily: "var(--bw-font-family)" }, children: ["-", formatCurrency(appliedDiscountCode.discountAmount)] })] })), appliedGiftCards.map((giftCard) => (jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxs("span", { style: {
|
|
9612
|
+
color: "var(--bw-success-color)",
|
|
9613
|
+
fontFamily: "var(--bw-font-family)",
|
|
9614
|
+
fontSize: "14px",
|
|
9615
|
+
}, children: ["Gutschein (", giftCard.code, "):"] }), jsxs("span", { style: { color: "var(--bw-success-color)", fontFamily: "var(--bw-font-family)" }, children: ["-", formatCurrency(giftCard.balanceToUse || giftCard.discountAmount)] })] }, giftCard.code)))] })), jsxs("div", { style: {
|
|
9616
|
+
borderTop: "1px solid var(--bw-border-color)",
|
|
9617
|
+
paddingTop: "12px",
|
|
9618
|
+
}, children: [hasDepositOption && (jsxs("div", { style: {
|
|
9619
|
+
display: "flex",
|
|
9620
|
+
gap: "8px",
|
|
9621
|
+
marginBottom: "16px",
|
|
9622
|
+
}, children: [jsxs("button", { type: "button", onClick: () => setPaymentOption("deposit"), style: {
|
|
9623
|
+
flex: 1,
|
|
9624
|
+
padding: "12px",
|
|
9625
|
+
borderRadius: "var(--bw-border-radius)",
|
|
9626
|
+
border: paymentOption === "deposit"
|
|
9627
|
+
? "2px solid var(--bw-highlight-color)"
|
|
9628
|
+
: "1px solid var(--bw-border-color)",
|
|
9629
|
+
backgroundColor: paymentOption === "deposit"
|
|
9630
|
+
? "rgba(var(--bw-highlight-color-rgb, 0, 177, 170), 0.1)"
|
|
9631
|
+
: "var(--bw-surface-color)",
|
|
9632
|
+
cursor: "pointer",
|
|
9633
|
+
fontFamily: "var(--bw-font-family)",
|
|
9634
|
+
transition: "all 0.2s ease",
|
|
9635
|
+
}, children: [jsx("div", { style: {
|
|
9636
|
+
fontSize: "13px",
|
|
9637
|
+
color: "var(--bw-text-muted)",
|
|
9638
|
+
marginBottom: "4px",
|
|
9639
|
+
}, children: "Anzahlung" }), jsx("div", { style: {
|
|
9640
|
+
fontSize: "18px",
|
|
9641
|
+
fontWeight: 700,
|
|
9642
|
+
color: paymentOption === "deposit"
|
|
9643
|
+
? "var(--bw-highlight-color)"
|
|
9644
|
+
: "var(--bw-text-color)",
|
|
9645
|
+
}, children: formatCurrency(depositAmount) })] }), jsxs("button", { type: "button", onClick: () => setPaymentOption("full"), style: {
|
|
9646
|
+
flex: 1,
|
|
9647
|
+
padding: "12px",
|
|
9648
|
+
borderRadius: "var(--bw-border-radius)",
|
|
9649
|
+
border: paymentOption === "full"
|
|
9650
|
+
? "2px solid var(--bw-highlight-color)"
|
|
9651
|
+
: "1px solid var(--bw-border-color)",
|
|
9652
|
+
backgroundColor: paymentOption === "full"
|
|
9653
|
+
? "rgba(var(--bw-highlight-color-rgb, 0, 177, 170), 0.1)"
|
|
9654
|
+
: "var(--bw-surface-color)",
|
|
9655
|
+
cursor: "pointer",
|
|
9656
|
+
fontFamily: "var(--bw-font-family)",
|
|
9657
|
+
transition: "all 0.2s ease",
|
|
9658
|
+
}, children: [jsx("div", { style: {
|
|
9659
|
+
fontSize: "13px",
|
|
9660
|
+
color: "var(--bw-text-muted)",
|
|
9661
|
+
marginBottom: "4px",
|
|
9662
|
+
}, children: "Vollst\u00E4ndig bezahlen" }), jsx("div", { style: {
|
|
9663
|
+
fontSize: "18px",
|
|
9664
|
+
fontWeight: 700,
|
|
9665
|
+
color: paymentOption === "full"
|
|
9666
|
+
? "var(--bw-highlight-color)"
|
|
9667
|
+
: "var(--bw-text-color)",
|
|
9668
|
+
}, children: formatCurrency(totalAmount) })] })] })), hasDepositOption && paymentOption === "deposit" && (jsxs("div", { style: {
|
|
9669
|
+
display: "flex",
|
|
9670
|
+
justifyContent: "space-between",
|
|
9671
|
+
alignItems: "center",
|
|
9672
|
+
fontSize: "14px",
|
|
9673
|
+
marginBottom: "8px",
|
|
9674
|
+
}, children: [jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Gesamtbetrag:" }), jsx("span", { style: {
|
|
9675
|
+
color: "var(--bw-text-muted)",
|
|
9676
|
+
fontFamily: "var(--bw-font-family)",
|
|
9677
|
+
fontWeight: 500,
|
|
9678
|
+
}, children: formatCurrency(totalAmount) })] })), jsxs("div", { style: {
|
|
9679
|
+
display: "flex",
|
|
9680
|
+
justifyContent: "space-between",
|
|
9681
|
+
alignItems: "center",
|
|
9682
|
+
fontSize: "18px",
|
|
9683
|
+
fontWeight: 600,
|
|
9684
|
+
}, children: [jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: hasDepositOption && paymentOption === "deposit"
|
|
9685
|
+
? "Heute zu zahlen (Anzahlung):"
|
|
9686
|
+
: "Gesamtbetrag:" }), jsx("span", { style: {
|
|
9687
|
+
color: "var(--bw-highlight-color)",
|
|
9688
|
+
fontFamily: "var(--bw-font-family)",
|
|
9689
|
+
fontWeight: 700,
|
|
9690
|
+
}, children: formatCurrency(paymentAmount) })] }), hasDepositOption && paymentOption === "deposit" && (jsxs("div", { style: {
|
|
9691
|
+
fontSize: "12px",
|
|
9692
|
+
color: "var(--bw-text-muted)",
|
|
9693
|
+
fontFamily: "var(--bw-font-family)",
|
|
9694
|
+
marginTop: "8px",
|
|
9695
|
+
textAlign: "right",
|
|
9696
|
+
}, children: ["Restbetrag (", formatCurrency(totalAmount - depositAmount), ") vor Ort f\u00E4llig."] }))] })] })] }), jsx("div", { ref: paymentSectionRef, children: stripePromise &&
|
|
9697
|
+
(() => {
|
|
9698
|
+
if (!isReadyForPayment()) {
|
|
9699
|
+
const participantsWithNames = watchedParticipants.filter((p) => p.name.trim()).length;
|
|
9700
|
+
const totalParticipantRows = watchedParticipants.length;
|
|
9701
|
+
const participantsWithoutNames = totalParticipantRows - participantsWithNames;
|
|
9702
|
+
const missing = [];
|
|
9703
|
+
if (participantsWithNames === 0) {
|
|
9704
|
+
missing.push("mindestens einen Teilnehmer mit Namen");
|
|
9705
|
+
}
|
|
9706
|
+
else if (participantsWithoutNames > 0) {
|
|
9707
|
+
missing.push(`Namen für alle ${totalParticipantRows} Teilnehmer`);
|
|
9708
|
+
}
|
|
9709
|
+
if (participantsWithNames > (eventDetails?.availableSpots || 0)) {
|
|
9710
|
+
missing.push(`die Anzahl der Teilnehmer auf ${eventDetails?.availableSpots || 0} zu reduzieren`);
|
|
9711
|
+
}
|
|
9712
|
+
// Check for empty or invalid name (min 2 chars required)
|
|
9713
|
+
if (!watchedCustomerName || watchedCustomerName.trim().length < 2 || customerNameError) {
|
|
9714
|
+
missing.push("einen gültigen Kontaktnamen");
|
|
9715
|
+
}
|
|
9716
|
+
// Check for empty or invalid email
|
|
9717
|
+
if (!watchedCustomerEmail || watchedCustomerEmail.trim().length === 0 || customerEmailError) {
|
|
9718
|
+
missing.push("eine gültige E-Mail-Adresse");
|
|
9719
|
+
}
|
|
9720
|
+
if (!watchedAcceptTerms) {
|
|
9721
|
+
missing.push("die Akzeptanz der AGBs");
|
|
9722
|
+
}
|
|
9723
|
+
const message = missing.length > 0
|
|
9724
|
+
? `Wir benötigen mindestens ${missing.join(", ")} um fortzufahren.`
|
|
9725
|
+
: "Bitte fülle alle Pflichtfelder aus, um fortzufahren.";
|
|
9726
|
+
return (jsx("div", { style: {
|
|
9727
|
+
...cardStyles,
|
|
9728
|
+
borderColor: "var(--bw-warning-color)",
|
|
9729
|
+
color: "var(--bw-warning-color)",
|
|
9730
|
+
fontFamily: "var(--bw-font-family)",
|
|
9731
|
+
textAlign: "center",
|
|
9732
|
+
}, children: message }));
|
|
8742
9733
|
}
|
|
8743
|
-
|
|
8744
|
-
|
|
8745
|
-
|
|
8746
|
-
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
|
|
8755
|
-
}
|
|
8756
|
-
: null, giftCards: appliedGiftCards, onSuccess: onSuccess, onError: onError, systemConfig: systemConfig ?? null, stripePromise: stripePromise, stripeAppearance: stripeAppearance })] }));
|
|
8757
|
-
})()] })] })] }) }));
|
|
9734
|
+
return (jsxs("div", { style: cardStyles, children: [jsx("h2", { style: { ...sectionHeaderStyles }, children: "Zahlung" }), jsx(PaymentForm, { config: config, eventDetails: eventDetails, formData: form.getValues(), totalAmount: paymentAmount, discountCode: appliedDiscountCode
|
|
9735
|
+
? {
|
|
9736
|
+
id: appliedDiscountCode.id,
|
|
9737
|
+
code: appliedDiscountCode.code,
|
|
9738
|
+
description: appliedDiscountCode.description || undefined,
|
|
9739
|
+
type: appliedDiscountCode.discountType || "percentage",
|
|
9740
|
+
value: appliedDiscountCode.discountValue || 0,
|
|
9741
|
+
discountAmount: appliedDiscountCode.discountAmount,
|
|
9742
|
+
newTotal: appliedDiscountCode.newTotal,
|
|
9743
|
+
}
|
|
9744
|
+
: null, giftCards: appliedGiftCards, onSuccess: onSuccess, onError: onError, systemConfig: systemConfig ?? null, stripePromise: stripePromise, stripeAppearance: stripeAppearance, upsellSelections: aggregatedUpsellSelections() })] }));
|
|
9745
|
+
})() })] })] })] }) }));
|
|
8758
9746
|
}
|
|
8759
9747
|
|
|
8760
9748
|
/**
|
|
@@ -8898,6 +9886,7 @@ const BookingSuccessModal = ({ isOpen, onClose, config, onError, paymentIntentId
|
|
|
8898
9886
|
order: data.order,
|
|
8899
9887
|
payments: data.payments,
|
|
8900
9888
|
orderItems: data.orderItems,
|
|
9889
|
+
purchases: data.purchases || [],
|
|
8901
9890
|
stripePaymentIntent: data.stripePaymentIntent,
|
|
8902
9891
|
});
|
|
8903
9892
|
setEventDetails({
|
|
@@ -8906,7 +9895,7 @@ const BookingSuccessModal = ({ isOpen, onClose, config, onError, paymentIntentId
|
|
|
8906
9895
|
description: data.booking.eventInstance.eventType.description,
|
|
8907
9896
|
startTime: data.booking.eventInstance.startTime,
|
|
8908
9897
|
endTime: data.booking.eventInstance.endTime,
|
|
8909
|
-
price: data.
|
|
9898
|
+
price: data.booking.eventInstance.price || 0, // Use actual event instance price
|
|
8910
9899
|
});
|
|
8911
9900
|
setFormData({
|
|
8912
9901
|
customerEmail: data.booking.customerEmail,
|
|
@@ -8985,18 +9974,21 @@ const BookingSuccessModal = ({ isOpen, onClose, config, onError, paymentIntentId
|
|
|
8985
9974
|
fontFamily: "var(--bw-font-family)",
|
|
8986
9975
|
padding: "var(--bw-spacing-large)",
|
|
8987
9976
|
maxWidth: "100%",
|
|
8988
|
-
}, children: [jsxs("div", { className: "
|
|
9977
|
+
}, children: [jsxs("div", { className: "print-hidden", style: {
|
|
8989
9978
|
marginBottom: "var(--bw-spacing-large)",
|
|
8990
9979
|
display: "flex",
|
|
8991
9980
|
alignItems: "center",
|
|
8992
9981
|
justifyContent: "space-between",
|
|
8993
|
-
}, children: [jsxs("h1", {
|
|
9982
|
+
}, children: [jsxs("h1", { style: {
|
|
8994
9983
|
color: "var(--bw-text-color)",
|
|
8995
9984
|
fontFamily: "var(--bw-font-family)",
|
|
8996
9985
|
marginBottom: "var(--bw-spacing-large)",
|
|
8997
9986
|
display: "flex",
|
|
8998
9987
|
alignItems: "center",
|
|
8999
9988
|
gap: "var(--bw-spacing-small)",
|
|
9989
|
+
fontWeight: 700,
|
|
9990
|
+
fontSize: "24px",
|
|
9991
|
+
margin: 0,
|
|
9000
9992
|
}, children: [jsx("div", { style: {
|
|
9001
9993
|
width: "32px",
|
|
9002
9994
|
height: "32px",
|
|
@@ -9032,24 +10024,26 @@ const BookingSuccessModal = ({ isOpen, onClose, config, onError, paymentIntentId
|
|
|
9032
10024
|
color: "var(--bw-text-color)",
|
|
9033
10025
|
margin: "0",
|
|
9034
10026
|
fontFamily: "var(--bw-font-family)",
|
|
9035
|
-
}, children: "Buchungsdetails" }) }), jsx("div", { className: "print-only", children: jsx("div", { className: "print-section-title", children: "Buchungsdetails" }) }), jsxs("div", {
|
|
10027
|
+
}, children: "Buchungsdetails" }) }), jsx("div", { className: "print-only", children: jsx("div", { className: "print-section-title", children: "Buchungsdetails" }) }), jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: [jsxs("div", { className: "print-detail-grid", style: {
|
|
9036
10028
|
display: "grid",
|
|
9037
10029
|
gridTemplateColumns: "1fr 1fr",
|
|
9038
10030
|
gap: "var(--bw-spacing)",
|
|
9039
|
-
}, children: [jsxs("div", { className: "print-detail-item", style: { marginBottom: "span 2" }, children: [jsx("div", { className: "
|
|
10031
|
+
}, children: [jsxs("div", { className: "print-detail-item", style: { marginBottom: "span 2" }, children: [jsx("div", { className: "print-detail-label", style: {
|
|
9040
10032
|
color: "var(--bw-text-muted)",
|
|
9041
10033
|
fontSize: "var(--bw-font-size-small)",
|
|
9042
10034
|
fontFamily: "var(--bw-font-family)",
|
|
9043
|
-
|
|
10035
|
+
fontWeight: 500,
|
|
10036
|
+
}, children: "Buchungs-ID" }), jsx("p", { className: "print-detail-value", style: {
|
|
9044
10037
|
fontWeight: "600",
|
|
9045
10038
|
color: "var(--bw-text-color)",
|
|
9046
10039
|
fontFamily: "var(--bw-font-family)",
|
|
9047
10040
|
fontSize: "var(--bw-font-size-medium)",
|
|
9048
10041
|
margin: "0px 0px 6px 0",
|
|
9049
|
-
}, children: booking.bookingHash })] }), jsxs("div", { className: "print-detail-item", children: [jsx("div", { className: "
|
|
10042
|
+
}, children: booking.bookingHash })] }), jsxs("div", { className: "print-detail-item", children: [jsx("div", { className: "print-detail-label", style: {
|
|
9050
10043
|
color: "var(--bw-text-muted)",
|
|
9051
10044
|
fontSize: "var(--bw-font-size-small)",
|
|
9052
10045
|
fontFamily: "var(--bw-font-family)",
|
|
10046
|
+
fontWeight: 500,
|
|
9053
10047
|
}, children: "Bezahl-Status" }), jsxs("div", { children: [jsx("span", { className: "print-hidden", style: {
|
|
9054
10048
|
backgroundColor: "var(--bw-success-color, #10B981)",
|
|
9055
10049
|
color: "white",
|
|
@@ -9062,34 +10056,37 @@ const BookingSuccessModal = ({ isOpen, onClose, config, onError, paymentIntentId
|
|
|
9062
10056
|
? "erfolgreich"
|
|
9063
10057
|
: paymentStatus === "canceled" || paymentStatus === "failed"
|
|
9064
10058
|
? "fehlgeschlagen"
|
|
9065
|
-
: "in Bearbeitung" }), jsx("span", { className: "print-only print-status-badge print-status-paid", children: "Bezahlt" })] })] })] }), jsxs("div", { className: "print-detail-item
|
|
10059
|
+
: "in Bearbeitung" }), jsx("span", { className: "print-only print-status-badge print-status-paid", children: "Bezahlt" })] })] })] }), jsxs("div", { className: "print-detail-item", children: [jsx("div", { className: "print-detail-label", style: {
|
|
9066
10060
|
color: "var(--bw-text-muted)",
|
|
9067
10061
|
fontSize: "var(--bw-font-size-small)",
|
|
9068
10062
|
fontFamily: "var(--bw-font-family)",
|
|
9069
|
-
|
|
10063
|
+
fontWeight: 500,
|
|
10064
|
+
}, children: "Event" }), jsx("p", { className: "print-detail-value", style: {
|
|
9070
10065
|
fontWeight: "600",
|
|
9071
10066
|
color: "var(--bw-text-color)",
|
|
9072
10067
|
fontFamily: "var(--bw-font-family)",
|
|
9073
10068
|
fontSize: "var(--bw-font-size-large)",
|
|
9074
10069
|
margin: "0 0 6px 0",
|
|
9075
|
-
}, children: eventDetails.name })] }), jsxs("div", { className: "
|
|
10070
|
+
}, children: eventDetails.name })] }), jsxs("div", { className: "print-detail-grid", style: {
|
|
9076
10071
|
display: "grid",
|
|
9077
10072
|
gridTemplateColumns: "1fr 1fr",
|
|
9078
10073
|
gap: "var(--bw-spacing)",
|
|
9079
|
-
}, children: [jsxs("div", { className: "print-detail-item", children: [jsx("div", { className: "
|
|
10074
|
+
}, children: [jsxs("div", { className: "print-detail-item", children: [jsx("div", { className: "print-detail-label", style: {
|
|
9080
10075
|
color: "var(--bw-text-muted)",
|
|
9081
10076
|
fontSize: "var(--bw-font-size-small)",
|
|
9082
10077
|
fontFamily: "var(--bw-font-family)",
|
|
10078
|
+
fontWeight: 500,
|
|
9083
10079
|
}, children: "Datum" }), jsx("p", { className: "print-detail-value", style: {
|
|
9084
10080
|
fontWeight: "600",
|
|
9085
10081
|
color: "var(--bw-text-color)",
|
|
9086
10082
|
fontFamily: "var(--bw-font-family)",
|
|
9087
10083
|
fontSize: "var(--bw-font-size-large)",
|
|
9088
10084
|
margin: "0 0 6px 0",
|
|
9089
|
-
}, children: formatDate12(eventDetails.startTime) })] }), jsxs("div", { className: "print-detail-item", children: [jsx("div", { className: "
|
|
10085
|
+
}, children: formatDate12(eventDetails.startTime) })] }), jsxs("div", { className: "print-detail-item", children: [jsx("div", { className: "print-detail-label", style: {
|
|
9090
10086
|
color: "var(--bw-text-muted)",
|
|
9091
10087
|
fontSize: "var(--bw-font-size-small)",
|
|
9092
10088
|
fontFamily: "var(--bw-font-family)",
|
|
10089
|
+
fontWeight: 500,
|
|
9093
10090
|
}, children: "Zeit" }), jsxs("p", { className: "print-detail-value", style: {
|
|
9094
10091
|
fontWeight: "600",
|
|
9095
10092
|
color: "var(--bw-text-color)",
|
|
@@ -9107,13 +10104,13 @@ const BookingSuccessModal = ({ isOpen, onClose, config, onError, paymentIntentId
|
|
|
9107
10104
|
color: "var(--bw-text-color)",
|
|
9108
10105
|
margin: "0",
|
|
9109
10106
|
fontFamily: "var(--bw-font-family)",
|
|
9110
|
-
}, children: ["Teilnehmer (", formData.participants.length, ")"] }) }), jsx("div", { className: "print-only", children: jsxs("div", { className: "print-section-title", children: ["Teilnehmer (", formData.participants.length, ")"] }) }), jsx("div", {
|
|
10107
|
+
}, children: ["Teilnehmer (", formData.participants.length, ")"] }) }), jsx("div", { className: "print-only", children: jsxs("div", { className: "print-section-title", children: ["Teilnehmer (", formData.participants.length, ")"] }) }), jsx("div", { children: jsx("div", { style: {
|
|
9111
10108
|
display: "flex",
|
|
9112
10109
|
flexDirection: "column",
|
|
9113
10110
|
gap: "var(--bw-spacing-small)",
|
|
9114
10111
|
}, children: formData.participants
|
|
9115
10112
|
.filter((p) => p.name.trim())
|
|
9116
|
-
.map((participant, index) => (jsx("div", { className: "
|
|
10113
|
+
.map((participant, index) => (jsx("div", { className: "print-participant", style: {
|
|
9117
10114
|
display: "flex",
|
|
9118
10115
|
justifyContent: "space-between",
|
|
9119
10116
|
alignItems: "center",
|
|
@@ -9123,7 +10120,7 @@ const BookingSuccessModal = ({ isOpen, onClose, config, onError, paymentIntentId
|
|
|
9123
10120
|
}, children: jsxs("div", { className: "print-participant-info", children: [jsx("div", { className: "print-participant-name", style: {
|
|
9124
10121
|
color: "var(--bw-text-color)",
|
|
9125
10122
|
fontFamily: "var(--bw-font-family)",
|
|
9126
|
-
}, children: participant.name }), participant.age && (jsxs("div", { className: "
|
|
10123
|
+
}, children: participant.name }), participant.age && (jsxs("div", { className: "print-participant-age", style: {
|
|
9127
10124
|
color: "var(--bw-text-muted)",
|
|
9128
10125
|
fontSize: "var(--bw-font-size-small)",
|
|
9129
10126
|
fontFamily: "var(--bw-font-family)",
|
|
@@ -9139,7 +10136,14 @@ const BookingSuccessModal = ({ isOpen, onClose, config, onError, paymentIntentId
|
|
|
9139
10136
|
color: "var(--bw-text-color)",
|
|
9140
10137
|
margin: "0",
|
|
9141
10138
|
fontFamily: "var(--bw-font-family)",
|
|
9142
|
-
}, children: "Zahlungs\u00FCbersicht" }) }), jsx("div", { className: "print-only", children: jsx("div", { className: "print-section-title", children: "Zahlungs\u00FCbersicht" }) }), jsxs("div", {
|
|
10139
|
+
}, children: "Zahlungs\u00FCbersicht" }) }), jsx("div", { className: "print-only", children: jsx("div", { className: "print-section-title", children: "Zahlungs\u00FCbersicht" }) }), jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [jsxs("div", { className: "print-hidden", style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-small)" }, children: [jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxs("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)", fontSize: "var(--bw-font-size-small)" }, children: [eventDetails.name, " (", booking.participantCount, "x ", formatCurrency(eventDetails.price), ")"] }), jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formatCurrency(eventDetails.price * booking.participantCount) })] }), bookingData.purchases && bookingData.purchases.length > 0 && (jsx(Fragment, { children: bookingData.purchases.map((purchase) => (jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsxs("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)", fontSize: "var(--bw-font-size-small)" }, children: [purchase.product?.name || "Produkt", " (", purchase.quantity, "x ", formatCurrency(purchase.unitPrice), ")"] }), jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formatCurrency(purchase.totalPrice) })] }, purchase.id))) })), jsxs("div", { style: {
|
|
10140
|
+
display: "flex",
|
|
10141
|
+
justifyContent: "space-between",
|
|
10142
|
+
alignItems: "center",
|
|
10143
|
+
borderTop: "1px solid var(--bw-border-color)",
|
|
10144
|
+
paddingTop: "var(--bw-spacing-small)",
|
|
10145
|
+
marginTop: "var(--bw-spacing-small)"
|
|
10146
|
+
}, children: [jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)", fontWeight: "600" }, children: "Gesamtbetrag" }), jsx("span", { style: { color: "var(--bw-highlight-color)", fontFamily: "var(--bw-font-family)", fontWeight: "700" }, children: formatCurrency(bookingData.order.total) })] })] }), jsx("div", { className: "print-payment-summary print-only", children: jsxs("div", { className: "print-payment-row", children: [jsx("span", { children: "Gesamtbetrag" }), jsx("span", { children: formatCurrency(bookingData.order.total) })] }) })] })] }), jsxs("div", { className: "print-booking-card", style: {
|
|
9143
10147
|
backgroundColor: "var(--bw-surface-color)",
|
|
9144
10148
|
border: `1px solid var(--bw-border-color)`,
|
|
9145
10149
|
borderRadius: "var(--bw-border-radius)",
|
|
@@ -9151,7 +10155,7 @@ const BookingSuccessModal = ({ isOpen, onClose, config, onError, paymentIntentId
|
|
|
9151
10155
|
color: "var(--bw-text-color)",
|
|
9152
10156
|
margin: "0",
|
|
9153
10157
|
fontFamily: "var(--bw-font-family)",
|
|
9154
|
-
}, children: "Kontaktdaten" }) }), jsx("div", { className: "print-only", children: jsx("div", { className: "print-section-title", children: "Kontaktdaten" }) }), jsxs("div", {
|
|
10158
|
+
}, children: "Kontaktdaten" }) }), jsx("div", { className: "print-only", children: jsx("div", { className: "print-section-title", children: "Kontaktdaten" }) }), jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "var(--bw-spacing-small)" }, children: [jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Name:" }), jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formData.customerName })] }), jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "E-Mail:" }), jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formData.customerEmail })] }), formData.customerPhone && (jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [jsx("span", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "Telefon:" }), jsx("span", { style: { color: "var(--bw-text-color)", fontFamily: "var(--bw-font-family)" }, children: formData.customerPhone })] }))] })] }), jsx("div", { className: "print-booking-card", style: {
|
|
9155
10159
|
backgroundColor: "var(--bw-surface-color)",
|
|
9156
10160
|
border: `1px solid var(--bw-border-color)`,
|
|
9157
10161
|
borderRadius: "var(--bw-border-radius)",
|
|
@@ -9238,9 +10242,51 @@ function EventTypeDetailsDialog({ isOpen, onClose, eventType, onEventTypeSelect,
|
|
|
9238
10242
|
onEventTypeSelect(eventType);
|
|
9239
10243
|
onClose();
|
|
9240
10244
|
};
|
|
9241
|
-
return (jsx(DialogWrapper, { isOpen: isOpen, onClose: onClose, maxWidth: "700px", children: jsxs("div", {
|
|
10245
|
+
return (jsx(DialogWrapper, { isOpen: isOpen, onClose: onClose, maxWidth: "700px", children: jsxs("div", { style: { padding: "24px" }, children: [jsxs("div", { style: {
|
|
10246
|
+
marginBottom: "24px",
|
|
10247
|
+
padding: "16px",
|
|
10248
|
+
backgroundColor: "var(--bw-background-color)",
|
|
10249
|
+
borderRadius: "var(--bw-border-radius)",
|
|
10250
|
+
border: "1px solid var(--bw-border-color)",
|
|
10251
|
+
}, children: [jsxs("div", { children: [jsx("div", { style: {
|
|
10252
|
+
fontSize: "14px",
|
|
10253
|
+
fontWeight: 600,
|
|
10254
|
+
color: "var(--bw-highlight-color)",
|
|
10255
|
+
marginBottom: "8px",
|
|
10256
|
+
fontFamily: "var(--bw-font-family)",
|
|
10257
|
+
}, children: eventType.category.name }), jsx("h2", { style: {
|
|
10258
|
+
fontSize: "28px",
|
|
10259
|
+
fontWeight: 700,
|
|
10260
|
+
color: "var(--bw-text-color)",
|
|
10261
|
+
marginBottom: "16px",
|
|
10262
|
+
lineHeight: 1.25,
|
|
10263
|
+
fontFamily: "var(--bw-font-family)",
|
|
10264
|
+
margin: "0 0 16px 0",
|
|
10265
|
+
}, children: eventType.name })] }), eventType.highlights && eventType.highlights.length > 0 && (jsx("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: jsx("div", { style: { marginBottom: "24px" }, children: jsx("ul", { style: {
|
|
10266
|
+
listStyle: "none",
|
|
10267
|
+
padding: 0,
|
|
10268
|
+
margin: 0,
|
|
10269
|
+
display: "flex",
|
|
10270
|
+
flexDirection: "column",
|
|
10271
|
+
gap: "2px",
|
|
10272
|
+
}, children: eventType.highlights
|
|
9242
10273
|
.filter((highlight) => highlight.trim())
|
|
9243
|
-
.map((highlight, index) => (jsxs("li", {
|
|
10274
|
+
.map((highlight, index) => (jsxs("li", { style: {
|
|
10275
|
+
display: "flex",
|
|
10276
|
+
alignItems: "flex-start",
|
|
10277
|
+
gap: "10px",
|
|
10278
|
+
fontFamily: "var(--bw-font-family)",
|
|
10279
|
+
fontSize: "16px",
|
|
10280
|
+
lineHeight: 1.625,
|
|
10281
|
+
color: "var(--bw-text-color)",
|
|
10282
|
+
}, children: [jsx("div", { style: { marginTop: "4px", flexShrink: 0 }, children: jsx(IconCheck, { size: 16, color: "var(--bw-success-color)" }) }), jsx("span", { children: highlight.trim() })] }, index))) }) }) }))] }), eventType.description && (jsxs("div", { style: {
|
|
10283
|
+
marginBottom: "24px",
|
|
10284
|
+
color: "var(--bw-text-muted)",
|
|
10285
|
+
fontSize: "16px",
|
|
10286
|
+
lineHeight: 1.625,
|
|
10287
|
+
fontFamily: "var(--bw-font-family)",
|
|
10288
|
+
padding: "0 20px",
|
|
10289
|
+
}, children: [jsx("style", { dangerouslySetInnerHTML: {
|
|
9244
10290
|
__html: `
|
|
9245
10291
|
.markdown-content p {
|
|
9246
10292
|
margin: 0 0 12px 0 !important;
|
|
@@ -9312,11 +10358,76 @@ function EventTypeDetailsDialog({ isOpen, onClose, eventType, onEventTypeSelect,
|
|
|
9312
10358
|
text-decoration: none !important;
|
|
9313
10359
|
}
|
|
9314
10360
|
`,
|
|
9315
|
-
} }), jsx("div", { className: "markdown-content", children: Markdown({ children: preprocessMarkdown$1(eventType.description) }) })] })), jsxs("div", {
|
|
10361
|
+
} }), jsx("div", { className: "markdown-content", children: Markdown({ children: preprocessMarkdown$1(eventType.description) }) })] })), jsxs("div", { style: {
|
|
10362
|
+
display: "flex",
|
|
10363
|
+
justifyContent: "space-between",
|
|
10364
|
+
alignItems: "center",
|
|
10365
|
+
marginTop: "32px",
|
|
10366
|
+
padding: "20px",
|
|
10367
|
+
backgroundColor: "var(--bw-background-color)",
|
|
10368
|
+
borderRadius: "var(--bw-border-radius)",
|
|
10369
|
+
border: "1px solid var(--bw-border-color)",
|
|
10370
|
+
}, children: [jsxs("div", { children: [jsx("div", { style: {
|
|
10371
|
+
fontWeight: 700,
|
|
10372
|
+
color: "var(--bw-text-color)",
|
|
10373
|
+
fontFamily: "var(--bw-font-family)",
|
|
10374
|
+
textAlign: "left",
|
|
10375
|
+
}, children: eventType.groupedDurations && jsx("span", { children: eventType.groupedDurations }) }), jsx("div", { style: {
|
|
10376
|
+
fontSize: "clamp(1.72rem, 4vw, 32px)",
|
|
10377
|
+
fontWeight: 700,
|
|
10378
|
+
color: "var(--bw-text-color)",
|
|
10379
|
+
fontFamily: "var(--bw-font-family)",
|
|
10380
|
+
textAlign: "right",
|
|
10381
|
+
}, children: jsxs("span", { children: ["ab ", formatCurrency(eventType.minPrice)] }) })] }), isAvailable && (jsxs("button", { onClick: handleBookingClick, style: {
|
|
10382
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
10383
|
+
color: "#ffffff",
|
|
10384
|
+
padding: "14px 28px",
|
|
10385
|
+
border: "none",
|
|
10386
|
+
borderRadius: "var(--bw-border-radius)",
|
|
10387
|
+
fontSize: "16px",
|
|
10388
|
+
fontWeight: 600,
|
|
10389
|
+
fontFamily: "var(--bw-font-family)",
|
|
10390
|
+
display: "flex",
|
|
10391
|
+
alignItems: "center",
|
|
10392
|
+
gap: "8px",
|
|
10393
|
+
cursor: "pointer",
|
|
10394
|
+
transition: "all 0.2s ease",
|
|
10395
|
+
}, children: [jsx(IconWave, { size: 20, color: "white" }), "Jetzt buchen"] }))] }), !isAvailable && (jsx("div", { style: {
|
|
10396
|
+
position: "absolute",
|
|
10397
|
+
inset: 0,
|
|
10398
|
+
backgroundColor: "rgba(0, 0, 0, 0.3)",
|
|
10399
|
+
backdropFilter: "blur(4px)",
|
|
10400
|
+
display: "flex",
|
|
10401
|
+
alignItems: "center",
|
|
10402
|
+
justifyContent: "center",
|
|
10403
|
+
borderRadius: "var(--bw-border-radius)",
|
|
10404
|
+
}, children: jsx("div", { style: {
|
|
10405
|
+
backgroundColor: "rgba(255, 255, 255, 0.9)",
|
|
10406
|
+
padding: "16px 32px",
|
|
10407
|
+
borderRadius: "var(--bw-border-radius)",
|
|
10408
|
+
color: "var(--bw-text-color)",
|
|
10409
|
+
fontWeight: 600,
|
|
10410
|
+
fontSize: "18px",
|
|
10411
|
+
fontFamily: "var(--bw-font-family)",
|
|
10412
|
+
boxShadow: "var(--bw-shadow-md)",
|
|
10413
|
+
}, children: "Ausgebucht" }) }))] }) }));
|
|
9316
10414
|
}
|
|
9317
10415
|
|
|
9318
10416
|
// A placeholder SVG for events without an image.
|
|
9319
|
-
const EventImagePlaceholder = () => (jsx("div", {
|
|
10417
|
+
const EventImagePlaceholder = () => (jsx("div", { style: {
|
|
10418
|
+
width: "100%",
|
|
10419
|
+
height: "100%",
|
|
10420
|
+
background: "linear-gradient(to bottom right, rgba(var(--bw-highlight-color-rgb), 0.2), var(--bw-highlight-color))",
|
|
10421
|
+
display: "flex",
|
|
10422
|
+
alignItems: "center",
|
|
10423
|
+
justifyContent: "center",
|
|
10424
|
+
overflow: "hidden",
|
|
10425
|
+
position: "relative",
|
|
10426
|
+
}, children: jsxs("svg", { width: "60%", height: "60%", viewBox: "0 0 120 40", preserveAspectRatio: "xMidYMid meet", style: {
|
|
10427
|
+
position: "absolute",
|
|
10428
|
+
opacity: 0.18,
|
|
10429
|
+
filter: "blur(0.5px)",
|
|
10430
|
+
}, children: [jsx("path", { d: "M0 30 Q 15 10, 30 30 T 60 30 T 90 30 T 120 30", stroke: "white", strokeWidth: "4", fill: "none", strokeLinecap: "round" }), jsx("circle", { cx: "20", cy: "25", r: "3", fill: "white", opacity: "0.7" }), jsx("circle", { cx: "100", cy: "28", r: "2", fill: "white", opacity: "0.5" })] }) }));
|
|
9320
10431
|
// Image Carousel Component with smooth slide animations
|
|
9321
10432
|
const ImageCarousel = ({ images, eventName }) => {
|
|
9322
10433
|
const [currentIndex, setCurrentIndex] = useState(0);
|
|
@@ -9348,16 +10459,92 @@ const ImageCarousel = ({ images, eventName }) => {
|
|
|
9348
10459
|
if (images.length === 0) {
|
|
9349
10460
|
return jsx(EventImagePlaceholder, {});
|
|
9350
10461
|
}
|
|
9351
|
-
return (jsxs("div", {
|
|
10462
|
+
return (jsxs("div", { style: {
|
|
10463
|
+
position: "relative",
|
|
10464
|
+
width: "100%",
|
|
10465
|
+
height: "100%",
|
|
10466
|
+
overflow: "hidden",
|
|
10467
|
+
borderRadius: "inherit",
|
|
10468
|
+
}, children: [jsx("div", { style: {
|
|
10469
|
+
display: "flex",
|
|
10470
|
+
height: "100%",
|
|
10471
|
+
transition: "transform 0.4s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
9352
10472
|
width: `${images.length * 100}%`,
|
|
9353
10473
|
transform: `translateX(-${(currentIndex * 100) / images.length}%)`,
|
|
9354
|
-
}, children: images.map((image, index) => (jsx("div", {
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
:
|
|
10474
|
+
}, children: images.map((image, index) => (jsx("div", { style: {
|
|
10475
|
+
height: "100%",
|
|
10476
|
+
flexShrink: 0,
|
|
10477
|
+
overflow: "hidden",
|
|
10478
|
+
position: "relative",
|
|
10479
|
+
borderRadius: "inherit",
|
|
10480
|
+
width: `${100 / images.length}%`,
|
|
10481
|
+
}, children: jsx("img", { src: image, alt: `${eventName} - Bild ${index + 1}`, style: {
|
|
10482
|
+
width: "100%",
|
|
10483
|
+
height: "100%",
|
|
10484
|
+
objectFit: "cover",
|
|
10485
|
+
display: "block",
|
|
10486
|
+
position: "absolute",
|
|
10487
|
+
top: 0,
|
|
10488
|
+
left: 0,
|
|
10489
|
+
borderRadius: "inherit",
|
|
10490
|
+
} }) }, index))) }), images.length > 1 && (jsxs(Fragment, { children: [jsx("button", { onClick: prevImage, disabled: isTransitioning, style: {
|
|
10491
|
+
position: "absolute",
|
|
10492
|
+
left: "12px",
|
|
10493
|
+
top: "50%",
|
|
10494
|
+
transform: "translateY(-50%)",
|
|
10495
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
10496
|
+
border: "none",
|
|
10497
|
+
borderRadius: "50%",
|
|
10498
|
+
width: "40px",
|
|
10499
|
+
height: "40px",
|
|
10500
|
+
display: "flex",
|
|
10501
|
+
alignItems: "center",
|
|
10502
|
+
justifyContent: "center",
|
|
10503
|
+
transition: "all 0.2s ease",
|
|
10504
|
+
zIndex: 2,
|
|
10505
|
+
cursor: isTransitioning ? "not-allowed" : "pointer",
|
|
10506
|
+
opacity: isTransitioning ? 0.5 : 1,
|
|
10507
|
+
}, children: jsx(IconChevronLeft, { size: 20, color: "white" }) }), jsx("button", { onClick: nextImage, disabled: isTransitioning, style: {
|
|
10508
|
+
position: "absolute",
|
|
10509
|
+
right: "12px",
|
|
10510
|
+
top: "50%",
|
|
10511
|
+
transform: "translateY(-50%)",
|
|
10512
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
10513
|
+
border: "none",
|
|
10514
|
+
borderRadius: "50%",
|
|
10515
|
+
width: "40px",
|
|
10516
|
+
height: "40px",
|
|
10517
|
+
display: "flex",
|
|
10518
|
+
alignItems: "center",
|
|
10519
|
+
justifyContent: "center",
|
|
10520
|
+
transition: "all 0.2s ease",
|
|
10521
|
+
zIndex: 2,
|
|
10522
|
+
cursor: isTransitioning ? "not-allowed" : "pointer",
|
|
10523
|
+
opacity: isTransitioning ? 0.5 : 1,
|
|
10524
|
+
}, children: jsx(IconChevronRight, { size: 20, color: "white" }) })] })), images.length > 1 && (jsx("div", { style: {
|
|
10525
|
+
position: "absolute",
|
|
10526
|
+
bottom: "12px",
|
|
10527
|
+
left: "50%",
|
|
10528
|
+
transform: "translateX(-50%)",
|
|
10529
|
+
display: "flex",
|
|
10530
|
+
gap: "8px",
|
|
10531
|
+
zIndex: 2,
|
|
10532
|
+
}, children: images.map((_, index) => (jsx("button", { onClick: (e) => goToImage(index, e), disabled: isTransitioning, style: {
|
|
10533
|
+
height: "8px",
|
|
10534
|
+
border: "none",
|
|
10535
|
+
borderRadius: "var(--bw-border-radius)",
|
|
10536
|
+
transition: "all 0.3s ease",
|
|
10537
|
+
cursor: isTransitioning ? "not-allowed" : "pointer",
|
|
10538
|
+
opacity: isTransitioning ? 0.7 : 1,
|
|
10539
|
+
width: index === currentIndex ? "16px" : "8px",
|
|
10540
|
+
backgroundColor: index === currentIndex ? "#ffffff" : "rgba(255, 255, 255, 0.5)",
|
|
10541
|
+
} }, index))) })), isTransitioning && (jsx("div", { style: {
|
|
10542
|
+
position: "absolute",
|
|
10543
|
+
inset: 0,
|
|
10544
|
+
backgroundColor: "rgba(0, 0, 0, 0.1)",
|
|
10545
|
+
zIndex: 1,
|
|
10546
|
+
pointerEvents: "none",
|
|
10547
|
+
} }))] }));
|
|
9361
10548
|
};
|
|
9362
10549
|
|
|
9363
10550
|
// Helper function to preprocess markdown for underline support
|
|
@@ -9383,160 +10570,240 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, isLoading = false,
|
|
|
9383
10570
|
if (isLoading) {
|
|
9384
10571
|
return jsx(EventCardSkeleton, { count: skeletonCount });
|
|
9385
10572
|
}
|
|
9386
|
-
return (jsxs(Fragment, { children: [jsx("style", {
|
|
9387
|
-
|
|
9388
|
-
|
|
9389
|
-
|
|
9390
|
-
|
|
9391
|
-
|
|
9392
|
-
|
|
9393
|
-
|
|
9394
|
-
|
|
9395
|
-
|
|
9396
|
-
|
|
9397
|
-
|
|
9398
|
-
|
|
9399
|
-
|
|
9400
|
-
|
|
9401
|
-
|
|
9402
|
-
|
|
9403
|
-
|
|
9404
|
-
|
|
9405
|
-
|
|
9406
|
-
|
|
9407
|
-
|
|
9408
|
-
|
|
9409
|
-
|
|
9410
|
-
|
|
9411
|
-
|
|
9412
|
-
|
|
9413
|
-
|
|
9414
|
-
|
|
9415
|
-
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
|
|
9430
|
-
|
|
9431
|
-
|
|
9432
|
-
|
|
9433
|
-
|
|
9434
|
-
|
|
9435
|
-
|
|
9436
|
-
|
|
9437
|
-
|
|
9438
|
-
|
|
9439
|
-
|
|
9440
|
-
|
|
9441
|
-
|
|
9442
|
-
|
|
9443
|
-
color: var(--bw-text-color);
|
|
9444
|
-
}
|
|
9445
|
-
.event-type-markdown em {
|
|
9446
|
-
font-style: italic;
|
|
9447
|
-
}
|
|
9448
|
-
.event-type-markdown u {
|
|
9449
|
-
text-decoration: underline;
|
|
9450
|
-
}
|
|
9451
|
-
.event-type-markdown ul {
|
|
9452
|
-
margin: 6px 0 !important;
|
|
9453
|
-
padding: 0 !important;
|
|
9454
|
-
padding-left: 24px !important;
|
|
9455
|
-
list-style: none !important;
|
|
9456
|
-
position: relative !important;
|
|
9457
|
-
}
|
|
9458
|
-
.event-type-markdown ul li {
|
|
9459
|
-
margin-bottom: 2px !important;
|
|
9460
|
-
padding-left: 0 !important;
|
|
9461
|
-
position: relative !important;
|
|
9462
|
-
color: var(--bw-text-muted) !important;
|
|
9463
|
-
font-family: var(--bw-font-family) !important;
|
|
9464
|
-
}
|
|
9465
|
-
.event-type-markdown ul li::before {
|
|
9466
|
-
content: "•" !important;
|
|
9467
|
-
color: var(--bw-text-color) !important;
|
|
9468
|
-
position: absolute !important;
|
|
9469
|
-
left: -16px !important;
|
|
9470
|
-
top: 0 !important;
|
|
9471
|
-
font-weight: bold !important;
|
|
9472
|
-
}
|
|
9473
|
-
.event-type-markdown ol {
|
|
9474
|
-
margin: 6px 0 !important;
|
|
9475
|
-
padding: 0 !important;
|
|
9476
|
-
padding-left: 24px !important;
|
|
9477
|
-
counter-reset: list-counter !important;
|
|
9478
|
-
list-style: none !important;
|
|
9479
|
-
position: relative !important;
|
|
9480
|
-
}
|
|
9481
|
-
.event-type-markdown ol li {
|
|
9482
|
-
margin-bottom: 2px !important;
|
|
9483
|
-
padding-left: 0 !important;
|
|
9484
|
-
position: relative !important;
|
|
9485
|
-
counter-increment: list-counter !important;
|
|
9486
|
-
color: var(--bw-text-muted) !important;
|
|
9487
|
-
font-family: var(--bw-font-family) !important;
|
|
9488
|
-
}
|
|
9489
|
-
.event-type-markdown ol li::before {
|
|
9490
|
-
content: counter(list-counter) "." !important;
|
|
9491
|
-
color: var(--bw-text-color) !important;
|
|
9492
|
-
position: absolute !important;
|
|
9493
|
-
left: -20px !important;
|
|
9494
|
-
top: 0 !important;
|
|
9495
|
-
font-weight: bold !important;
|
|
9496
|
-
}
|
|
9497
|
-
.event-type-markdown blockquote {
|
|
9498
|
-
margin: 4px 0;
|
|
9499
|
-
padding-left: 12px;
|
|
9500
|
-
border-left: 2px solid var(--bw-border-color);
|
|
9501
|
-
font-style: italic;
|
|
9502
|
-
color: var(--bw-text-muted);
|
|
9503
|
-
}
|
|
9504
|
-
.event-type-markdown a {
|
|
9505
|
-
color: var(--bw-highlight-color);
|
|
9506
|
-
text-decoration: underline;
|
|
9507
|
-
}
|
|
9508
|
-
`,
|
|
9509
|
-
} }), eventTypes.length === 0 ? (jsx("div", { className: "max-w-[600px] mx-auto p-6", children: jsxs("div", { className: "bg-surface border border-solid border-border rounded p-6 text-center font-sans min-h-[400px] flex flex-col items-center justify-center", children: [jsx("div", { className: "w-16 h-16 bg-highlight rounded-full mx-auto mb-4 flex items-center justify-center text-[32px] text-white opacity-80", children: "\uD83D\uDCC5" }), jsx("h3", { className: "text-xl font-semibold text-text-primary m-0 mb-2 font-sans", children: "Keine Veranstaltungen verf\u00FCgbar" }), jsx("p", { className: "text-text-muted text-base leading-relaxed m-0 mb-6 font-sans max-w-[400px]", children: "Derzeit sind keine Veranstaltungen in dieser Kategorie verf\u00FCgbar. Bitte schaue sp\u00E4ter noch einmal vorbei oder kontaktiere uns direkt." }), jsxs("button", { onClick: () => window.location.reload(), className: "bg-surface text-highlight px-6 py-3 border border-solid border-highlight rounded text-base font-semibold cursor-pointer font-sans transition-all duration-200 flex items-center gap-2 hover:bg-highlight hover:text-white hover:-translate-y-0.5", children: [jsx("span", { className: "text-base", children: "\uD83D\uDD04" }), "Seite neu laden"] })] }) })) : (jsx("div", { className: "event-type-list p-0", children: jsx("div", { className: "grid grid-cols-[repeat(auto-fill,minmax(350px,1fr))] gap-6 auto-rows-fr", children: eventTypes.map((eventType) => {
|
|
10573
|
+
return (jsxs(Fragment, { children: [eventTypes.length === 0 ? (jsx("div", { style: { maxWidth: "600px", margin: "0 auto", padding: "24px" }, children: jsxs("div", { style: {
|
|
10574
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
10575
|
+
border: "1px solid var(--bw-border-color)",
|
|
10576
|
+
borderRadius: "var(--bw-border-radius)",
|
|
10577
|
+
padding: "24px",
|
|
10578
|
+
textAlign: "center",
|
|
10579
|
+
fontFamily: "var(--bw-font-family)",
|
|
10580
|
+
minHeight: "400px",
|
|
10581
|
+
display: "flex",
|
|
10582
|
+
flexDirection: "column",
|
|
10583
|
+
alignItems: "center",
|
|
10584
|
+
justifyContent: "center",
|
|
10585
|
+
}, children: [jsx("div", { style: {
|
|
10586
|
+
width: "64px",
|
|
10587
|
+
height: "64px",
|
|
10588
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
10589
|
+
borderRadius: "50%",
|
|
10590
|
+
margin: "0 auto 16px auto",
|
|
10591
|
+
display: "flex",
|
|
10592
|
+
alignItems: "center",
|
|
10593
|
+
justifyContent: "center",
|
|
10594
|
+
fontSize: "32px",
|
|
10595
|
+
color: "#ffffff",
|
|
10596
|
+
opacity: 0.8,
|
|
10597
|
+
}, children: "\uD83D\uDCC5" }), jsx("h3", { style: {
|
|
10598
|
+
fontSize: "20px",
|
|
10599
|
+
fontWeight: 600,
|
|
10600
|
+
color: "var(--bw-text-color)",
|
|
10601
|
+
margin: "0 0 8px 0",
|
|
10602
|
+
fontFamily: "var(--bw-font-family)",
|
|
10603
|
+
}, children: "Keine Veranstaltungen verf\u00FCgbar" }), jsx("p", { style: {
|
|
10604
|
+
color: "var(--bw-text-muted)",
|
|
10605
|
+
fontSize: "16px",
|
|
10606
|
+
lineHeight: 1.6,
|
|
10607
|
+
margin: "0 0 24px 0",
|
|
10608
|
+
fontFamily: "var(--bw-font-family)",
|
|
10609
|
+
maxWidth: "400px",
|
|
10610
|
+
}, children: "Derzeit sind keine Veranstaltungen in dieser Kategorie verf\u00FCgbar. Bitte schaue sp\u00E4ter noch einmal vorbei oder kontaktiere uns direkt." }), jsxs("button", { onClick: () => window.location.reload(), style: {
|
|
10611
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
10612
|
+
color: "var(--bw-highlight-color)",
|
|
10613
|
+
padding: "12px 24px",
|
|
10614
|
+
border: "1px solid var(--bw-highlight-color)",
|
|
10615
|
+
borderRadius: "var(--bw-border-radius)",
|
|
10616
|
+
fontSize: "16px",
|
|
10617
|
+
fontWeight: 600,
|
|
10618
|
+
cursor: "pointer",
|
|
10619
|
+
fontFamily: "var(--bw-font-family)",
|
|
10620
|
+
transition: "all 0.2s ease",
|
|
10621
|
+
display: "flex",
|
|
10622
|
+
alignItems: "center",
|
|
10623
|
+
gap: "8px",
|
|
10624
|
+
}, children: [jsx("span", { style: { fontSize: "16px" }, children: "\uD83D\uDD04" }), "Seite neu laden"] })] }) })) : (jsx("div", { className: "event-type-list", style: { padding: 0 }, children: jsx("div", { style: {
|
|
10625
|
+
display: "grid",
|
|
10626
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(350px, 1fr))",
|
|
10627
|
+
gap: "24px",
|
|
10628
|
+
gridAutoRows: "1fr",
|
|
10629
|
+
}, children: eventTypes.map((eventType) => {
|
|
9510
10630
|
const isAvailable = eventType.hasAvailableInstances;
|
|
9511
|
-
return (jsxs("div", { className:
|
|
9512
|
-
|
|
9513
|
-
: "
|
|
10631
|
+
return (jsxs("div", { className: "event-type-card", style: {
|
|
10632
|
+
position: "relative",
|
|
10633
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
10634
|
+
border: "1px solid var(--bw-border-color)",
|
|
10635
|
+
borderRadius: "var(--bw-border-radius)",
|
|
10636
|
+
overflow: "hidden",
|
|
10637
|
+
transition: "all 0.3s ease",
|
|
10638
|
+
boxShadow: "var(--bw-shadow-md)",
|
|
10639
|
+
fontFamily: "var(--bw-font-family)",
|
|
10640
|
+
cursor: isAvailable ? "pointer" : "not-allowed",
|
|
10641
|
+
opacity: isAvailable ? 1 : 0.6,
|
|
10642
|
+
}, onClick: () => isAvailable && onEventTypeSelect(eventType), children: [jsx("div", { style: { position: "absolute", top: "16px", right: "16px", zIndex: 10 }, children: jsx("div", { style: {
|
|
10643
|
+
padding: "4px 8px",
|
|
10644
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
10645
|
+
fontSize: "12px",
|
|
10646
|
+
fontWeight: 600,
|
|
10647
|
+
color: "#ffffff",
|
|
10648
|
+
fontFamily: "var(--bw-font-family)",
|
|
10649
|
+
backgroundColor: isAvailable
|
|
10650
|
+
? "var(--bw-success-color)"
|
|
10651
|
+
: "var(--bw-error-color)",
|
|
10652
|
+
}, children: isAvailable ? "freie Plätze" : "Ausgebucht" }) }), jsx("div", { style: { position: "absolute", top: "16px", left: "16px", zIndex: 10 }, children: jsx("div", { style: {
|
|
10653
|
+
fontSize: "13px",
|
|
10654
|
+
color: "var(--bw-surface-color)",
|
|
10655
|
+
fontWeight: 600,
|
|
10656
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
10657
|
+
padding: "2px 8px",
|
|
10658
|
+
borderRadius: "var(--bw-border-radius)",
|
|
10659
|
+
fontFamily: "var(--bw-font-family)",
|
|
10660
|
+
}, children: eventType.category.name }) }), jsx("div", { className: "event-type-img", style: { position: "relative", width: "100%", height: "300px" }, children: jsx(ImageCarousel, { images: eventType.images, eventName: eventType.name }) }), jsxs("div", { className: "event-type-content", style: {
|
|
10661
|
+
padding: "12px 18px",
|
|
10662
|
+
display: "flex",
|
|
10663
|
+
flexDirection: "column",
|
|
10664
|
+
justifyContent: "space-between",
|
|
10665
|
+
height: "400px",
|
|
10666
|
+
}, children: [jsxs("div", { children: [jsx("h2", { className: "event-type-title", style: {
|
|
10667
|
+
fontSize: "clamp(1.1rem, 2.5vw, 24px)",
|
|
10668
|
+
fontWeight: 700,
|
|
10669
|
+
color: "var(--bw-text-color)",
|
|
10670
|
+
lineHeight: 1.25,
|
|
10671
|
+
fontFamily: "var(--bw-font-family)",
|
|
10672
|
+
margin: "0 0 12px 0",
|
|
10673
|
+
}, children: eventType.name }), jsxs("div", { style: { display: "flex", alignItems: "center", gap: "6px" }, children: [jsx(IconCalendar, { size: 17, color: "var(--bw-text-color)" }), jsx("span", { style: {
|
|
10674
|
+
fontFamily: "var(--bw-font-family)",
|
|
10675
|
+
fontSize: "14px",
|
|
10676
|
+
color: "var(--bw-text-muted)",
|
|
10677
|
+
}, children: eventType.nextAvailableDate
|
|
9514
10678
|
? `Freie Plätze ab ${formatDate(eventType.nextAvailableDate)}`
|
|
9515
|
-
: "Keine Termine frei" })] }), jsx("div", {
|
|
10679
|
+
: "Keine Termine frei" })] }), jsx("div", { style: { cursor: "pointer" }, onClick: (e) => {
|
|
9516
10680
|
e.stopPropagation();
|
|
9517
10681
|
handleShowDetails(eventType);
|
|
9518
10682
|
}, children: eventType.highlights && eventType.highlights.length > 0 ? (
|
|
9519
10683
|
// Show highlights as list
|
|
9520
|
-
|
|
9521
|
-
|
|
9522
|
-
|
|
9523
|
-
|
|
10684
|
+
// Uses em-based sizing so it scales with font size
|
|
10685
|
+
// Fixed 5 rows * 1.5em line-height = 7.5em total
|
|
10686
|
+
jsx("div", { className: "event-type-highlights", style: {
|
|
10687
|
+
margin: "10px 0",
|
|
10688
|
+
height: "7.5em", // Fixed height in em units
|
|
10689
|
+
fontSize: "clamp(0.9rem, 2vw, 15px)",
|
|
10690
|
+
}, children: jsx("ul", { style: {
|
|
10691
|
+
listStyle: "none",
|
|
10692
|
+
padding: 0,
|
|
10693
|
+
margin: 0,
|
|
10694
|
+
display: "grid",
|
|
10695
|
+
// 5 rows of exactly 1.5em each (lineHeight)
|
|
10696
|
+
gridTemplateRows: "repeat(5, 1.5em)",
|
|
10697
|
+
gap: 0,
|
|
10698
|
+
overflow: "hidden",
|
|
9524
10699
|
}, children: eventType.highlights
|
|
9525
10700
|
.filter((highlight) => highlight.trim())
|
|
9526
|
-
.
|
|
10701
|
+
.slice(0, 5)
|
|
10702
|
+
.map((highlight, index) => (jsxs("li", { style: {
|
|
10703
|
+
display: "flex",
|
|
10704
|
+
alignItems: "center",
|
|
10705
|
+
gap: "0.5em",
|
|
10706
|
+
fontFamily: "var(--bw-font-family)",
|
|
10707
|
+
lineHeight: 1.5,
|
|
10708
|
+
height: "1.5em",
|
|
10709
|
+
color: "var(--bw-text-muted)",
|
|
10710
|
+
overflow: "hidden",
|
|
10711
|
+
}, children: [jsx("div", { style: { flexShrink: 0, display: "flex", alignItems: "center" }, children: jsx(IconCheck, { size: 14, color: "var(--bw-success-color)" }) }), jsx("span", { style: {
|
|
10712
|
+
whiteSpace: "nowrap",
|
|
10713
|
+
overflow: "hidden",
|
|
10714
|
+
textOverflow: "ellipsis",
|
|
10715
|
+
flex: 1,
|
|
10716
|
+
}, children: highlight.trim() })] }, index))) }) })) : eventType.description ? (jsx("div", { className: "event-type-desc", style: {
|
|
10717
|
+
color: "var(--bw-text-muted)",
|
|
10718
|
+
fontSize: "clamp(0.9rem, 2vw, 15px)",
|
|
10719
|
+
lineHeight: 1.5,
|
|
10720
|
+
fontFamily: "var(--bw-font-family)",
|
|
10721
|
+
margin: "10px 0",
|
|
10722
|
+
height: "7.5em", // Same height as highlights
|
|
10723
|
+
overflow: "hidden",
|
|
10724
|
+
textAlign: "left",
|
|
10725
|
+
}, children: jsx("div", { className: "event-type-markdown", style: {
|
|
9527
10726
|
display: "-webkit-box",
|
|
9528
10727
|
WebkitLineClamp: 5,
|
|
9529
10728
|
WebkitBoxOrient: "vertical",
|
|
9530
10729
|
overflow: "hidden",
|
|
9531
10730
|
}, children: Markdown({
|
|
9532
10731
|
children: preprocessMarkdown(eventType.description),
|
|
9533
|
-
}) }) })) : (jsx("div", { className: "event-type-desc
|
|
10732
|
+
}) }) })) : (jsx("div", { className: "event-type-desc", style: {
|
|
10733
|
+
margin: "10px 0",
|
|
10734
|
+
height: "7.5em", // Same height as highlights
|
|
10735
|
+
}, children: "\u00A0" })) })] }), jsxs("div", { children: [jsxs("div", { children: [jsx("div", { className: "event-type-price", style: {
|
|
10736
|
+
fontWeight: 700,
|
|
10737
|
+
color: "var(--bw-text-color)",
|
|
10738
|
+
fontFamily: "var(--bw-font-family)",
|
|
10739
|
+
textAlign: "right",
|
|
10740
|
+
}, children: eventType.groupedDurations.length > 1 ? (jsx("span", { children: eventType.groupedDurations })) : (jsx("span", { children: eventType.cheapestDurationPerDay % 60 === 0
|
|
9534
10741
|
? `${eventType.cheapestDurationPerDay / 60} Stunde${eventType.cheapestDurationPerDay / 60 > 1 ? "n" : ""}`
|
|
9535
|
-
: `${eventType.cheapestDurationPerDay} Minuten` })) }), jsx("div", { className: "event-type-price
|
|
10742
|
+
: `${eventType.cheapestDurationPerDay} Minuten` })) }), jsx("div", { className: "event-type-price", style: {
|
|
10743
|
+
fontSize: "clamp(1.72rem, 4vw, 32px)",
|
|
10744
|
+
fontWeight: 700,
|
|
10745
|
+
color: "var(--bw-text-color)",
|
|
10746
|
+
fontFamily: "var(--bw-font-family)",
|
|
10747
|
+
textAlign: "right",
|
|
10748
|
+
}, children: jsxs("span", { children: ["ab ", formatCurrency(eventType.minPrice)] }) })] }), jsxs("div", { style: {
|
|
10749
|
+
display: "flex",
|
|
10750
|
+
justifyContent: "flex-end",
|
|
10751
|
+
alignItems: "center",
|
|
10752
|
+
marginTop: "10px",
|
|
10753
|
+
gap: "12px",
|
|
10754
|
+
}, children: [(eventType.description ||
|
|
9536
10755
|
(eventType.highlights && eventType.highlights.length > 0)) && (jsx("button", { onClick: (e) => {
|
|
9537
10756
|
e.stopPropagation();
|
|
9538
10757
|
handleShowDetails(eventType);
|
|
9539
|
-
},
|
|
10758
|
+
}, style: {
|
|
10759
|
+
color: "var(--bw-highlight-color)",
|
|
10760
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
10761
|
+
padding: "12px",
|
|
10762
|
+
borderRadius: "var(--bw-border-radius)",
|
|
10763
|
+
fontSize: "clamp(0.8rem, 2vw, 16px)",
|
|
10764
|
+
fontWeight: 600,
|
|
10765
|
+
fontFamily: "var(--bw-font-family)",
|
|
10766
|
+
display: "flex",
|
|
10767
|
+
alignItems: "center",
|
|
10768
|
+
gap: "8px",
|
|
10769
|
+
border: "2px solid var(--bw-highlight-color)",
|
|
10770
|
+
cursor: "pointer",
|
|
10771
|
+
opacity: 0.6,
|
|
10772
|
+
transition: "all 0.2s ease",
|
|
10773
|
+
}, children: "Mehr Details" })), isAvailable && (jsxs("div", { style: {
|
|
10774
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
10775
|
+
color: "var(--bw-surface-color)",
|
|
10776
|
+
padding: "12px 24px",
|
|
10777
|
+
borderRadius: "var(--bw-border-radius)",
|
|
10778
|
+
fontSize: "clamp(1rem, 2vw, 16px)",
|
|
10779
|
+
fontWeight: 600,
|
|
10780
|
+
fontFamily: "var(--bw-font-family)",
|
|
10781
|
+
display: "flex",
|
|
10782
|
+
alignItems: "center",
|
|
10783
|
+
justifyContent: "center",
|
|
10784
|
+
textAlign: "center",
|
|
10785
|
+
gap: "8px",
|
|
10786
|
+
border: "none",
|
|
10787
|
+
cursor: "pointer",
|
|
10788
|
+
transition: "all 0.2s ease",
|
|
10789
|
+
}, children: [jsx(IconWave, { size: 15, color: "var(--bw-surface-color)" }), " Jetzt buchen"] }))] })] })] }), !isAvailable && (jsx("div", { style: {
|
|
10790
|
+
position: "absolute",
|
|
10791
|
+
inset: 0,
|
|
10792
|
+
backgroundColor: "rgba(0, 0, 0, 0.3)",
|
|
10793
|
+
backdropFilter: "blur(4px)",
|
|
10794
|
+
display: "flex",
|
|
10795
|
+
alignItems: "center",
|
|
10796
|
+
justifyContent: "center",
|
|
10797
|
+
}, children: jsx("div", { style: {
|
|
10798
|
+
backgroundColor: "rgba(255, 255, 255, 0.9)",
|
|
10799
|
+
padding: "12px 24px",
|
|
10800
|
+
borderRadius: "var(--bw-border-radius)",
|
|
10801
|
+
color: "var(--bw-text-color)",
|
|
10802
|
+
fontWeight: 600,
|
|
10803
|
+
fontSize: "16px",
|
|
10804
|
+
fontFamily: "var(--bw-font-family)",
|
|
10805
|
+
boxShadow: "var(--bw-shadow-md)",
|
|
10806
|
+
}, children: "Ausgebucht" }) }))] }, eventType.id));
|
|
9540
10807
|
}) }) })), jsx(EventTypeDetailsDialog, { isOpen: detailsDialogOpen, onClose: handleCloseDetails, eventType: selectedEventTypeForDetails, onEventTypeSelect: onEventTypeSelect })] }));
|
|
9541
10808
|
}
|
|
9542
10809
|
|
|
@@ -9638,7 +10905,19 @@ const getPriceDisplayInfo = (price, yearPrices) => {
|
|
|
9638
10905
|
// Allocation Badge Component
|
|
9639
10906
|
const AllocationBadge = ({ availableSpots, maxParticipants, }) => {
|
|
9640
10907
|
const badgeInfo = getAllocationBadgeInfo(availableSpots, maxParticipants);
|
|
9641
|
-
return (jsx("div", {
|
|
10908
|
+
return (jsx("div", { style: {
|
|
10909
|
+
display: "flex",
|
|
10910
|
+
marginRight: "auto",
|
|
10911
|
+
marginTop: "-24px",
|
|
10912
|
+
marginBottom: "4px",
|
|
10913
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
10914
|
+
fontFamily: "var(--bw-font-family)",
|
|
10915
|
+
zIndex: 50,
|
|
10916
|
+
whiteSpace: "nowrap",
|
|
10917
|
+
width: "fit-content",
|
|
10918
|
+
fontSize: "11px",
|
|
10919
|
+
fontWeight: 700,
|
|
10920
|
+
padding: "2px 8px",
|
|
9642
10921
|
backgroundColor: badgeInfo?.backgroundColor || "transparent",
|
|
9643
10922
|
color: badgeInfo?.textColor || "transparent",
|
|
9644
10923
|
}, children: badgeInfo?.text || " - " }));
|
|
@@ -9646,7 +10925,19 @@ const AllocationBadge = ({ availableSpots, maxParticipants, }) => {
|
|
|
9646
10925
|
// Price Badge Component (for special prices)
|
|
9647
10926
|
const SpecialPriceBadge = ({ price, yearPrices }) => {
|
|
9648
10927
|
const badgeInfo = getPriceBadgeInfo(price, yearPrices);
|
|
9649
|
-
return (jsx("div", {
|
|
10928
|
+
return (jsx("div", { style: {
|
|
10929
|
+
display: "flex",
|
|
10930
|
+
marginLeft: "auto",
|
|
10931
|
+
marginTop: "-20px",
|
|
10932
|
+
marginBottom: "4px",
|
|
10933
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
10934
|
+
fontFamily: "var(--bw-font-family)",
|
|
10935
|
+
zIndex: 50,
|
|
10936
|
+
whiteSpace: "nowrap",
|
|
10937
|
+
width: "fit-content",
|
|
10938
|
+
fontSize: "11px",
|
|
10939
|
+
fontWeight: 700,
|
|
10940
|
+
padding: "2px 8px",
|
|
9650
10941
|
backgroundColor: badgeInfo?.backgroundColor || "transparent",
|
|
9651
10942
|
color: badgeInfo?.textColor || "transparent",
|
|
9652
10943
|
}, children: badgeInfo?.text || " - " }));
|
|
@@ -9654,7 +10945,14 @@ const SpecialPriceBadge = ({ price, yearPrices }) => {
|
|
|
9654
10945
|
// Price Display Component (with special price styling)
|
|
9655
10946
|
const PriceDisplay = ({ price, yearPrices }) => {
|
|
9656
10947
|
const displayInfo = getPriceDisplayInfo(price, yearPrices);
|
|
9657
|
-
return (jsx("span", {
|
|
10948
|
+
return (jsx("span", { style: {
|
|
10949
|
+
display: "inline-flex",
|
|
10950
|
+
alignItems: "center",
|
|
10951
|
+
fontSize: "16px",
|
|
10952
|
+
fontWeight: 600,
|
|
10953
|
+
padding: "2px 8px",
|
|
10954
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
10955
|
+
fontFamily: "var(--bw-font-family)",
|
|
9658
10956
|
backgroundColor: displayInfo ? displayInfo.backgroundColor : "var(--bw-background-color)",
|
|
9659
10957
|
color: displayInfo ? displayInfo.textColor : "var(--bw-text-color)",
|
|
9660
10958
|
border: displayInfo ? "none" : "1px solid var(--bw-border-color)",
|
|
@@ -9721,17 +11019,117 @@ function EventInstanceSelection({ eventInstances, selectedEventType, onEventInst
|
|
|
9721
11019
|
onClose();
|
|
9722
11020
|
onBackToEventTypes();
|
|
9723
11021
|
};
|
|
11022
|
+
const footerNav = (jsx("button", { type: "button", onClick: handleClose, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), children: "\u2190 Zur\u00FCck" }));
|
|
9724
11023
|
// Show loading state first if we're loading event instances
|
|
9725
11024
|
if (isLoadingEventInstances) {
|
|
9726
|
-
return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name} Terminauswahl`,
|
|
11025
|
+
return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name} Terminauswahl`, footer: footerNav, children: jsx("div", { style: { padding: "24px" }, children: jsx("div", { style: { display: "flex", flexDirection: "column", gap: "20px" }, children: Array.from({ length: 3 }).map((_, idx) => (jsxs("div", { className: "skeleton-shimmer", style: {
|
|
11026
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
11027
|
+
border: "1px solid var(--bw-border-color)",
|
|
11028
|
+
borderRadius: "var(--bw-border-radius)",
|
|
11029
|
+
overflow: "hidden",
|
|
11030
|
+
}, children: [jsxs("div", { style: {
|
|
11031
|
+
display: "flex",
|
|
11032
|
+
justifyContent: "space-between",
|
|
11033
|
+
alignItems: "center",
|
|
11034
|
+
padding: "16px 20px",
|
|
11035
|
+
cursor: "pointer",
|
|
11036
|
+
borderBottom: "1px solid var(--bw-border-color)",
|
|
11037
|
+
}, children: [jsxs("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [jsx("div", { style: {
|
|
11038
|
+
width: "80px",
|
|
11039
|
+
height: "20px",
|
|
11040
|
+
backgroundColor: "var(--bw-border-color)",
|
|
11041
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
11042
|
+
} }), jsx("div", { style: {
|
|
11043
|
+
width: "16px",
|
|
11044
|
+
height: "16px",
|
|
11045
|
+
backgroundColor: "var(--bw-border-color)",
|
|
11046
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
11047
|
+
} })] }), jsx("div", { style: {
|
|
11048
|
+
width: "70px",
|
|
11049
|
+
height: "16px",
|
|
11050
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
11051
|
+
opacity: 0.3,
|
|
11052
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
11053
|
+
} })] }), jsx("div", { style: {
|
|
11054
|
+
display: "flex",
|
|
11055
|
+
flexDirection: "column",
|
|
11056
|
+
gap: "12px",
|
|
11057
|
+
paddingTop: "12px",
|
|
11058
|
+
padding: "12px 20px 20px 20px",
|
|
11059
|
+
}, children: Array.from({ length: 2 }).map((_, eventIdx) => (jsxs("div", { style: {
|
|
11060
|
+
position: "relative",
|
|
11061
|
+
border: "1px solid var(--bw-border-color)",
|
|
11062
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
11063
|
+
borderRadius: "var(--bw-border-radius)",
|
|
11064
|
+
padding: "16px 20px",
|
|
11065
|
+
fontFamily: "var(--bw-font-family)",
|
|
11066
|
+
}, children: [jsxs("div", { style: {
|
|
11067
|
+
display: "flex",
|
|
11068
|
+
justifyContent: "space-between",
|
|
11069
|
+
width: "100%",
|
|
11070
|
+
alignItems: "flex-start",
|
|
11071
|
+
gap: "12px",
|
|
11072
|
+
marginBottom: "4px",
|
|
11073
|
+
}, children: [jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsx("div", { style: {
|
|
11074
|
+
width: "40px",
|
|
11075
|
+
height: "40px",
|
|
11076
|
+
backgroundColor: "var(--bw-background-color)",
|
|
11077
|
+
border: "1px solid var(--bw-border-color)",
|
|
11078
|
+
borderTopWidth: "4px",
|
|
11079
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
11080
|
+
} }), jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: [jsx("div", { style: {
|
|
11081
|
+
width: "80px",
|
|
11082
|
+
height: "16px",
|
|
11083
|
+
backgroundColor: "var(--bw-border-color)",
|
|
11084
|
+
borderRadius: "var(--bw-border-radius)",
|
|
11085
|
+
} }), jsx("div", { style: {
|
|
11086
|
+
width: "60px",
|
|
11087
|
+
height: "14px",
|
|
11088
|
+
backgroundColor: "var(--bw-border-color)",
|
|
11089
|
+
borderRadius: "var(--bw-border-radius)",
|
|
11090
|
+
} })] })] }), jsx("div", { style: { display: "flex", flexDirection: "column", alignItems: "flex-end" }, children: jsx("div", { style: {
|
|
11091
|
+
width: "70px",
|
|
11092
|
+
height: "20px",
|
|
11093
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
11094
|
+
opacity: 0.3,
|
|
11095
|
+
borderRadius: "var(--bw-border-radius)",
|
|
11096
|
+
} }) })] }), jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px", marginBottom: "4px" }, children: [jsx("div", { style: {
|
|
11097
|
+
width: "120px",
|
|
11098
|
+
height: "16px",
|
|
11099
|
+
backgroundColor: "var(--bw-border-color)",
|
|
11100
|
+
borderRadius: "var(--bw-border-radius)",
|
|
11101
|
+
} }), jsx("div", { style: {
|
|
11102
|
+
width: "50px",
|
|
11103
|
+
height: "20px",
|
|
11104
|
+
backgroundColor: "var(--bw-border-color)",
|
|
11105
|
+
borderRadius: "16px",
|
|
11106
|
+
} })] })] }, eventIdx))) })] }, idx))) }) }) }));
|
|
9727
11107
|
}
|
|
9728
11108
|
// Show empty state only if not loading and no event instances
|
|
9729
11109
|
if (eventInstances.length === 0) {
|
|
9730
|
-
return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: "Keine verf\u00FCgbaren Termine",
|
|
11110
|
+
return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: "Keine verf\u00FCgbaren Termine", footer: footerNav, children: jsx("div", { style: {
|
|
11111
|
+
display: "flex",
|
|
11112
|
+
alignItems: "center",
|
|
11113
|
+
justifyContent: "center",
|
|
11114
|
+
minHeight: "400px",
|
|
11115
|
+
textAlign: "center",
|
|
11116
|
+
padding: "16px",
|
|
11117
|
+
}, children: jsxs("div", { children: [jsx("h3", { style: {
|
|
11118
|
+
marginBottom: "8px",
|
|
11119
|
+
fontWeight: 600,
|
|
11120
|
+
fontSize: "18px",
|
|
11121
|
+
color: "var(--bw-text-muted)",
|
|
11122
|
+
fontFamily: "var(--bw-font-family)",
|
|
11123
|
+
}, children: "Keine verf\u00FCgbaren Termine" }), jsx("p", { style: { color: "var(--bw-text-muted)", fontFamily: "var(--bw-font-family)" }, children: "F\u00FCr diesen Event-Typ sind derzeit keine Termine verf\u00FCgbar." })] }) }) }));
|
|
9731
11124
|
}
|
|
9732
|
-
return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, children: jsx("div", {
|
|
11125
|
+
return (jsx(Sidebar, { isOpen: isOpen, onClose: handleClose, title: `${selectedEventType?.name}`, footer: footerNav, children: jsx("div", { style: { padding: "20px 10px" }, children: jsx("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: monthYearGroups.map(({ key, label, events, minPrice, year }, idx) => {
|
|
9733
11126
|
const monthPriceDisplayInfo = getMonthPriceDisplayInfo(minPrice);
|
|
9734
|
-
return (jsxs(Fragment$1, { children: [idx > 0 && monthYearGroups[idx - 1].year !== year && (jsx("div", {
|
|
11127
|
+
return (jsxs(Fragment$1, { children: [idx > 0 && monthYearGroups[idx - 1].year !== year && (jsx("div", { style: { height: "1px", backgroundColor: "var(--bw-border-color)", margin: "4px 0" } })), jsx(Accordion, { title: label, priceInfo: jsx("div", { style: {
|
|
11128
|
+
fontSize: "16px",
|
|
11129
|
+
fontWeight: 500,
|
|
11130
|
+
marginLeft: "auto",
|
|
11131
|
+
padding: "4px 8px",
|
|
11132
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
9735
11133
|
backgroundColor: monthPriceDisplayInfo
|
|
9736
11134
|
? monthPriceDisplayInfo.backgroundColor
|
|
9737
11135
|
: "#14532d",
|
|
@@ -9741,21 +11139,97 @@ function EventInstanceSelection({ eventInstances, selectedEventType, onEventInst
|
|
|
9741
11139
|
boxShadow: monthPriceDisplayInfo
|
|
9742
11140
|
? "0 2px 4px rgba(0, 0, 0, 0.2)"
|
|
9743
11141
|
: undefined,
|
|
9744
|
-
}, children: `ab ${formatCurrency(minPrice)}` }), isOpen: openGroups.has(key), onToggle: () => toggleGroup(key), children: jsx("div", {
|
|
11142
|
+
}, children: `ab ${formatCurrency(minPrice)}` }), isOpen: openGroups.has(key), onToggle: () => toggleGroup(key), children: jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", paddingTop: "12px" }, children: events.map((event) => {
|
|
9745
11143
|
const availableSpots = event.maxParticipants - event.participantCount;
|
|
9746
11144
|
const isFullyBooked = availableSpots === 0;
|
|
9747
11145
|
const startDate = new Date(event.startTime);
|
|
9748
11146
|
const isPastEvent = today.toISOString() >= startDate.toISOString();
|
|
9749
11147
|
const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
|
|
9750
|
-
return (jsxs("div", {
|
|
9751
|
-
|
|
9752
|
-
: "
|
|
11148
|
+
return (jsxs("div", { style: {
|
|
11149
|
+
position: "relative",
|
|
11150
|
+
border: "1px solid var(--bw-border-color)",
|
|
11151
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
11152
|
+
borderRadius: "var(--bw-border-radius)",
|
|
11153
|
+
padding: "16px 10px",
|
|
11154
|
+
transition: "all 0.2s ease",
|
|
11155
|
+
fontFamily: "var(--bw-font-family)",
|
|
11156
|
+
opacity: isDisabled ? 0.3 : 1,
|
|
11157
|
+
filter: isDisabled ? "grayscale(40%)" : "none",
|
|
11158
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
|
11159
|
+
}, onClick: () => {
|
|
9753
11160
|
if (!isDisabled) {
|
|
9754
11161
|
handleEventInstanceSelect(event);
|
|
9755
11162
|
}
|
|
9756
|
-
}, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (jsx("div", {
|
|
9757
|
-
|
|
9758
|
-
|
|
11163
|
+
}, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (jsx("div", { style: {
|
|
11164
|
+
position: "absolute",
|
|
11165
|
+
inset: 0,
|
|
11166
|
+
backgroundColor: "rgba(15, 23, 42, 0.8)",
|
|
11167
|
+
borderRadius: "var(--bw-border-radius)",
|
|
11168
|
+
display: "flex",
|
|
11169
|
+
alignItems: "center",
|
|
11170
|
+
justifyContent: "center",
|
|
11171
|
+
}, children: jsx("div", { style: {
|
|
11172
|
+
width: "32px",
|
|
11173
|
+
height: "32px",
|
|
11174
|
+
color: "var(--bw-highlight-color)",
|
|
11175
|
+
opacity: 0.8,
|
|
11176
|
+
fontSize: "32px",
|
|
11177
|
+
}, children: spinner() }) })), jsx(SpecialPriceBadge, { price: event.price, yearPrices: yearPrices }), jsx(AllocationBadge, { availableSpots: availableSpots, maxParticipants: event.maxParticipants }), jsxs("div", { style: {
|
|
11178
|
+
display: "flex",
|
|
11179
|
+
justifyContent: "space-between",
|
|
11180
|
+
width: "100%",
|
|
11181
|
+
alignItems: "flex-start",
|
|
11182
|
+
gap: "12px",
|
|
11183
|
+
marginBottom: "4px",
|
|
11184
|
+
}, children: [jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsx("div", { style: {
|
|
11185
|
+
fontSize: "16px",
|
|
11186
|
+
transition: "all 0.2s ease",
|
|
11187
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
11188
|
+
borderTop: "4px solid var(--bw-border-color)",
|
|
11189
|
+
border: "1px solid var(--bw-border-color)",
|
|
11190
|
+
width: "40px",
|
|
11191
|
+
height: "40px",
|
|
11192
|
+
display: "flex",
|
|
11193
|
+
alignItems: "center",
|
|
11194
|
+
justifyContent: "center",
|
|
11195
|
+
fontWeight: 700,
|
|
11196
|
+
color: "var(--bw-text-color)",
|
|
11197
|
+
backgroundColor: "var(--bw-background-color)",
|
|
11198
|
+
}, children: startDate.getDate() }), jsxs("div", { style: {
|
|
11199
|
+
fontSize: "16px",
|
|
11200
|
+
color: "var(--bw-text-color)",
|
|
11201
|
+
display: "flex",
|
|
11202
|
+
flexDirection: "column",
|
|
11203
|
+
alignItems: "flex-start",
|
|
11204
|
+
justifyContent: "flex-start",
|
|
11205
|
+
lineHeight: 1.25,
|
|
11206
|
+
}, children: [jsxs("div", { children: [jsx("span", { style: { fontWeight: 600, marginBottom: "2px" }, children: formatWeekday(event.startTime) }), formatWeekday(event.startTime) !==
|
|
11207
|
+
formatWeekday(event.endTime) && (jsxs(Fragment, { children: [jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), jsx("span", { style: { fontWeight: 600, marginBottom: "2px" }, children: formatWeekday(event.endTime) })] }))] }), jsx("div", { children: formatWeekday(event.startTime) ===
|
|
11208
|
+
formatWeekday(event.endTime) ? (jsxs(Fragment, { children: [jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.startTime) }), jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.endTime) })] })) : (jsxs("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: [formatTime(event.startTime), " Uhr"] })) })] }), jsxs("span", { style: {
|
|
11209
|
+
fontSize: "12px",
|
|
11210
|
+
fontWeight: 400,
|
|
11211
|
+
color: "var(--bw-text-muted)",
|
|
11212
|
+
marginLeft: "6px",
|
|
11213
|
+
backgroundColor: "rgba(0, 0, 0, 0.05)",
|
|
11214
|
+
whiteSpace: "nowrap",
|
|
11215
|
+
padding: "2px 6px",
|
|
11216
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
11217
|
+
}, children: [event.durationDays, " Tag", event.durationDays > 1 ? "e" : ""] })] }), jsx("div", { style: {
|
|
11218
|
+
textAlign: "right",
|
|
11219
|
+
display: "flex",
|
|
11220
|
+
flexDirection: "column",
|
|
11221
|
+
alignItems: "flex-end",
|
|
11222
|
+
}, children: jsx(PriceDisplay, { price: event.price, yearPrices: yearPrices }) })] }), event.name !== selectedEventType?.name && (jsx("h4", { style: {
|
|
11223
|
+
fontSize: "16px",
|
|
11224
|
+
fontWeight: 600,
|
|
11225
|
+
color: "var(--bw-text-color)",
|
|
11226
|
+
lineHeight: 1.25,
|
|
11227
|
+
margin: "0 0 2px 0",
|
|
11228
|
+
display: "flex",
|
|
11229
|
+
alignItems: "center",
|
|
11230
|
+
gap: "8px",
|
|
11231
|
+
maxWidth: "230px",
|
|
11232
|
+
}, children: event.name }))] }, event.id));
|
|
9759
11233
|
}) }) })] }, key));
|
|
9760
11234
|
}) }) }) }));
|
|
9761
11235
|
}
|
|
@@ -9771,9 +11245,76 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
|
|
|
9771
11245
|
return jsx(NextEventsSkeleton, { count: 3 });
|
|
9772
11246
|
}
|
|
9773
11247
|
if (events.length === 0) {
|
|
9774
|
-
return (jsx("div", {
|
|
9775
|
-
|
|
9776
|
-
|
|
11248
|
+
return (jsx("div", { style: { maxWidth: "500px", margin: "0 auto", padding: "16px" }, children: jsxs("div", { style: {
|
|
11249
|
+
display: "flex",
|
|
11250
|
+
flexDirection: "column",
|
|
11251
|
+
alignItems: "center",
|
|
11252
|
+
justifyContent: "center",
|
|
11253
|
+
textAlign: "center",
|
|
11254
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
11255
|
+
border: "1px solid var(--bw-border-color)",
|
|
11256
|
+
borderRadius: "var(--bw-border-radius)",
|
|
11257
|
+
padding: "24px",
|
|
11258
|
+
fontFamily: "var(--bw-font-family)",
|
|
11259
|
+
minHeight: "300px",
|
|
11260
|
+
}, children: [jsx("div", { style: {
|
|
11261
|
+
display: "flex",
|
|
11262
|
+
alignItems: "center",
|
|
11263
|
+
justifyContent: "center",
|
|
11264
|
+
borderRadius: "50%",
|
|
11265
|
+
width: "64px",
|
|
11266
|
+
height: "64px",
|
|
11267
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
11268
|
+
marginBottom: "16px",
|
|
11269
|
+
fontSize: "32px",
|
|
11270
|
+
color: "#ffffff",
|
|
11271
|
+
opacity: 0.8,
|
|
11272
|
+
}, children: "\uD83D\uDCC5" }), jsx("h3", { style: {
|
|
11273
|
+
fontWeight: 600,
|
|
11274
|
+
margin: "0 0 8px 0",
|
|
11275
|
+
fontSize: "20px",
|
|
11276
|
+
color: "var(--bw-text-color)",
|
|
11277
|
+
fontFamily: "var(--bw-font-family)",
|
|
11278
|
+
}, children: "Keine bevorstehenden Termine" }), jsx("p", { style: {
|
|
11279
|
+
margin: "0 0 24px 0",
|
|
11280
|
+
color: "var(--bw-text-muted)",
|
|
11281
|
+
fontSize: "16px",
|
|
11282
|
+
lineHeight: 1.6,
|
|
11283
|
+
fontFamily: "var(--bw-font-family)",
|
|
11284
|
+
maxWidth: "400px",
|
|
11285
|
+
}, children: "Aktuell sind keine Termine verf\u00FCgbar. Bitte schaue sp\u00E4ter noch einmal vorbei oder kontaktiere uns direkt." }), jsxs("button", { onClick: () => window.location.reload(), style: {
|
|
11286
|
+
display: "flex",
|
|
11287
|
+
alignItems: "center",
|
|
11288
|
+
cursor: "pointer",
|
|
11289
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
11290
|
+
color: "var(--bw-highlight-color)",
|
|
11291
|
+
padding: "12px 24px",
|
|
11292
|
+
border: "1px solid var(--bw-highlight-color)",
|
|
11293
|
+
borderRadius: "var(--bw-border-radius)",
|
|
11294
|
+
fontSize: "16px",
|
|
11295
|
+
fontWeight: 600,
|
|
11296
|
+
fontFamily: "var(--bw-font-family)",
|
|
11297
|
+
transition: "all 0.2s ease",
|
|
11298
|
+
gap: "8px",
|
|
11299
|
+
}, children: [jsx("span", { style: { fontSize: "16px" }, children: "\uD83D\uDD04" }), "Seite neu laden"] })] }) }));
|
|
11300
|
+
}
|
|
11301
|
+
return (jsxs("div", { style: {
|
|
11302
|
+
maxWidth: "500px",
|
|
11303
|
+
margin: "0 auto",
|
|
11304
|
+
padding: "16px",
|
|
11305
|
+
fontFamily: "var(--bw-font-family)",
|
|
11306
|
+
}, children: [jsxs("div", { style: { textAlign: "center", marginBottom: "24px" }, children: [jsx("h2", { style: {
|
|
11307
|
+
fontWeight: 600,
|
|
11308
|
+
margin: "0 0 8px 0",
|
|
11309
|
+
fontSize: "18px",
|
|
11310
|
+
color: "var(--bw-text-color)",
|
|
11311
|
+
fontFamily: "var(--bw-font-family)",
|
|
11312
|
+
}, children: "N\u00E4chste verf\u00FCgbare Termine" }), jsx("p", { style: {
|
|
11313
|
+
margin: 0,
|
|
11314
|
+
fontSize: "16px",
|
|
11315
|
+
color: "var(--bw-text-muted)",
|
|
11316
|
+
fontFamily: "var(--bw-font-family)",
|
|
11317
|
+
}, children: "W\u00E4hle einen Termin aus oder zeige alle verf\u00FCgbaren Termine an" })] }), jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", marginBottom: "24px" }, children: events.map((event) => {
|
|
9777
11318
|
const availableSpots = event.maxParticipants - event.participantCount;
|
|
9778
11319
|
const isFullyBooked = availableSpots === 0;
|
|
9779
11320
|
const startDate = new Date(event.startTime);
|
|
@@ -9795,26 +11336,123 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
|
|
|
9795
11336
|
return "var(--bw-highlight-color)";
|
|
9796
11337
|
};
|
|
9797
11338
|
const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
|
|
9798
|
-
return (jsxs("div", {
|
|
9799
|
-
|
|
9800
|
-
: "
|
|
11339
|
+
return (jsxs("div", { style: {
|
|
11340
|
+
position: "relative",
|
|
11341
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
11342
|
+
borderRadius: "var(--bw-border-radius)",
|
|
11343
|
+
padding: "8px 10px",
|
|
11344
|
+
transition: "all 0.2s ease",
|
|
11345
|
+
border: `1px solid ${getAvailabilityColor()}`,
|
|
11346
|
+
fontFamily: "var(--bw-font-family)",
|
|
11347
|
+
opacity: isDisabled ? 0.3 : 1,
|
|
11348
|
+
filter: isDisabled ? "grayscale(100%)" : "none",
|
|
11349
|
+
cursor: isDisabled ? "not-allowed" : "pointer",
|
|
11350
|
+
}, onClick: () => {
|
|
9801
11351
|
if (!isDisabled) {
|
|
9802
11352
|
handleEventSelect(event.id);
|
|
9803
11353
|
}
|
|
9804
|
-
}, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (jsx("div", {
|
|
9805
|
-
|
|
11354
|
+
}, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (jsx("div", { style: {
|
|
11355
|
+
position: "absolute",
|
|
11356
|
+
inset: 0,
|
|
11357
|
+
display: "flex",
|
|
11358
|
+
alignItems: "center",
|
|
11359
|
+
justifyContent: "center",
|
|
11360
|
+
backgroundColor: "rgba(15, 23, 42, 0.8)",
|
|
11361
|
+
borderRadius: "var(--bw-border-radius)",
|
|
11362
|
+
}, children: jsx("div", { style: {
|
|
11363
|
+
width: "32px",
|
|
11364
|
+
height: "32px",
|
|
11365
|
+
color: "var(--bw-highlight-color)",
|
|
11366
|
+
fontSize: "32px",
|
|
11367
|
+
animation: "spin 1s linear infinite",
|
|
11368
|
+
}, children: "\u27F3" }) })), jsxs("div", { style: {
|
|
11369
|
+
display: "flex",
|
|
11370
|
+
justifyContent: "space-between",
|
|
11371
|
+
width: "100%",
|
|
11372
|
+
alignItems: "flex-start",
|
|
11373
|
+
gap: "12px",
|
|
11374
|
+
marginBottom: "4px",
|
|
11375
|
+
}, children: [jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsx("div", { style: {
|
|
11376
|
+
display: "flex",
|
|
11377
|
+
alignItems: "center",
|
|
11378
|
+
justifyContent: "center",
|
|
11379
|
+
fontWeight: 700,
|
|
11380
|
+
fontSize: "16px",
|
|
11381
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
11382
|
+
width: "40px",
|
|
11383
|
+
height: "40px",
|
|
11384
|
+
color: "var(--bw-text-color)",
|
|
11385
|
+
backgroundColor: "var(--bw-background-color)",
|
|
11386
|
+
border: "1px solid var(--bw-border-color)",
|
|
9806
11387
|
borderTopWidth: "4px",
|
|
9807
|
-
|
|
11388
|
+
borderTopColor: getAvailabilityColor(),
|
|
11389
|
+
transition: "all 0.2s ease",
|
|
11390
|
+
}, children: startDate.getDate() }), jsxs("div", { style: {
|
|
11391
|
+
display: "flex",
|
|
11392
|
+
flexDirection: "column",
|
|
11393
|
+
alignItems: "flex-start",
|
|
11394
|
+
justifyContent: "flex-start",
|
|
11395
|
+
fontSize: "16px",
|
|
11396
|
+
color: "var(--bw-text-color)",
|
|
11397
|
+
lineHeight: 1.25,
|
|
11398
|
+
}, children: [jsx("span", { style: { fontWeight: 600, marginBottom: "2px" }, children: formatWeekday(event.startTime) }), jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.startTime) })] })] }), jsxs("div", { style: {
|
|
11399
|
+
display: "flex",
|
|
11400
|
+
flexDirection: "column",
|
|
11401
|
+
alignItems: "flex-end",
|
|
11402
|
+
textAlign: "right",
|
|
11403
|
+
}, children: [jsx("div", { style: {
|
|
11404
|
+
fontWeight: 700,
|
|
11405
|
+
color: "var(--bw-highlight-color)",
|
|
11406
|
+
fontSize: "18px",
|
|
11407
|
+
}, children: event.price !== null ? formatCurrency(event.price) : "Preis auf Anfrage" }), event.deposit && event.deposit > 0 && (jsxs("div", { style: { fontSize: "12px", color: "var(--bw-text-muted)" }, children: ["ab ", formatCurrency(event.deposit)] }))] })] }), jsxs("h4", { style: {
|
|
11408
|
+
display: "flex",
|
|
11409
|
+
alignItems: "center",
|
|
11410
|
+
fontWeight: 600,
|
|
11411
|
+
margin: "0 0 2px 0",
|
|
11412
|
+
fontSize: "16px",
|
|
11413
|
+
color: "var(--bw-text-color)",
|
|
11414
|
+
lineHeight: 1.25,
|
|
11415
|
+
gap: "8px",
|
|
11416
|
+
}, children: [event.name, jsxs("span", { style: {
|
|
11417
|
+
fontSize: "12px",
|
|
11418
|
+
fontWeight: 400,
|
|
11419
|
+
color: "var(--bw-text-muted)",
|
|
11420
|
+
marginLeft: "6px",
|
|
11421
|
+
backgroundColor: "rgba(0, 0, 0, 0.05)",
|
|
11422
|
+
borderRadius: "16px",
|
|
11423
|
+
padding: "2px 8px",
|
|
11424
|
+
}, children: [event.durationDays, " Tag", event.durationDays > 1 ? "e" : ""] })] }), event.notes && (jsx("p", { style: {
|
|
11425
|
+
margin: "8px 0 0 0",
|
|
11426
|
+
fontSize: "12px",
|
|
11427
|
+
color: "var(--bw-text-muted)",
|
|
11428
|
+
overflow: "hidden",
|
|
11429
|
+
lineHeight: 1.375,
|
|
9808
11430
|
display: "-webkit-box",
|
|
9809
11431
|
WebkitBoxOrient: "vertical",
|
|
9810
11432
|
WebkitLineClamp: 2,
|
|
9811
11433
|
}, children: event.notes }))] }, event.id));
|
|
9812
|
-
}) }), showAllButton && (jsx("div", {
|
|
9813
|
-
|
|
9814
|
-
: "
|
|
11434
|
+
}) }), showAllButton && (jsx("div", { style: { textAlign: "center" }, children: jsx("button", { type: "button", disabled: isLoadingShowAll, style: {
|
|
11435
|
+
position: "relative",
|
|
11436
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
11437
|
+
color: "var(--bw-highlight-color)",
|
|
11438
|
+
border: "1px solid var(--bw-highlight-color)",
|
|
11439
|
+
padding: "12px 24px",
|
|
11440
|
+
borderRadius: "var(--bw-border-radius)",
|
|
11441
|
+
fontSize: "16px",
|
|
11442
|
+
fontWeight: 500,
|
|
11443
|
+
fontFamily: "var(--bw-font-family)",
|
|
11444
|
+
transition: "all 0.2s ease",
|
|
11445
|
+
cursor: isLoadingShowAll ? "not-allowed" : "pointer",
|
|
11446
|
+
opacity: isLoadingShowAll ? 0.7 : 1,
|
|
11447
|
+
}, onClick: onShowAll, children: isLoadingShowAll ? (jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [jsx("div", { style: {
|
|
11448
|
+
width: "16px",
|
|
11449
|
+
height: "16px",
|
|
11450
|
+
color: "var(--bw-highlight-color)",
|
|
11451
|
+
fontSize: "16px",
|
|
11452
|
+
animation: "spin 1s linear infinite",
|
|
11453
|
+
}, children: "\u27F3" }), "L\u00E4dt..."] })) : (showAllButtonText) }) }))] }));
|
|
9815
11454
|
}
|
|
9816
11455
|
|
|
9817
|
-
// Theme configurations
|
|
9818
11456
|
const getThemeConfig = (theme = "generic") => {
|
|
9819
11457
|
switch (theme) {
|
|
9820
11458
|
case "christmas":
|
|
@@ -9875,23 +11513,19 @@ function PromoDialog({ config, onClose, onCtaClick }) {
|
|
|
9875
11513
|
const [copied, setCopied] = useState(false);
|
|
9876
11514
|
const [isVisible, setIsVisible] = useState(false);
|
|
9877
11515
|
const [portalContainer, setPortalContainer] = useState(null);
|
|
9878
|
-
// Get theme config
|
|
9879
11516
|
const themeConfig = getThemeConfig(config.theme);
|
|
9880
|
-
// Use config values with fallbacks
|
|
9881
11517
|
const discountCode = config.discountCode || "DISCOUNT";
|
|
9882
|
-
// Create portal container on mount to escape stacking context issues
|
|
9883
11518
|
useEffect(() => {
|
|
9884
11519
|
const container = document.createElement("div");
|
|
9885
11520
|
container.id = "bigz-promo-dialog-portal";
|
|
9886
11521
|
container.style.position = "relative";
|
|
9887
|
-
container.style.zIndex = "2147483647";
|
|
11522
|
+
container.style.zIndex = "2147483647";
|
|
9888
11523
|
document.body.appendChild(container);
|
|
9889
11524
|
setPortalContainer(container);
|
|
9890
11525
|
return () => {
|
|
9891
11526
|
document.body.removeChild(container);
|
|
9892
11527
|
};
|
|
9893
11528
|
}, []);
|
|
9894
|
-
// Animate in on mount
|
|
9895
11529
|
useEffect(() => {
|
|
9896
11530
|
const timer = setTimeout(() => setIsVisible(true), 50);
|
|
9897
11531
|
return () => clearTimeout(timer);
|
|
@@ -9903,7 +11537,6 @@ function PromoDialog({ config, onClose, onCtaClick }) {
|
|
|
9903
11537
|
setTimeout(() => setCopied(false), 2000);
|
|
9904
11538
|
}
|
|
9905
11539
|
catch {
|
|
9906
|
-
// Fallback for older browsers
|
|
9907
11540
|
const textArea = document.createElement("textarea");
|
|
9908
11541
|
textArea.value = discountCode;
|
|
9909
11542
|
document.body.appendChild(textArea);
|
|
@@ -9922,33 +11555,74 @@ function PromoDialog({ config, onClose, onCtaClick }) {
|
|
|
9922
11555
|
setIsVisible(false);
|
|
9923
11556
|
setTimeout(onCtaClick, 200);
|
|
9924
11557
|
};
|
|
9925
|
-
// Don't render until portal container is ready
|
|
9926
11558
|
if (!portalContainer) {
|
|
9927
11559
|
return null;
|
|
9928
11560
|
}
|
|
9929
|
-
const dialogContent = (jsxs(Fragment, { children: [jsx("div", { onClick: handleClose,
|
|
11561
|
+
const dialogContent = (jsxs(Fragment, { children: [jsx("div", { onClick: handleClose, style: {
|
|
11562
|
+
position: "fixed",
|
|
11563
|
+
inset: 0,
|
|
11564
|
+
zIndex: 60,
|
|
11565
|
+
backgroundColor: "rgba(0, 20, 40, 0.85)",
|
|
11566
|
+
backdropFilter: "blur(4px)",
|
|
11567
|
+
transition: "opacity 0.3s ease-out",
|
|
11568
|
+
opacity: isVisible ? 1 : 0,
|
|
11569
|
+
} }), jsx("div", { style: {
|
|
11570
|
+
position: "fixed",
|
|
11571
|
+
zIndex: 61,
|
|
11572
|
+
width: "92%",
|
|
11573
|
+
maxWidth: "440px",
|
|
11574
|
+
transition: "all 0.3s",
|
|
9930
11575
|
top: "50%",
|
|
9931
11576
|
left: "50%",
|
|
9932
11577
|
transform: `translate(-50%, -50%) scale(${isVisible ? 1 : 0.9})`,
|
|
9933
11578
|
opacity: isVisible ? 1 : 0,
|
|
9934
11579
|
transitionTimingFunction: "cubic-bezier(0.34, 1.56, 0.64, 1)",
|
|
9935
|
-
}, children: jsxs("div", {
|
|
11580
|
+
}, children: jsxs("div", { style: {
|
|
11581
|
+
position: "relative",
|
|
11582
|
+
overflow: "hidden",
|
|
11583
|
+
borderRadius: "28px",
|
|
11584
|
+
boxShadow: "0 25px 60px -12px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.1), inset 0 1px 0 rgba(255,255,255,0.2)",
|
|
9936
11585
|
background: `linear-gradient(165deg, ${themeConfig.primaryColor} 0%, ${themeConfig.primaryColor} 40%, ${themeConfig.secondaryColor} 100%)`,
|
|
9937
11586
|
}, children: [themeConfig.animation?.snowfallEnabled &&
|
|
9938
|
-
Array.from({ length: 15 }).map((_, i) => (jsx("div", {
|
|
11587
|
+
Array.from({ length: 15 }).map((_, i) => (jsx("div", { style: {
|
|
11588
|
+
position: "absolute",
|
|
11589
|
+
pointerEvents: "none",
|
|
11590
|
+
zIndex: 1,
|
|
11591
|
+
color: "white",
|
|
11592
|
+
opacity: 0,
|
|
9939
11593
|
left: `${5 + Math.random() * 90}%`,
|
|
9940
11594
|
top: "-10px",
|
|
9941
11595
|
fontSize: `${10 + Math.random() * 14}px`,
|
|
9942
11596
|
animation: `promo-snow ${4 + Math.random() * 3}s linear infinite`,
|
|
9943
11597
|
animationDelay: `${Math.random() * 4}s`,
|
|
9944
|
-
}, children: "\u2744" }, i))), jsxs("div", {
|
|
11598
|
+
}, children: "\u2744" }, i))), jsxs("div", { style: {
|
|
11599
|
+
position: "relative",
|
|
11600
|
+
display: "flex",
|
|
11601
|
+
alignItems: "center",
|
|
11602
|
+
justifyContent: "center",
|
|
11603
|
+
overflow: "hidden",
|
|
11604
|
+
height: "180px",
|
|
9945
11605
|
background: `linear-gradient(180deg, rgba(0,0,0,0) 0%, ${themeConfig.primaryColor}cc 100%)`,
|
|
9946
|
-
}, children: [themeConfig.backgroundImage && (jsx("img", { src: themeConfig.backgroundImage, alt: "Background",
|
|
11606
|
+
}, children: [themeConfig.backgroundImage && (jsx("img", { src: themeConfig.backgroundImage, alt: "Background", style: {
|
|
11607
|
+
position: "absolute",
|
|
11608
|
+
inset: 0,
|
|
11609
|
+
width: "100%",
|
|
11610
|
+
height: "100%",
|
|
11611
|
+
objectFit: "cover",
|
|
11612
|
+
opacity: 0.6,
|
|
11613
|
+
} })), jsx("div", { style: {
|
|
11614
|
+
position: "absolute",
|
|
11615
|
+
inset: 0,
|
|
9947
11616
|
background: `linear-gradient(180deg, ${themeConfig.primaryColor}4d 0%, ${themeConfig.primaryColor}e6 100%)`,
|
|
9948
|
-
} }), jsx("div", {
|
|
11617
|
+
} }), jsx("div", { style: {
|
|
11618
|
+
position: "relative",
|
|
11619
|
+
zIndex: 2,
|
|
11620
|
+
fontSize: "64px",
|
|
11621
|
+
filter: "drop-shadow(0 8px 16px rgba(0,0,0,0.4))",
|
|
9949
11622
|
animation: `promo-float ${themeConfig.animation?.floatDuration || 3}s ease-in-out infinite`,
|
|
9950
11623
|
}, children: themeConfig.icon }), themeConfig.decorations &&
|
|
9951
|
-
themeConfig.decorations.map((decoration, i) => (jsx("div", {
|
|
11624
|
+
themeConfig.decorations.map((decoration, i) => (jsx("div", { style: {
|
|
11625
|
+
position: "absolute",
|
|
9952
11626
|
top: i === 0 ? "16px" : "20px",
|
|
9953
11627
|
left: i === 0 ? "20px" : "auto",
|
|
9954
11628
|
right: i === 1 ? "20px" : "auto",
|
|
@@ -9956,23 +11630,325 @@ function PromoDialog({ config, onClose, onCtaClick }) {
|
|
|
9956
11630
|
animation: themeConfig.animation?.sparkleEnabled
|
|
9957
11631
|
? `promo-sparkle 2s ease-in-out infinite ${i * 0.5}s`
|
|
9958
11632
|
: undefined,
|
|
9959
|
-
}, children: decoration }, i)))] }), jsx("button", { onClick: handleClose,
|
|
11633
|
+
}, children: decoration }, i)))] }), jsx("button", { onClick: handleClose, style: {
|
|
11634
|
+
position: "absolute",
|
|
11635
|
+
top: "16px",
|
|
11636
|
+
right: "16px",
|
|
11637
|
+
display: "flex",
|
|
11638
|
+
alignItems: "center",
|
|
11639
|
+
justifyContent: "center",
|
|
11640
|
+
cursor: "pointer",
|
|
11641
|
+
zIndex: 10,
|
|
11642
|
+
width: "36px",
|
|
11643
|
+
height: "36px",
|
|
11644
|
+
borderRadius: "50%",
|
|
11645
|
+
border: "none",
|
|
11646
|
+
backgroundColor: "rgba(0, 0, 0, 0.3)",
|
|
11647
|
+
backdropFilter: "blur(4px)",
|
|
11648
|
+
color: "white",
|
|
11649
|
+
fontSize: "22px",
|
|
11650
|
+
lineHeight: 1,
|
|
11651
|
+
transition: "all 0.15s ease",
|
|
11652
|
+
}, children: "\u00D7" }), jsxs("div", { style: {
|
|
11653
|
+
position: "relative",
|
|
11654
|
+
textAlign: "center",
|
|
11655
|
+
zIndex: 2,
|
|
11656
|
+
padding: "28px 28px 32px 28px",
|
|
11657
|
+
}, children: [jsx("h2", { style: {
|
|
11658
|
+
fontWeight: 800,
|
|
11659
|
+
fontSize: "26px",
|
|
11660
|
+
color: "white",
|
|
11661
|
+
marginBottom: "6px",
|
|
11662
|
+
letterSpacing: "-0.025em",
|
|
11663
|
+
filter: "drop-shadow(0 2px 8px rgba(0,0,0,0.3))",
|
|
11664
|
+
margin: "0 0 6px 0",
|
|
11665
|
+
}, children: config.title }), jsxs("p", { style: {
|
|
11666
|
+
fontSize: "17px",
|
|
11667
|
+
color: "rgba(255, 255, 255, 0.9)",
|
|
11668
|
+
marginBottom: "20px",
|
|
11669
|
+
lineHeight: 1.5,
|
|
11670
|
+
margin: "0 0 20px 0",
|
|
11671
|
+
}, children: [config.subtitle, config.discountAmount && (jsxs(Fragment, { children: [jsx("br", {}), jsxs("strong", { style: { color: themeConfig.secondaryColor }, children: [config.discountAmount, " Rabatt"] }), " ", "auf alle Kurse!"] }))] }), config.discountCode && (jsxs("div", { style: {
|
|
11672
|
+
marginBottom: "20px",
|
|
11673
|
+
backgroundColor: "white",
|
|
11674
|
+
borderRadius: "16px",
|
|
11675
|
+
padding: "18px 20px",
|
|
11676
|
+
boxShadow: "0 8px 24px rgba(0,0,0,0.15), inset 0 -2px 0 rgba(0,0,0,0.05)",
|
|
11677
|
+
}, children: [jsx("p", { style: {
|
|
11678
|
+
textTransform: "uppercase",
|
|
11679
|
+
fontWeight: 600,
|
|
11680
|
+
fontSize: "11px",
|
|
11681
|
+
letterSpacing: "1.5px",
|
|
11682
|
+
color: "#64748b",
|
|
11683
|
+
marginBottom: "10px",
|
|
11684
|
+
margin: "0 0 10px 0",
|
|
11685
|
+
}, children: "Dein Geschenk-Code" }), jsxs("div", { style: {
|
|
11686
|
+
display: "flex",
|
|
11687
|
+
alignItems: "center",
|
|
11688
|
+
justifyContent: "center",
|
|
11689
|
+
gap: "12px",
|
|
11690
|
+
}, children: [jsx("div", { style: {
|
|
11691
|
+
padding: "10px 20px",
|
|
11692
|
+
borderRadius: "10px",
|
|
9960
11693
|
background: `linear-gradient(135deg, ${themeConfig.secondaryColor} 0%, ${themeConfig.primaryColor} 100%)`,
|
|
9961
11694
|
boxShadow: `0 4px 12px ${themeConfig.secondaryColor}4d`,
|
|
9962
|
-
}, children: jsx("span", {
|
|
9963
|
-
|
|
9964
|
-
|
|
11695
|
+
}, children: jsx("span", { style: {
|
|
11696
|
+
fontWeight: 900,
|
|
11697
|
+
fontSize: "28px",
|
|
11698
|
+
color: "white",
|
|
11699
|
+
letterSpacing: "6px",
|
|
11700
|
+
filter: "drop-shadow(0 2px 4px rgba(0,0,0,0.2))",
|
|
11701
|
+
}, children: discountCode }) }), jsx("button", { onClick: handleCopyCode, style: {
|
|
11702
|
+
display: "flex",
|
|
11703
|
+
alignItems: "center",
|
|
11704
|
+
cursor: "pointer",
|
|
11705
|
+
whiteSpace: "nowrap",
|
|
11706
|
+
padding: "12px 16px",
|
|
11707
|
+
borderRadius: "10px",
|
|
11708
|
+
border: "2px solid",
|
|
11709
|
+
borderColor: copied ? "#22c55e" : "#e2e8f0",
|
|
11710
|
+
backgroundColor: copied ? "#dcfce7" : "#f8fafc",
|
|
11711
|
+
color: copied ? "#15803d" : "#475569",
|
|
11712
|
+
fontSize: "13px",
|
|
11713
|
+
fontWeight: 600,
|
|
11714
|
+
transition: "all 0.15s ease",
|
|
11715
|
+
gap: "6px",
|
|
11716
|
+
}, children: copied ? (jsx(Fragment, { children: "\u2713 Kopiert!" })) : (jsxs(Fragment, { children: [jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: [jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }), jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })] }), "Kopieren"] })) })] })] })), config.activities && config.activities.length > 0 && (jsx("div", { style: {
|
|
11717
|
+
display: "flex",
|
|
11718
|
+
justifyContent: "center",
|
|
11719
|
+
gap: "8px",
|
|
11720
|
+
marginBottom: "20px",
|
|
11721
|
+
flexWrap: "wrap",
|
|
11722
|
+
}, children: config.activities.map((activity) => (jsx("span", { style: {
|
|
11723
|
+
fontWeight: 500,
|
|
11724
|
+
backgroundColor: "rgba(255, 255, 255, 0.15)",
|
|
11725
|
+
backdropFilter: "blur(4px)",
|
|
11726
|
+
padding: "6px 12px",
|
|
11727
|
+
borderRadius: "20px",
|
|
11728
|
+
fontSize: "13px",
|
|
11729
|
+
color: "white",
|
|
11730
|
+
}, children: activity }, activity))) })), jsxs("button", { onClick: handleCtaClick, style: {
|
|
11731
|
+
width: "100%",
|
|
11732
|
+
display: "flex",
|
|
11733
|
+
alignItems: "center",
|
|
11734
|
+
justifyContent: "center",
|
|
11735
|
+
cursor: "pointer",
|
|
11736
|
+
fontWeight: 700,
|
|
11737
|
+
padding: "18px 24px",
|
|
11738
|
+
borderRadius: "14px",
|
|
11739
|
+
border: "none",
|
|
11740
|
+
color: "white",
|
|
11741
|
+
fontSize: "18px",
|
|
11742
|
+
transition: "all 0.15s ease",
|
|
11743
|
+
gap: "10px",
|
|
9965
11744
|
background: `linear-gradient(135deg, ${themeConfig.secondaryColor} 0%, ${themeConfig.primaryColor} 100%)`,
|
|
9966
11745
|
boxShadow: `0 8px 24px ${themeConfig.secondaryColor}66, inset 0 1px 0 rgba(255,255,255,0.2)`,
|
|
9967
|
-
},
|
|
9968
|
-
|
|
9969
|
-
|
|
9970
|
-
|
|
9971
|
-
|
|
9972
|
-
|
|
11746
|
+
}, children: [config.ctaText, jsx("span", { children: "\u2192" })] }), config.validityText && (jsx("p", { style: {
|
|
11747
|
+
marginTop: "16px",
|
|
11748
|
+
fontSize: "12px",
|
|
11749
|
+
color: "rgba(255, 255, 255, 0.6)",
|
|
11750
|
+
margin: "16px 0 0 0",
|
|
11751
|
+
}, children: config.validityText }))] })] }) })] }));
|
|
9973
11752
|
return createPortal(dialogContent, portalContainer);
|
|
9974
11753
|
}
|
|
9975
11754
|
|
|
11755
|
+
// Upsell card styles
|
|
11756
|
+
const cardBaseStyles = {
|
|
11757
|
+
position: "relative",
|
|
11758
|
+
display: "flex",
|
|
11759
|
+
flexDirection: "column",
|
|
11760
|
+
padding: "16px",
|
|
11761
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
11762
|
+
border: "2px solid var(--bw-border-color)",
|
|
11763
|
+
borderRadius: "var(--bw-border-radius)",
|
|
11764
|
+
cursor: "pointer",
|
|
11765
|
+
transition: "all 0.2s ease",
|
|
11766
|
+
fontFamily: "var(--bw-font-family)",
|
|
11767
|
+
};
|
|
11768
|
+
const cardSelectedStyles = {
|
|
11769
|
+
...cardBaseStyles,
|
|
11770
|
+
borderColor: "var(--bw-highlight-color)",
|
|
11771
|
+
backgroundColor: "rgba(var(--bw-highlight-color-rgb, 0, 177, 170), 0.08)",
|
|
11772
|
+
};
|
|
11773
|
+
const cardDisabledStyles = {
|
|
11774
|
+
...cardBaseStyles,
|
|
11775
|
+
opacity: 0.6,
|
|
11776
|
+
cursor: "not-allowed",
|
|
11777
|
+
};
|
|
11778
|
+
const checkboxContainerStyles = {
|
|
11779
|
+
position: "absolute",
|
|
11780
|
+
top: "12px",
|
|
11781
|
+
right: "12px",
|
|
11782
|
+
zIndex: 1,
|
|
11783
|
+
};
|
|
11784
|
+
const checkboxInnerStyles = {
|
|
11785
|
+
width: "24px",
|
|
11786
|
+
height: "24px",
|
|
11787
|
+
border: "2px solid var(--bw-border-color)",
|
|
11788
|
+
borderRadius: "6px",
|
|
11789
|
+
display: "flex",
|
|
11790
|
+
alignItems: "center",
|
|
11791
|
+
justifyContent: "center",
|
|
11792
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
11793
|
+
transition: "all 0.2s ease",
|
|
11794
|
+
};
|
|
11795
|
+
const checkboxSelectedStyles = {
|
|
11796
|
+
...checkboxInnerStyles,
|
|
11797
|
+
borderColor: "var(--bw-highlight-color)",
|
|
11798
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
11799
|
+
};
|
|
11800
|
+
const imageContainerStyles = {
|
|
11801
|
+
width: "100%",
|
|
11802
|
+
height: "120px",
|
|
11803
|
+
marginBottom: "12px",
|
|
11804
|
+
borderRadius: "calc(var(--bw-border-radius) - 4px)",
|
|
11805
|
+
overflow: "hidden",
|
|
11806
|
+
backgroundColor: "var(--bw-background-color)",
|
|
11807
|
+
};
|
|
11808
|
+
const imageStyles = {
|
|
11809
|
+
width: "100%",
|
|
11810
|
+
height: "100%",
|
|
11811
|
+
objectFit: "cover",
|
|
11812
|
+
};
|
|
11813
|
+
const imagePlaceholderStyles = {
|
|
11814
|
+
width: "100%",
|
|
11815
|
+
height: "100%",
|
|
11816
|
+
display: "flex",
|
|
11817
|
+
alignItems: "center",
|
|
11818
|
+
justifyContent: "center",
|
|
11819
|
+
color: "var(--bw-text-muted)",
|
|
11820
|
+
};
|
|
11821
|
+
const nameStyles = {
|
|
11822
|
+
fontSize: "16px",
|
|
11823
|
+
fontWeight: 600,
|
|
11824
|
+
color: "var(--bw-text-color)",
|
|
11825
|
+
margin: "0 0 6px 0",
|
|
11826
|
+
paddingRight: "36px",
|
|
11827
|
+
fontFamily: "var(--bw-font-family)",
|
|
11828
|
+
};
|
|
11829
|
+
const descriptionStyles = {
|
|
11830
|
+
fontSize: "13px",
|
|
11831
|
+
color: "var(--bw-text-muted)",
|
|
11832
|
+
margin: "0 0 10px 0",
|
|
11833
|
+
lineHeight: 1.4,
|
|
11834
|
+
display: "-webkit-box",
|
|
11835
|
+
WebkitLineClamp: 5,
|
|
11836
|
+
WebkitBoxOrient: "vertical",
|
|
11837
|
+
overflow: "hidden",
|
|
11838
|
+
fontFamily: "var(--bw-font-family)",
|
|
11839
|
+
};
|
|
11840
|
+
const itemsContainerStyles = {
|
|
11841
|
+
display: "flex",
|
|
11842
|
+
flexWrap: "wrap",
|
|
11843
|
+
gap: "6px",
|
|
11844
|
+
marginBottom: "10px",
|
|
11845
|
+
};
|
|
11846
|
+
const itemStyles = {
|
|
11847
|
+
display: "inline-flex",
|
|
11848
|
+
alignItems: "center",
|
|
11849
|
+
gap: "4px",
|
|
11850
|
+
padding: "4px 8px",
|
|
11851
|
+
backgroundColor: "var(--bw-background-color)",
|
|
11852
|
+
borderRadius: "4px",
|
|
11853
|
+
fontSize: "12px",
|
|
11854
|
+
color: "var(--bw-text-muted)",
|
|
11855
|
+
fontFamily: "var(--bw-font-family)",
|
|
11856
|
+
};
|
|
11857
|
+
const eventInfoStyles = {
|
|
11858
|
+
display: "flex",
|
|
11859
|
+
alignItems: "center",
|
|
11860
|
+
gap: "12px",
|
|
11861
|
+
padding: "8px 10px",
|
|
11862
|
+
backgroundColor: "rgba(var(--bw-highlight-color-rgb, 0, 177, 170), 0.1)",
|
|
11863
|
+
borderRadius: "6px",
|
|
11864
|
+
fontSize: "12px",
|
|
11865
|
+
marginBottom: "10px",
|
|
11866
|
+
fontFamily: "var(--bw-font-family)",
|
|
11867
|
+
};
|
|
11868
|
+
const priceContainerStyles = {
|
|
11869
|
+
display: "flex",
|
|
11870
|
+
flexDirection: "column",
|
|
11871
|
+
alignItems: "flex-end",
|
|
11872
|
+
marginTop: "8px",
|
|
11873
|
+
paddingTop: "8px",
|
|
11874
|
+
borderTop: "1px solid var(--bw-border-color)",
|
|
11875
|
+
};
|
|
11876
|
+
const pricePerPersonStyles = {
|
|
11877
|
+
fontSize: "15px",
|
|
11878
|
+
fontWeight: 600,
|
|
11879
|
+
color: "var(--bw-highlight-color)",
|
|
11880
|
+
fontFamily: "var(--bw-font-family)",
|
|
11881
|
+
};
|
|
11882
|
+
const priceTotalStyles = {
|
|
11883
|
+
fontSize: "12px",
|
|
11884
|
+
color: "var(--bw-text-muted)",
|
|
11885
|
+
fontFamily: "var(--bw-font-family)",
|
|
11886
|
+
};
|
|
11887
|
+
const unavailableOverlayStyles = {
|
|
11888
|
+
position: "absolute",
|
|
11889
|
+
inset: 0,
|
|
11890
|
+
display: "flex",
|
|
11891
|
+
alignItems: "center",
|
|
11892
|
+
justifyContent: "center",
|
|
11893
|
+
backgroundColor: "rgba(var(--bw-background-color-rgb, 248, 253, 254), 0.85)",
|
|
11894
|
+
borderRadius: "var(--bw-border-radius)",
|
|
11895
|
+
fontSize: "13px",
|
|
11896
|
+
color: "var(--bw-text-muted)",
|
|
11897
|
+
textAlign: "center",
|
|
11898
|
+
padding: "16px",
|
|
11899
|
+
fontFamily: "var(--bw-font-family)",
|
|
11900
|
+
};
|
|
11901
|
+
function UpsellCard({ upsell, isSelected, participantCount, onSelect, }) {
|
|
11902
|
+
const totalPrice = upsell.price * participantCount;
|
|
11903
|
+
const isDisabled = !upsell.available;
|
|
11904
|
+
const getCardStyles = () => {
|
|
11905
|
+
if (isDisabled)
|
|
11906
|
+
return cardDisabledStyles;
|
|
11907
|
+
if (isSelected)
|
|
11908
|
+
return cardSelectedStyles;
|
|
11909
|
+
return cardBaseStyles;
|
|
11910
|
+
};
|
|
11911
|
+
return (jsxs("div", { style: getCardStyles(), onClick: !isDisabled ? onSelect : undefined, role: "checkbox", "aria-checked": isSelected, tabIndex: isDisabled ? -1 : 0, onKeyDown: (e) => {
|
|
11912
|
+
if (!isDisabled && (e.key === "Enter" || e.key === " ")) {
|
|
11913
|
+
e.preventDefault();
|
|
11914
|
+
onSelect();
|
|
11915
|
+
}
|
|
11916
|
+
}, children: [jsx("div", { style: checkboxContainerStyles, children: jsx("div", { style: isSelected ? checkboxSelectedStyles : checkboxInnerStyles, children: isSelected && (jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "white", strokeWidth: "3", strokeLinecap: "round", strokeLinejoin: "round", style: { width: "16px", height: "16px" }, children: jsx("polyline", { points: "20 6 9 17 4 12" }) })) }) }), jsx("div", { style: imageContainerStyles, children: upsell.image ? (jsx("img", { src: upsell.image, alt: upsell.name, style: imageStyles })) : (jsx("div", { style: imagePlaceholderStyles, children: jsx("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", style: { width: "40px", height: "40px", opacity: 0.4 }, children: jsx("path", { d: "M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4" }) }) })) }), jsxs("div", { style: { flex: 1 }, children: [jsx("h4", { style: nameStyles, children: upsell.name }), upsell.description && (jsx("p", { style: descriptionStyles, children: upsell.description })), upsell.items.length > 0 && (jsx("div", { style: itemsContainerStyles, children: upsell.items.map((item, index) => (jsxs("span", { style: itemStyles, children: [item.type === "product" ? "📦" : "🎫", " ", item.name, item.quantity > 1 && ` (${item.quantity}x)`] }, index))) })), upsell.suggestedEventInstance && (jsxs("div", { style: eventInfoStyles, children: [jsxs("span", { style: { color: "var(--bw-text-color)", fontWeight: 500 }, children: ["\uD83D\uDCC5 ", new Date(upsell.suggestedEventInstance.date).toLocaleDateString("de-DE", {
|
|
11917
|
+
weekday: "short",
|
|
11918
|
+
day: "numeric",
|
|
11919
|
+
month: "short",
|
|
11920
|
+
})] }), jsxs("span", { style: { color: "var(--bw-text-muted)" }, children: [upsell.suggestedEventInstance.availableSpots, " Pl\u00E4tze frei"] })] }))] }), jsxs("div", { style: priceContainerStyles, children: [jsxs("span", { style: pricePerPersonStyles, children: [formatCurrency(upsell.price), "/Person"] }), participantCount > 1 && (jsxs("span", { style: priceTotalStyles, children: ["= ", formatCurrency(totalPrice)] }))] }), isDisabled && (jsx("div", { style: unavailableOverlayStyles, children: jsx("span", { children: upsell.unavailableReason || "Nicht verfügbar" }) }))] }));
|
|
11921
|
+
}
|
|
11922
|
+
|
|
11923
|
+
function UpsellsStep({ upsells, selectedUpsells, participantCount, isLoading, isOpen, onClose, onSelect, onContinue, onBack, }) {
|
|
11924
|
+
const selectUpsell = (upsellId) => {
|
|
11925
|
+
const exists = selectedUpsells.find((s) => s.upsellPackageId === upsellId);
|
|
11926
|
+
if (exists) {
|
|
11927
|
+
// Deselect - remove this upsell from selection
|
|
11928
|
+
onSelect(selectedUpsells.filter((s) => s.upsellPackageId !== upsellId));
|
|
11929
|
+
}
|
|
11930
|
+
else {
|
|
11931
|
+
// Add this upsell to selection (checkbox behavior - allows multiple)
|
|
11932
|
+
onSelect([...selectedUpsells, { upsellPackageId: upsellId, quantity: participantCount }]);
|
|
11933
|
+
}
|
|
11934
|
+
};
|
|
11935
|
+
const isSelected = (upsellId) => selectedUpsells.some((s) => s.upsellPackageId === upsellId);
|
|
11936
|
+
// Calculate total for selected upsells
|
|
11937
|
+
const calculateTotal = () => {
|
|
11938
|
+
return selectedUpsells.reduce((total, selection) => {
|
|
11939
|
+
const upsell = upsells.find((u) => u.id === selection.upsellPackageId);
|
|
11940
|
+
if (upsell) {
|
|
11941
|
+
return total + upsell.price * selection.quantity;
|
|
11942
|
+
}
|
|
11943
|
+
return total;
|
|
11944
|
+
}, 0);
|
|
11945
|
+
};
|
|
11946
|
+
const selectedTotal = calculateTotal();
|
|
11947
|
+
const selectedCount = selectedUpsells.length;
|
|
11948
|
+
const footerContent = (jsxs(Fragment, { children: [jsx("button", { type: "button", onClick: onBack, style: mergeStyles(buttonStyles.secondary, buttonStyles.fullWidth), children: "\u2190 Zur\u00FCck" }), jsx("button", { type: "button", onClick: onContinue, style: mergeStyles(buttonStyles.primary, buttonStyles.fullWidth), children: selectedCount === 0 ? "Weiter ohne Extras" : `Weiter` })] }));
|
|
11949
|
+
return (jsx(Sidebar, { isOpen: isOpen, onClose: onClose, title: "Extras hinzuf\u00FCgen", footer: footerContent, children: jsxs("div", { style: { display: "flex", flexDirection: "column", height: "100%", padding: "16px 16px" }, children: [isLoading && (jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: "12px", padding: "40px 20px", ...textStyles.muted }, children: [spinner(), jsx("span", { children: "Lade verf\u00FCgbare Extras..." })] })), !isLoading && upsells.length === 0 && (jsx("div", { style: { textAlign: "center", padding: "40px 20px", ...textStyles.muted }, children: jsx("p", { children: "Keine Extras f\u00FCr diese Buchung verf\u00FCgbar." }) })), !isLoading && upsells.length > 0 && (jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", flex: 1, overflowY: "auto", paddingBottom: "16px" }, children: upsells.map((upsell) => (jsx(UpsellCard, { upsell: upsell, isSelected: isSelected(upsell.id), participantCount: participantCount, onSelect: () => selectUpsell(upsell.id) }, upsell.id))) })), selectedCount > 0 && (jsxs("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginTop: "16px", paddingBottom: "16px", paddingTop: "16px", borderTop: "1px solid var(--bw-border-color)", fontSize: "14px" }, children: [jsxs("span", { style: textStyles.muted, children: [selectedCount, " ", selectedCount === 1 ? "Extra" : "Extras", " ausgew\u00E4hlt"] }), jsxs("span", { style: { fontWeight: 600, color: "var(--bw-highlight-color)", fontFamily: "var(--bw-font-family)" }, children: ["+", formatCurrency(selectedTotal)] })] }))] }) }));
|
|
11950
|
+
}
|
|
11951
|
+
|
|
9976
11952
|
// Main widget component
|
|
9977
11953
|
function UniversalBookingWidget({ config: baseConfig }) {
|
|
9978
11954
|
// Apply URL parameter inference
|
|
@@ -9994,6 +11970,11 @@ function UniversalBookingWidget({ config: baseConfig }) {
|
|
|
9994
11970
|
const [selectedEventType, setSelectedEventType] = useState(null);
|
|
9995
11971
|
const [eventInstances, setEventInstances] = useState([]);
|
|
9996
11972
|
const [selectedEventInstance, setSelectedEventInstance] = useState(null);
|
|
11973
|
+
// Upsells state
|
|
11974
|
+
const [upsells, setUpsells] = useState([]);
|
|
11975
|
+
const [selectedUpsells, setSelectedUpsells] = useState([]);
|
|
11976
|
+
const [isLoadingUpsells, setIsLoadingUpsells] = useState(false);
|
|
11977
|
+
const [tempParticipantCount, setTempParticipantCount] = useState(1); // Used during upsell step
|
|
9997
11978
|
// State for upcoming events (next-events view mode)
|
|
9998
11979
|
const [upcomingEvents, setUpcomingEvents] = useState([]);
|
|
9999
11980
|
const [showingPreview, setShowingPreview] = useState(true);
|
|
@@ -10013,6 +11994,7 @@ function UniversalBookingWidget({ config: baseConfig }) {
|
|
|
10013
11994
|
const [systemConfig, setSystemConfig] = useState(null);
|
|
10014
11995
|
// PERFORMANCE OPTIMIZATION: Lazy component loading
|
|
10015
11996
|
const [shouldRenderInstanceSelection, setShouldRenderInstanceSelection] = useState(false);
|
|
11997
|
+
const [shouldRenderUpsells, setShouldRenderUpsells] = useState(false);
|
|
10016
11998
|
const [shouldRenderBookingForm, setShouldRenderBookingForm] = useState(false);
|
|
10017
11999
|
// Promo dialog state
|
|
10018
12000
|
const [showPromoDialog, setShowPromoDialog] = useState(false);
|
|
@@ -10287,15 +12269,42 @@ function UniversalBookingWidget({ config: baseConfig }) {
|
|
|
10287
12269
|
setError("Fehler beim Laden der Veranstaltungsdetails");
|
|
10288
12270
|
}
|
|
10289
12271
|
};
|
|
12272
|
+
// Load available upsells for the selected event instance
|
|
12273
|
+
const loadUpsells = async (eventTypeId, eventInstanceId, participantCount) => {
|
|
12274
|
+
try {
|
|
12275
|
+
const response = await fetch(getApiUrl(config.apiBaseUrl, "/booking/upsells"), {
|
|
12276
|
+
method: "POST",
|
|
12277
|
+
headers: createApiHeaders(config),
|
|
12278
|
+
body: JSON.stringify({
|
|
12279
|
+
organizationId: config.organizationId,
|
|
12280
|
+
eventTypeId,
|
|
12281
|
+
eventInstanceId,
|
|
12282
|
+
participantCount,
|
|
12283
|
+
}),
|
|
12284
|
+
});
|
|
12285
|
+
const data = await response.json();
|
|
12286
|
+
if (response.ok) {
|
|
12287
|
+
return data.upsells || [];
|
|
12288
|
+
}
|
|
12289
|
+
else {
|
|
12290
|
+
console.error("Upsells API error:", data.error);
|
|
12291
|
+
return [];
|
|
12292
|
+
}
|
|
12293
|
+
}
|
|
12294
|
+
catch (err) {
|
|
12295
|
+
console.error("Upsells fetch error:", err);
|
|
12296
|
+
return [];
|
|
12297
|
+
}
|
|
12298
|
+
};
|
|
10290
12299
|
// Validate configuration
|
|
10291
12300
|
if (!config.organizationId) {
|
|
10292
|
-
return (jsx("div", {
|
|
12301
|
+
return (jsx("div", { style: { maxWidth: "672px", margin: "0 auto", padding: "24px" }, children: jsxs("div", { style: { backgroundColor: "#fef2f2", border: "1px solid #fecaca", borderRadius: "var(--bw-border-radius)", padding: "16px" }, children: [jsx("h2", { style: { color: "#991b1b", fontWeight: 600, fontFamily: "var(--bw-font-family)", margin: "0 0 8px 0" }, children: "Konfigurationsfehler" }), jsx("p", { style: { color: "#dc2626", fontFamily: "var(--bw-font-family)", margin: 0 }, children: "organizationId muss in der Konfiguration angegeben werden." })] }) }));
|
|
10293
12302
|
}
|
|
10294
12303
|
if (!config.eventInstanceId &&
|
|
10295
12304
|
!config.categoryId &&
|
|
10296
12305
|
!config.eventTypeIds &&
|
|
10297
12306
|
!config.eventTypeId) {
|
|
10298
|
-
return (jsx("div", {
|
|
12307
|
+
return (jsx("div", { style: { maxWidth: "672px", margin: "0 auto", padding: "24px" }, children: jsxs("div", { style: { backgroundColor: "#fef2f2", border: "1px solid #fecaca", borderRadius: "var(--bw-border-radius)", padding: "16px" }, children: [jsx("h2", { style: { color: "#991b1b", fontWeight: 600, fontFamily: "var(--bw-font-family)", margin: "0 0 8px 0" }, children: "Konfigurationsfehler" }), jsx("p", { style: { color: "#dc2626", fontFamily: "var(--bw-font-family)", margin: 0 }, children: "Es muss eine der folgenden Optionen angegeben werden: eventInstanceId, categoryId, eventTypeIds oder eventTypeId." })] }) }));
|
|
10299
12308
|
}
|
|
10300
12309
|
// Event type selection handlers
|
|
10301
12310
|
const handleEventTypeSelect = async (eventType) => {
|
|
@@ -10313,6 +12322,32 @@ function UniversalBookingWidget({ config: baseConfig }) {
|
|
|
10313
12322
|
// Event instance selection handlers
|
|
10314
12323
|
const handleEventInstanceSelect = async (eventInstance) => {
|
|
10315
12324
|
setSelectedEventInstance(eventInstance);
|
|
12325
|
+
// Set default participant count for upsell calculations
|
|
12326
|
+
const defaultParticipantCount = 1;
|
|
12327
|
+
setTempParticipantCount(defaultParticipantCount);
|
|
12328
|
+
// Check for available upsells
|
|
12329
|
+
if (selectedEventType) {
|
|
12330
|
+
setIsLoadingUpsells(true);
|
|
12331
|
+
setShouldRenderUpsells(true);
|
|
12332
|
+
try {
|
|
12333
|
+
const availableUpsells = await loadUpsells(selectedEventType.id, eventInstance.id, defaultParticipantCount);
|
|
12334
|
+
if (availableUpsells.length > 0) {
|
|
12335
|
+
// Show upsells step
|
|
12336
|
+
setUpsells(availableUpsells);
|
|
12337
|
+
setSelectedUpsells([]);
|
|
12338
|
+
setCurrentStep("upsells");
|
|
12339
|
+
setIsLoadingUpsells(false);
|
|
12340
|
+
return; // Don't proceed to booking yet
|
|
12341
|
+
}
|
|
12342
|
+
}
|
|
12343
|
+
catch (err) {
|
|
12344
|
+
console.error("Error loading upsells:", err);
|
|
12345
|
+
}
|
|
12346
|
+
finally {
|
|
12347
|
+
setIsLoadingUpsells(false);
|
|
12348
|
+
}
|
|
12349
|
+
}
|
|
12350
|
+
// No upsells available, go directly to booking
|
|
10316
12351
|
setCurrentStep("booking");
|
|
10317
12352
|
setShouldRenderBookingForm(true);
|
|
10318
12353
|
setIsLoadingEventDetails(true);
|
|
@@ -10343,6 +12378,30 @@ function UniversalBookingWidget({ config: baseConfig }) {
|
|
|
10343
12378
|
setError(errorMessage);
|
|
10344
12379
|
config.onError?.(errorMessage);
|
|
10345
12380
|
};
|
|
12381
|
+
// Upsells handlers
|
|
12382
|
+
const handleUpsellsSelect = (selections) => {
|
|
12383
|
+
setSelectedUpsells(selections);
|
|
12384
|
+
};
|
|
12385
|
+
const handleUpsellsContinue = async () => {
|
|
12386
|
+
// Move to booking step
|
|
12387
|
+
setCurrentStep("booking");
|
|
12388
|
+
setShouldRenderBookingForm(true);
|
|
12389
|
+
setIsLoadingEventDetails(true);
|
|
12390
|
+
try {
|
|
12391
|
+
if (selectedEventInstance) {
|
|
12392
|
+
await loadEventDetails(selectedEventInstance.id);
|
|
12393
|
+
}
|
|
12394
|
+
}
|
|
12395
|
+
finally {
|
|
12396
|
+
setIsLoadingEventDetails(false);
|
|
12397
|
+
}
|
|
12398
|
+
};
|
|
12399
|
+
const handleUpsellsBack = () => {
|
|
12400
|
+
// Go back to event instance selection
|
|
12401
|
+
setCurrentStep("eventInstances");
|
|
12402
|
+
setSelectedUpsells([]);
|
|
12403
|
+
setUpsells([]);
|
|
12404
|
+
};
|
|
10346
12405
|
const handleUpcomingEventSelect = async (eventInstanceId) => {
|
|
10347
12406
|
const upcomingEvent = upcomingEvents.find((event) => event.id === eventInstanceId);
|
|
10348
12407
|
if (upcomingEvent) {
|
|
@@ -10412,7 +12471,83 @@ function UniversalBookingWidget({ config: baseConfig }) {
|
|
|
10412
12471
|
};
|
|
10413
12472
|
// Error state
|
|
10414
12473
|
if (error) {
|
|
10415
|
-
return (jsx(StyleProvider, { config: config, children: jsx("div", {
|
|
12474
|
+
return (jsx(StyleProvider, { config: config, children: jsx("div", { style: { maxWidth: "600px", margin: "0 auto", padding: "24px" }, children: jsxs("div", { style: {
|
|
12475
|
+
backgroundColor: "var(--bw-surface-color)",
|
|
12476
|
+
border: "1px solid var(--bw-error-color)",
|
|
12477
|
+
borderRadius: "var(--bw-border-radius)",
|
|
12478
|
+
padding: "24px",
|
|
12479
|
+
textAlign: "center",
|
|
12480
|
+
fontFamily: "var(--bw-font-family)",
|
|
12481
|
+
}, children: [jsx("div", { style: {
|
|
12482
|
+
width: "64px",
|
|
12483
|
+
height: "64px",
|
|
12484
|
+
backgroundColor: "var(--bw-error-color)",
|
|
12485
|
+
borderRadius: "50%",
|
|
12486
|
+
margin: "0 auto 16px auto",
|
|
12487
|
+
display: "flex",
|
|
12488
|
+
alignItems: "center",
|
|
12489
|
+
justifyContent: "center",
|
|
12490
|
+
fontSize: "32px",
|
|
12491
|
+
color: "white",
|
|
12492
|
+
}, children: "\u26A0\uFE0F" }), jsx("h2", { style: {
|
|
12493
|
+
fontSize: "20px",
|
|
12494
|
+
fontWeight: 600,
|
|
12495
|
+
color: "var(--bw-text-color)",
|
|
12496
|
+
margin: "0 0 8px 0",
|
|
12497
|
+
fontFamily: "var(--bw-font-family)",
|
|
12498
|
+
}, children: "Buchungen vor\u00FCbergehend nicht verf\u00FCgbar" }), jsx("p", { style: {
|
|
12499
|
+
color: "var(--bw-text-muted)",
|
|
12500
|
+
fontSize: "16px",
|
|
12501
|
+
lineHeight: 1.5,
|
|
12502
|
+
margin: "0 0 24px 0",
|
|
12503
|
+
fontFamily: "var(--bw-font-family)",
|
|
12504
|
+
}, children: "Es gab ein Problem beim Laden der verf\u00FCgbaren Termine. Bitte versuche es in einem Moment erneut." }), jsxs("details", { style: {
|
|
12505
|
+
marginBottom: "24px",
|
|
12506
|
+
textAlign: "left",
|
|
12507
|
+
backgroundColor: "var(--bw-background-color)",
|
|
12508
|
+
borderRadius: "var(--bw-border-radius-small)",
|
|
12509
|
+
padding: "4px",
|
|
12510
|
+
border: "1px solid var(--bw-border-color)",
|
|
12511
|
+
}, children: [jsx("summary", { style: {
|
|
12512
|
+
cursor: "pointer",
|
|
12513
|
+
fontWeight: 500,
|
|
12514
|
+
color: "var(--bw-text-muted)",
|
|
12515
|
+
fontSize: "14px",
|
|
12516
|
+
fontFamily: "var(--bw-font-family)",
|
|
12517
|
+
marginBottom: "8px",
|
|
12518
|
+
}, children: "Technische Details anzeigen" }), jsx("code", { style: {
|
|
12519
|
+
display: "block",
|
|
12520
|
+
fontSize: "14px",
|
|
12521
|
+
color: "var(--bw-text-muted)",
|
|
12522
|
+
fontFamily: "ui-monospace, monospace",
|
|
12523
|
+
wordBreak: "break-word",
|
|
12524
|
+
whiteSpace: "pre-wrap",
|
|
12525
|
+
}, children: error })] }), jsx("div", { style: {
|
|
12526
|
+
display: "flex",
|
|
12527
|
+
gap: "16px",
|
|
12528
|
+
justifyContent: "center",
|
|
12529
|
+
flexWrap: "wrap",
|
|
12530
|
+
}, children: jsxs("button", { onClick: () => window.location.reload(), style: {
|
|
12531
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
12532
|
+
color: "white",
|
|
12533
|
+
padding: "12px 24px",
|
|
12534
|
+
border: "none",
|
|
12535
|
+
borderRadius: "var(--bw-border-radius)",
|
|
12536
|
+
fontSize: "16px",
|
|
12537
|
+
fontWeight: 600,
|
|
12538
|
+
cursor: "pointer",
|
|
12539
|
+
fontFamily: "var(--bw-font-family)",
|
|
12540
|
+
transition: "all 0.2s ease",
|
|
12541
|
+
display: "flex",
|
|
12542
|
+
alignItems: "center",
|
|
12543
|
+
gap: "8px",
|
|
12544
|
+
}, children: [jsx("span", { style: { fontSize: "16px" }, children: "\uD83D\uDD04" }), "Seite neu laden"] }) }), jsx("p", { style: {
|
|
12545
|
+
color: "var(--bw-text-muted)",
|
|
12546
|
+
fontSize: "14px",
|
|
12547
|
+
marginTop: "24px",
|
|
12548
|
+
margin: "24px 0 0 0",
|
|
12549
|
+
fontFamily: "var(--bw-font-family)",
|
|
12550
|
+
}, children: "Falls das Problem weiterhin besteht, kontaktiere bitte den Support." })] }) }) }));
|
|
10416
12551
|
}
|
|
10417
12552
|
// Main view based on view mode
|
|
10418
12553
|
if (viewMode === "next-events" && showingPreview) {
|
|
@@ -10428,13 +12563,16 @@ function UniversalBookingWidget({ config: baseConfig }) {
|
|
|
10428
12563
|
setCurrentStep("eventTypes");
|
|
10429
12564
|
setShowingPreview(true);
|
|
10430
12565
|
setEventDetails(null);
|
|
10431
|
-
}, systemConfig: systemConfig })), jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
12566
|
+
}, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells })), jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
10432
12567
|
setIsSuccess(false);
|
|
10433
12568
|
setCurrentStep("eventTypes");
|
|
10434
12569
|
setShowingPreview(true);
|
|
10435
12570
|
setSuccessPaymentIntentId(null);
|
|
10436
12571
|
setShouldRenderInstanceSelection(false);
|
|
12572
|
+
setShouldRenderUpsells(false);
|
|
10437
12573
|
setShouldRenderBookingForm(false);
|
|
12574
|
+
setSelectedUpsells([]);
|
|
12575
|
+
setUpsells([]);
|
|
10438
12576
|
const url = new URL(window.location.href);
|
|
10439
12577
|
url.searchParams.delete("payment_intent");
|
|
10440
12578
|
url.searchParams.delete("payment_intent_client_secret");
|
|
@@ -10464,7 +12602,23 @@ function UniversalBookingWidget({ config: baseConfig }) {
|
|
|
10464
12602
|
}, config: config, onError: setError, paymentIntentId: successPaymentIntentId })] }), showPromoDialog && config.promo && (jsx(PromoDialog, { config: config.promo, onClose: handlePromoDialogClose, onCtaClick: handlePromoCtaClick }))] }));
|
|
10465
12603
|
}
|
|
10466
12604
|
if (viewMode === "button" && (isSingleEventTypeMode || isDirectInstanceMode)) {
|
|
10467
|
-
return (jsxs(StyleProvider, { config: config, children: [jsxs("div", { ref: setWidgetContainerRef,
|
|
12605
|
+
return (jsxs(StyleProvider, { config: config, children: [jsxs("div", { ref: setWidgetContainerRef, style: {
|
|
12606
|
+
display: "flex",
|
|
12607
|
+
justifyContent: "center",
|
|
12608
|
+
alignItems: "center",
|
|
12609
|
+
minHeight: "120px",
|
|
12610
|
+
}, children: [jsx("button", { type: "button", style: {
|
|
12611
|
+
backgroundColor: "var(--bw-highlight-color)",
|
|
12612
|
+
color: "white",
|
|
12613
|
+
padding: "16px 32px",
|
|
12614
|
+
border: "none",
|
|
12615
|
+
borderRadius: "var(--bw-border-radius)",
|
|
12616
|
+
fontSize: "18px",
|
|
12617
|
+
fontWeight: 600,
|
|
12618
|
+
fontFamily: "var(--bw-font-family)",
|
|
12619
|
+
boxShadow: "var(--bw-shadow-md)",
|
|
12620
|
+
cursor: "pointer",
|
|
12621
|
+
}, onClick: () => {
|
|
10468
12622
|
if (isDirectInstanceMode) {
|
|
10469
12623
|
setCurrentStep("booking");
|
|
10470
12624
|
setShouldRenderBookingForm(true);
|
|
@@ -10474,13 +12628,16 @@ function UniversalBookingWidget({ config: baseConfig }) {
|
|
|
10474
12628
|
setShouldRenderInstanceSelection(true);
|
|
10475
12629
|
}
|
|
10476
12630
|
}, children: config.buttonText ||
|
|
10477
|
-
(isDirectInstanceMode ? "Jetzt buchen" : "Jetzt Termin auswählen") }), shouldRenderInstanceSelection && (jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen, onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderBookingForm && eventDetails && (jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), onBackToEventTypes: () => setSidebarOpen(false), selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), systemConfig: systemConfig })), jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
12631
|
+
(isDirectInstanceMode ? "Jetzt buchen" : "Jetzt Termin auswählen") }), shouldRenderInstanceSelection && (jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), onBackToEventTypes: () => setSidebarOpen(false), selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: () => setCurrentStep(isDirectInstanceMode ? "eventTypes" : "eventInstances"), systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells })), jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
10478
12632
|
setIsSuccess(false);
|
|
10479
12633
|
setCurrentStep("eventTypes");
|
|
10480
12634
|
setSidebarOpen(false);
|
|
10481
12635
|
setSuccessPaymentIntentId(null);
|
|
10482
12636
|
setShouldRenderInstanceSelection(false);
|
|
12637
|
+
setShouldRenderUpsells(false);
|
|
10483
12638
|
setShouldRenderBookingForm(false);
|
|
12639
|
+
setSelectedUpsells([]);
|
|
12640
|
+
setUpsells([]);
|
|
10484
12641
|
const url = new URL(window.location.href);
|
|
10485
12642
|
url.searchParams.delete("payment_intent");
|
|
10486
12643
|
url.searchParams.delete("payment_intent_client_secret");
|
|
@@ -10518,12 +12675,15 @@ function UniversalBookingWidget({ config: baseConfig }) {
|
|
|
10518
12675
|
};
|
|
10519
12676
|
};
|
|
10520
12677
|
const backHandlers = getBackHandlers();
|
|
10521
|
-
return (jsxs(StyleProvider, { config: config, children: [jsxs("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderBookingForm && eventDetails && (jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: backHandlers.onBackToEventInstances, onBackToEventTypes: backHandlers.onBackToEventTypes, selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: backHandlers.onClose, systemConfig: systemConfig })), jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
12678
|
+
return (jsxs(StyleProvider, { config: config, children: [jsxs("div", { ref: setWidgetContainerRef, children: [cardsView, shouldRenderInstanceSelection && (jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: handleBackToEventTypes, isOpen: currentStep === "eventInstances", onClose: handleBackToEventTypes, isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails })), shouldRenderUpsells && (jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (jsx(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, onBackToEventInstances: backHandlers.onBackToEventInstances, onBackToEventTypes: backHandlers.onBackToEventTypes, selectedEventType: selectedEventType, selectedEventInstance: selectedEventInstance, isOpen: currentStep === "booking" && !!eventDetails, onClose: backHandlers.onClose, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells })), jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
|
|
10522
12679
|
setIsSuccess(false);
|
|
10523
12680
|
setCurrentStep("eventTypes");
|
|
10524
12681
|
setSuccessPaymentIntentId(null);
|
|
10525
12682
|
setShouldRenderInstanceSelection(false);
|
|
12683
|
+
setShouldRenderUpsells(false);
|
|
10526
12684
|
setShouldRenderBookingForm(false);
|
|
12685
|
+
setSelectedUpsells([]);
|
|
12686
|
+
setUpsells([]);
|
|
10527
12687
|
const url = new URL(window.location.href);
|
|
10528
12688
|
url.searchParams.delete("payment_intent");
|
|
10529
12689
|
url.searchParams.delete("payment_intent_client_secret");
|
|
@@ -10559,7 +12719,7 @@ function styleInject(css, ref) {
|
|
|
10559
12719
|
}
|
|
10560
12720
|
}
|
|
10561
12721
|
|
|
10562
|
-
var css_248z = "/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer theme, base, components, utilities;@layer theme{:host,:root{--font-sans:var(--bw-font-family,Inter),system-ui,sans-serif;--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--color-red-50:oklch(97.1% 0.013 17.38);--color-red-100:oklch(93.6% 0.032 17.717);--color-red-200:oklch(88.5% 0.062 18.334);--color-red-500:oklch(63.7% 0.237 25.331);--color-red-600:oklch(57.7% 0.245 27.325);--color-red-800:oklch(44.4% 0.177 26.899);--color-green-100:oklch(96.2% 0.044 156.743);--color-green-500:oklch(72.3% 0.219 149.579);--color-green-700:oklch(52.7% 0.154 150.069);--color-slate-50:oklch(98.4% 0.003 247.858);--color-slate-200:oklch(92.9% 0.013 255.508);--color-slate-300:oklch(86.9% 0.022 252.894);--color-slate-500:oklch(55.4% 0.046 257.417);--color-slate-600:oklch(44.6% 0.043 257.281);--color-slate-700:oklch(37.2% 0.044 257.287);--color-slate-900:oklch(20.8% 0.042 265.755);--color-gray-600:oklch(44.6% 0.03 256.802);--color-black:#000;--color-white:#fff;--spacing:0.25rem;--container-2xl:42rem;--text-xs:0.75rem;--text-xs--line-height:1.33333;--text-sm:var(--bw-font-size-small,12px);--text-sm--line-height:1.42857;--text-base:var(--bw-font-size,14px);--text-base--line-height:1.5;--text-lg:var(--bw-font-size-large,18px);--text-lg--line-height:1.55556;--text-xl:1.25rem;--text-xl--line-height:1.4;--text-2xl:1.5rem;--text-2xl--line-height:1.33333;--text-3xl:1.875rem;--text-3xl--line-height:1.2;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tight:-0.025em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:var(--bw-border-radius-small,14px);--radius-lg:0.5rem;--radius-2xl:1rem;--ease-out:cubic-bezier(0,0,0.2,1);--ease-in-out:cubic-bezier(0.4,0,0.2,1);--animate-spin:spin 1s linear infinite;--blur-sm:8px;--default-transition-duration:150ms;--default-transition-timing-function:cubic-bezier(0.4,0,0.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--radius:var(--bw-border-radius,18px);--color-surface:var(--bw-surface-color,#fff);--color-background:var(--bw-background-color,#f8fdfe);--color-highlight:var(--bw-highlight-color,#00b1aa);--color-text-primary:var(--bw-text-color,#0e7490);--color-text-muted:var(--bw-text-muted,rgba(14,116,144,.7));--color-border:var(--bw-border-color,#bae6fd);--color-success:var(--bw-success-color,#38bdf8);--color-warning:var(--bw-warning-color,#fbbf24);--color-error:var(--bw-error-color,#f43f5e)}}@layer base{*,::backdrop,::file-selector-button,:after,:before{border:0 solid;box-sizing:border-box;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:var(--default-font-feature-settings,normal);-webkit-tap-highlight-color:transparent;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-variation-settings:var(--default-font-variation-settings,normal);line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:var(--default-mono-font-feature-settings,normal);font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::file-selector-button,button,input,optgroup,select,textarea{font-feature-settings:inherit;background-color:transparent;border-radius:0;color:inherit;font:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance:-apple-pay-button)) or (contain-intrinsic-size:1px){::-moz-placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor;@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}::file-selector-button,button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;white-space:nowrap;width:1px}.absolute,.sr-only{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing)*0)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-4{top:calc(var(--spacing)*4)}.right-0{right:calc(var(--spacing)*0)}.right-3{right:calc(var(--spacing)*3)}.right-4{right:calc(var(--spacing)*4)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-3{bottom:calc(var(--spacing)*3)}.left-0{left:calc(var(--spacing)*0)}.left-1\\/2{left:50%}.left-3{left:calc(var(--spacing)*3)}.left-4{left:calc(var(--spacing)*4)}.z-10{z-index:10}.z-50{z-index:50}.z-\\[1\\]{z-index:1}.z-\\[2\\]{z-index:2}.z-\\[60\\]{z-index:60}.z-\\[61\\]{z-index:61}.z-\\[1000\\]{z-index:1000}.container{width:100%;@media (width >= 40rem){max-width:40rem}@media (width >= 48rem){max-width:48rem}@media (width >= 64rem){max-width:64rem}@media (width >= 80rem){max-width:80rem}@media (width >= 96rem){max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing)*1)}.my-2\\.5{margin-block:calc(var(--spacing)*2.5)}.-mt-5{margin-top:calc(var(--spacing)*-5)}.-mt-6{margin-top:calc(var(--spacing)*-6)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-2\\.5{margin-top:calc(var(--spacing)*2.5)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-8{margin-top:calc(var(--spacing)*8)}.mr-auto{margin-right:auto}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-2\\.5{margin-bottom:calc(var(--spacing)*2.5)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.ml-1\\.5{margin-left:calc(var(--spacing)*1.5)}.ml-2{margin-left:calc(var(--spacing)*2)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-flex{display:inline-flex}.list-item{display:list-item}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-12{height:calc(var(--spacing)*12)}.h-16{height:calc(var(--spacing)*16)}.h-\\[180px\\]{height:180px}.h-\\[300px\\]{height:300px}.h-\\[400px\\]{height:400px}.h-full{height:100%}.h-px{height:1px}.max-h-\\[128px\\]{max-height:128px}.min-h-\\[80px\\]{min-height:80px}.min-h-\\[120px\\]{min-height:120px}.min-h-\\[128px\\]{min-height:128px}.min-h-\\[300px\\]{min-height:300px}.min-h-\\[400px\\]{min-height:400px}.w-2{width:calc(var(--spacing)*2)}.w-3\\/5{width:60%}.w-4{width:calc(var(--spacing)*4)}.w-4\\/5{width:80%}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-16{width:calc(var(--spacing)*16)}.w-20{width:calc(var(--spacing)*20)}.w-\\[50px\\]{width:50px}.w-\\[60px\\]{width:60px}.w-\\[70\\%\\]{width:70%}.w-\\[70px\\]{width:70px}.w-\\[90\\%\\]{width:90%}.w-\\[92\\%\\]{width:92%}.w-\\[100px\\]{width:100px}.w-\\[120px\\]{width:120px}.w-\\[280px\\]{width:280px}.w-\\[320px\\]{width:320px}.w-auto{width:auto}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[230px\\]{max-width:230px}.max-w-\\[400px\\]{max-width:400px}.max-w-\\[440px\\]{max-width:440px}.max-w-\\[500px\\]{max-width:500px}.max-w-\\[600px\\]{max-width:600px}.max-w-\\[calc\\(100\\%-32px\\)\\]{max-width:calc(100% - 32px)}.max-w-full{max-width:100%}.min-w-\\[100px\\]{min-width:100px}.flex-1{flex:1}.flex-\\[1_1_350px\\]{flex:1 1 350px}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x:-50%}.-translate-x-1\\/2,.-translate-y-1\\/2{translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:-50%}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize-y{resize:vertical}.list-none{list-style-type:none}.auto-rows-fr{grid-auto-rows:minmax(0,1fr)}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-\\[repeat\\(auto-fill\\,minmax\\(350px\\,1fr\\)\\)\\]{grid-template-columns:repeat(auto-fill,minmax(350px,1fr))}.grid-cols-\\[repeat\\(auto-fit\\,minmax\\(200px\\,1fr\\)\\)\\]{grid-template-columns:repeat(auto-fit,minmax(200px,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-4{gap:calc(var(--spacing)*4)}.gap-5{gap:calc(var(--spacing)*5)}.gap-6{gap:calc(var(--spacing)*6)}.space-y-2{:where(&>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*2*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*2*var(--tw-space-y-reverse))}}.space-y-3{:where(&>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*3*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*3*var(--tw-space-y-reverse))}}.space-y-4{:where(&>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*4*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*4*var(--tw-space-y-reverse))}}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded{border-radius:var(--radius)}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\\[10px\\]{border-radius:10px}.rounded-\\[14px\\]{border-radius:14px}.rounded-\\[20px\\]{border-radius:20px}.rounded-\\[28px\\]{border-radius:28px}.rounded-\\[inherit\\]{border-radius:inherit}.rounded-full{border-radius:calc(infinity * 1px)}.rounded-lg{border-radius:var(--radius-lg)}.rounded-sm{border-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-4{border-top-style:var(--tw-border-style);border-top-width:4px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-solid{--tw-border-style:solid;border-style:solid}.border-border{border-color:var(--color-border)}.border-current{border-color:currentcolor}.border-error,.border-error\\/40{border-color:var(--color-error);@supports (color:color-mix(in lab,red,red)){border-color:color-mix(in oklab,var(--color-error) 40%,transparent)}}.border-green-500{border-color:var(--color-green-500)}.border-highlight{border-color:var(--color-highlight)}.border-red-200{border-color:var(--color-red-200)}.border-slate-200{border-color:var(--color-slate-200)}.border-success\\/40{border-color:var(--color-success);@supports (color:color-mix(in lab,red,red)){border-color:color-mix(in oklab,var(--color-success) 40%,transparent)}}.border-white{border-color:var(--color-white)}.border-t-transparent{border-top-color:transparent}.bg-\\[rgba\\(0\\,20\\,40\\,0\\.85\\)\\]{background-color:rgba(0,20,40,.85)}.bg-background{background-color:var(--color-background)}.bg-black\\/5{background-color:color-mix(in srgb,#000 5%,transparent);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-black) 5%,transparent)}}.bg-black\\/10{background-color:color-mix(in srgb,#000 10%,transparent);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-black) 10%,transparent)}}.bg-black\\/30{background-color:color-mix(in srgb,#000 30%,transparent);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-black) 30%,transparent)}}.bg-black\\/50{background-color:color-mix(in srgb,#000 50%,transparent);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}.bg-border{background-color:var(--color-border)}.bg-error,.bg-error\\/10,.bg-error\\/15{background-color:var(--color-error);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-error) 15%,transparent)}}.bg-green-100{background-color:var(--color-green-100)}.bg-highlight{background-color:var(--color-highlight)}.bg-red-50{background-color:var(--color-red-50)}.bg-red-100{background-color:var(--color-red-100)}.bg-slate-50{background-color:var(--color-slate-50)}.bg-slate-700\\/30{background-color:color-mix(in srgb,oklch(37.2% .044 257.287) 30%,transparent);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-700) 30%,transparent)}}.bg-slate-900\\/80{background-color:color-mix(in srgb,oklch(20.8% .042 265.755) 80%,transparent);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-slate-900) 80%,transparent)}}.bg-success,.bg-success\\/15{background-color:var(--color-success);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-success) 15%,transparent)}}.bg-surface{background-color:var(--color-surface)}.bg-transparent{background-color:transparent}.bg-white{background-color:var(--color-white)}.bg-white\\/15{background-color:color-mix(in srgb,#fff 15%,transparent);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-white) 15%,transparent)}}.bg-white\\/20{background-color:color-mix(in srgb,#fff 20%,transparent);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-white) 20%,transparent)}}.bg-white\\/50{background-color:color-mix(in srgb,#fff 50%,transparent);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-white) 50%,transparent)}}.bg-white\\/90{background-color:color-mix(in srgb,#fff 90%,transparent);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-highlight\\/20{--tw-gradient-from:var(--color-highlight);@supports (color:color-mix(in lab,red,red)){--tw-gradient-from:color-mix(in oklab,var(--color-highlight) 20%,transparent)}--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from) var(--tw-gradient-from-position),var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-highlight{--tw-gradient-to:var(--color-highlight);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from) var(--tw-gradient-from-position),var(--tw-gradient-to) var(--tw-gradient-to-position))}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-\\[18px_20px\\]{padding:18px 20px}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-7{padding-inline:calc(var(--spacing)*7)}.px-8{padding-inline:calc(var(--spacing)*8)}.px-\\[18px\\]{padding-inline:18px}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-3\\.5{padding-block:calc(var(--spacing)*3.5)}.py-4{padding-block:calc(var(--spacing)*4)}.py-\\[18px\\]{padding-block:18px}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-7{padding-top:calc(var(--spacing)*7)}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-10{padding-right:calc(var(--spacing)*10)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-5{padding-bottom:calc(var(--spacing)*5)}.pb-8{padding-bottom:calc(var(--spacing)*8)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-10{padding-left:calc(var(--spacing)*10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[11px\\]{font-size:11px}.text-\\[13px\\]{font-size:13px}.text-\\[17px\\]{font-size:17px}.text-\\[18px\\]{font-size:18px}.text-\\[22px\\]{font-size:22px}.text-\\[26px\\]{font-size:26px}.text-\\[28px\\]{font-size:28px}.text-\\[32px\\]{font-size:32px}.text-\\[48px\\]{font-size:48px}.text-\\[64px\\]{font-size:64px}.text-\\[clamp\\(0\\.8rem\\,2vw\\,16px\\)\\]{font-size:clamp(.8rem,2vw,16px)}.text-\\[clamp\\(0\\.95rem\\,2vw\\,16px\\)\\]{font-size:clamp(.95rem,2vw,16px)}.text-\\[clamp\\(1\\.1rem\\,2\\.5vw\\,24px\\)\\]{font-size:clamp(1.1rem,2.5vw,24px)}.text-\\[clamp\\(1\\.72rem\\,4vw\\,32px\\)\\]{font-size:clamp(1.72rem,4vw,32px)}.text-\\[clamp\\(1rem\\,2vw\\,16px\\)\\]{font-size:clamp(1rem,2vw,16px)}.leading-\\[1\\.55\\]{--tw-leading:1.55;line-height:1.55}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\\[1\\.5px\\]{--tw-tracking:1.5px;letter-spacing:1.5px}.tracking-\\[6px\\]{--tw-tracking:6px;letter-spacing:6px}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.break-words{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-error{color:var(--color-error)}.text-gray-600{color:var(--color-gray-600)}.text-green-700{color:var(--color-green-700)}.text-highlight,.text-highlight\\/80{color:var(--color-highlight);@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,var(--color-highlight) 80%,transparent)}}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-800{color:var(--color-red-800)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-success{color:var(--color-success)}.text-surface{color:var(--color-surface)}.text-text-muted{color:var(--color-text-muted)}.text-text-primary{color:var(--color-text-primary)}.text-white{color:var(--color-white)}.text-white\\/60{color:color-mix(in srgb,#fff 60%,transparent);@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,var(--color-white) 60%,transparent)}}.text-white\\/90{color:color-mix(in srgb,#fff 90%,transparent);@supports (color:color-mix(in lab,red,red)){color:color-mix(in oklab,var(--color-white) 90%,transparent)}}.uppercase{text-transform:uppercase}.italic{font-style:italic}.line-through{text-decoration-line:line-through}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.accent-highlight{accent-color:var(--color-highlight)}.opacity-0{opacity:0}.opacity-30{opacity:30%}.opacity-50{opacity:50%}.opacity-60{opacity:60%}.opacity-70{opacity:70%}.opacity-80{opacity:80%}.opacity-100{opacity:100%}.opacity-\\[0\\.18\\]{opacity:.18}.shadow-\\[0_0_0_2px_var\\(--bw-highlight-color\\)\\]{--tw-shadow:0 0 0 2px var(--tw-shadow-color,var(--bw-highlight-color))}.shadow-\\[0_0_0_2px_var\\(--bw-highlight-color\\)\\],.shadow-\\[0_2px_8px_0_var\\(--bw-highlight-color\\)\\]{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_2px_8px_0_var\\(--bw-highlight-color\\)\\]{--tw-shadow:0 2px 8px 0 var(--tw-shadow-color,var(--bw-highlight-color))}.shadow-\\[0_8px_24px_rgba\\(0\\,0\\,0\\,0\\.15\\)\\,inset_0_-2px_0_rgba\\(0\\,0\\,0\\,0\\.05\\)\\]{--tw-shadow:0 8px 24px var(--tw-shadow-color,rgba(0,0,0,.15)),inset 0 -2px 0 var(--tw-shadow-color,rgba(0,0,0,.05));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\\[0_25px_60px_-12px_rgba\\(0\\,0\\,0\\,0\\.5\\)\\,0_0_0_1px_rgba\\(255\\,255\\,255\\,0\\.1\\)\\,inset_0_1px_0_rgba\\(255\\,255\\,255\\,0\\.2\\)\\]{--tw-shadow:0 25px 60px -12px var(--tw-shadow-color,rgba(0,0,0,.5)),0 0 0 1px var(--tw-shadow-color,hsla(0,0%,100%,.1)),inset 0 1px 0 var(--tw-shadow-color,hsla(0,0%,100%,.2));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:var(--bw-shadow-lg,0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05))}.shadow-lg,.shadow-md{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:var(--bw-shadow-md,0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06))}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur-\\[0\\.5px\\]{--tw-blur:blur(0.5px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\\[0_2px_4px_rgba\\(0\\,0\\,0\\,0\\.2\\)\\]{--tw-drop-shadow-size:drop-shadow(0 2px 4px var(--tw-drop-shadow-color,rgba(0,0,0,.2)));--tw-drop-shadow:var(--tw-drop-shadow-size)}.drop-shadow-\\[0_2px_4px_rgba\\(0\\,0\\,0\\,0\\.2\\)\\],.drop-shadow-\\[0_2px_8px_rgba\\(0\\,0\\,0\\,0\\.3\\)\\]{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.drop-shadow-\\[0_2px_8px_rgba\\(0\\,0\\,0\\,0\\.3\\)\\]{--tw-drop-shadow-size:drop-shadow(0 2px 8px var(--tw-drop-shadow-color,rgba(0,0,0,.3)));--tw-drop-shadow:var(--tw-drop-shadow-size)}.drop-shadow-\\[0_8px_16px_rgba\\(0\\,0\\,0\\,0\\.4\\)\\]{--tw-drop-shadow-size:drop-shadow(0 8px 16px var(--tw-drop-shadow-color,rgba(0,0,0,.4)));--tw-drop-shadow:var(--tw-drop-shadow-size)}.drop-shadow-\\[0_8px_16px_rgba\\(0\\,0\\,0\\,0\\.4\\)\\],.grayscale{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.grayscale{--tw-grayscale:grayscale(100%)}.grayscale-\\[40\\%\\]{--tw-grayscale:grayscale(40%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-all{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-colors{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-opacity{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.transition-transform{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.duration-150{--tw-duration:150ms;transition-duration:.15s}.duration-200{--tw-duration:200ms;transition-duration:.2s}.duration-250{--tw-duration:250ms;transition-duration:.25s}.duration-300{--tw-duration:300ms;transition-duration:.3s}.duration-400{--tw-duration:400ms;transition-duration:.4s}.ease-\\[cubic-bezier\\(0\\.4\\,0\\,0\\.2\\,1\\)\\]{--tw-ease:cubic-bezier(0.4,0,0.2,1);transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-transform{will-change:transform}.outline-none{--tw-outline-style:none;outline-style:none}.hover\\:-translate-y-0\\.5{&:hover{@media (hover:hover){--tw-translate-y:calc(var(--spacing)*-0.5);translate:var(--tw-translate-x) var(--tw-translate-y)}}}.hover\\:scale-110{&:hover{@media (hover:hover){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x) var(--tw-scale-y)}}}.hover\\:scale-125{&:hover{@media (hover:hover){--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x) var(--tw-scale-y)}}}.hover\\:scale-\\[1\\.02\\]{&:hover{@media (hover:hover){scale:1.02}}}.hover\\:border-slate-300{&:hover{@media (hover:hover){border-color:var(--color-slate-300)}}}.hover\\:bg-black\\/5{&:hover{@media (hover:hover){background-color:color-mix(in srgb,#000 5%,transparent);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-black) 5%,transparent)}}}}.hover\\:bg-black\\/50{&:hover{@media (hover:hover){background-color:color-mix(in srgb,#000 50%,transparent);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-black) 50%,transparent)}}}}.hover\\:bg-black\\/70{&:hover{@media (hover:hover){background-color:color-mix(in srgb,#000 70%,transparent);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-black) 70%,transparent)}}}}.hover\\:bg-border{&:hover{@media (hover:hover){background-color:var(--color-border)}}}.hover\\:bg-error\\/10{&:hover{@media (hover:hover){background-color:var(--color-error);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-error) 10%,transparent)}}}}.hover\\:bg-highlight{&:hover{@media (hover:hover){background-color:var(--color-highlight)}}}.hover\\:bg-highlight\\/10{&:hover{@media (hover:hover){background-color:var(--color-highlight);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-highlight) 10%,transparent)}}}}.hover\\:bg-white\\/80{&:hover{@media (hover:hover){background-color:color-mix(in srgb,#fff 80%,transparent);@supports (color:color-mix(in lab,red,red)){background-color:color-mix(in oklab,var(--color-white) 80%,transparent)}}}}.hover\\:text-text-primary{&:hover{@media (hover:hover){color:var(--color-text-primary)}}}.hover\\:text-white{&:hover{@media (hover:hover){color:var(--color-white)}}}.hover\\:opacity-80{&:hover{@media (hover:hover){opacity:80%}}}.hover\\:opacity-90{&:hover{@media (hover:hover){opacity:90%}}}.hover\\:opacity-100{&:hover{@media (hover:hover){opacity:100%}}}.hover\\:shadow-lg{&:hover{@media (hover:hover){--tw-shadow:var(--bw-shadow-lg,0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}}.hover\\:brightness-95{&:hover{@media (hover:hover){--tw-brightness:brightness(95%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}}.hover\\:brightness-110{&:hover{@media (hover:hover){--tw-brightness:brightness(110%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}}.focus\\:border-highlight{&:focus{border-color:var(--color-highlight)}}.focus\\:shadow-\\[0_0_0_2px_var\\(--bw-highlight-color\\)33\\]{&:focus{--tw-shadow:0 0 0 2px var(--tw-shadow-color,var(--bw-highlight-color)33);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:shadow-\\[0_0_0_2px_var\\(--bw-highlight-color\\)\\]{&:focus{--tw-shadow:0 0 0 2px var(--tw-shadow-color,var(--bw-highlight-color));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\\:ring-highlight{&:focus{--tw-ring-color:var(--color-highlight)}}.focus\\:ring-offset-2{&:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}}.focus\\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}}@layer base{.booking-widget-container{color:var(--bw-text-color,#1e293b);direction:ltr;display:block;font-family:var(--bw-font-family,system-ui,-apple-system,sans-serif);font-size:var(--bw-font-size,14px);isolation:isolate;line-height:1.5;position:relative;text-align:left}.booking-widget-container,.booking-widget-container *,.booking-widget-container :after,.booking-widget-container :before{box-sizing:border-box}.booking-widget-container input,.booking-widget-container select,.booking-widget-container textarea{font-family:inherit;font-size:inherit;line-height:inherit}.booking-widget-container button{cursor:pointer;font-family:inherit;font-size:inherit}.booking-widget-container a{color:inherit}.booking-widget-container img{height:auto;max-width:100%;vertical-align:middle}#booking-widget-portal{color:var(--bw-text-color,#1e293b);direction:ltr;font-family:var(--bw-font-family,system-ui,-apple-system,sans-serif);font-size:var(--bw-font-size,14px);isolation:isolate;line-height:1.5;text-align:left}#booking-widget-portal *,#booking-widget-portal :after,#booking-widget-portal :before{box-sizing:border-box}}@layer utilities{.print-only{display:none}.print-hidden{display:block}@media print{.print-only{display:block}.print-hidden{display:none}}}:root{--bw-highlight-color:#00b1aa;--bw-highlight-color-rgb:0,177,170;--bw-background-color:#f8fdfe;--bw-surface-color:#fff;--bw-text-color:#0e7490;--bw-text-muted:rgba(14,116,144,.7);--bw-border-color:#bae6fd;--bw-success-color:#38bdf8;--bw-warning-color:#fbbf24;--bw-error-color:#f43f5e;--bw-border-radius:18px;--bw-border-radius-small:calc(var(--bw-border-radius)*0.8);--bw-spacing:16px;--bw-spacing-large:24px;--bw-font-family:\"Inter\",system-ui,sans-serif;--bw-font-size:14px;--bw-font-size-large:18px;--bw-font-size-small:12px;--bw-shadow-md:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);--bw-shadow-lg:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);--bw-highlight-muted:rgba(0,177,170,.1);--bw-highlight-subtle:rgba(0,177,170,.05);--bw-text-subtle:rgba(14,116,144,.4)}@keyframes shimmer{0%{transform:translateX(-100%)}to{transform:translateX(100%)}}@keyframes promo-wave{0%,to{transform:translateX(0) translateY(0)}25%{transform:translateX(5px) translateY(-3px)}50%{transform:translateX(0) translateY(-5px)}75%{transform:translateX(-5px) translateY(-3px)}}@keyframes promo-float{0%,to{transform:translateY(0)}50%{transform:translateY(-8px)}}@keyframes promo-shimmer{0%{background-position:-200%}to{background-position:200%}}@keyframes promo-sparkle{0%,to{opacity:.3;transform:scale(1)}50%{opacity:1;transform:scale(1.2)}}@keyframes promo-snow{0%{opacity:0;transform:translateY(-10px) rotate(0deg)}10%{opacity:1}90%{opacity:1}to{opacity:0;transform:translateY(350px) rotate(1turn)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}@keyframes slide-in-right{0%{opacity:0;transform:translateX(100%)}to{opacity:1;transform:translateX(0)}}@keyframes slide-out-right{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(100%)}}@keyframes slide-in-up{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes scale-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.animate-spin{animation:spin 1s linear infinite}.animate-shimmer{animation:shimmer 2s infinite}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.animate-fade-in{animation:fade-in .2s ease-out}.animate-slide-in-up{animation:slide-in-up .3s ease-out}.animate-scale-in{animation:scale-in .2s ease-out}.skeleton-shimmer{overflow:hidden;position:relative}.skeleton-shimmer:after{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,transparent,hsla(0,0%,100%,.3),transparent);content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}@media (max-width:768px){.sidebar-mobile{border-radius:0!important;max-width:100%!important;width:100%!important}}.input-focus:focus{border-color:var(--bw-highlight-color);box-shadow:0 0 0 3px var(--bw-highlight-muted);outline:none}.btn-primary{background-color:var(--bw-highlight-color);color:#fff;transition:filter .2s ease}.btn-primary:hover{filter:brightness(1.1)}.btn-primary:active{filter:brightness(.95)}.btn-primary:disabled{cursor:not-allowed;opacity:.5}.card-interactive{transition:transform .2s ease,box-shadow .2s ease}.card-interactive:hover{box-shadow:var(--bw-shadow-lg);transform:translateY(-2px)}.custom-scrollbar::-webkit-scrollbar{height:6px;width:6px}.custom-scrollbar::-webkit-scrollbar-track{background:transparent}.custom-scrollbar::-webkit-scrollbar-thumb{background:var(--bw-border-color);border-radius:3px}.custom-scrollbar::-webkit-scrollbar-thumb:hover{background:var(--bw-text-muted)}.markdown-content h1,.markdown-content h2,.markdown-content h3,.markdown-content h4,.markdown-content h5,.markdown-content h6{color:var(--bw-text-color);font-weight:600;margin-bottom:.5em}.markdown-content h1{font-size:1.5em}.markdown-content h2{font-size:1.25em}.markdown-content h3{font-size:1.1em}.markdown-content p{line-height:1.6;margin-bottom:1em}.markdown-content ol,.markdown-content ul{margin-bottom:1em;padding-left:1.5em}.markdown-content ul{list-style-type:disc}.markdown-content ol{list-style-type:decimal}.markdown-content li{margin-bottom:.25em}.markdown-content a{color:var(--bw-highlight-color);text-decoration:underline}.markdown-content a:hover{opacity:.8}.markdown-content strong{font-weight:600}.markdown-content em{font-style:italic}.markdown-content code{background:var(--bw-highlight-subtle);border-radius:4px;font-family:monospace;font-size:.9em;padding:.125em .25em}.markdown-content blockquote{border-left:3px solid var(--bw-highlight-color);color:var(--bw-text-muted);margin:1em 0;padding-left:1em}.next-events-skeleton{overflow:hidden;position:relative}.next-events-skeleton:after{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,transparent,hsla(0,0%,100%,.4),transparent);content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}.stripe-element{background:var(--bw-surface-color);border:1px solid var(--bw-border-color);border-radius:var(--bw-border-radius-small);padding:12px;transition:border-color .2s ease,box-shadow .2s ease}.stripe-element:focus-within{border-color:var(--bw-highlight-color);box-shadow:0 0 0 3px var(--bw-highlight-muted)}.backdrop{backdrop-filter:blur(4px);background-color:rgba(0,0,0,.5);inset:0;position:fixed}.accordion-content{overflow:hidden;transition:max-height .3s ease-out}.accordion-trigger{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none}.accordion-trigger[data-state=open] .accordion-chevron{transform:rotate(180deg)}.accordion-chevron{transition:transform .2s ease}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:\"*\";inherits:false}@property --tw-rotate-y{syntax:\"*\";inherits:false}@property --tw-rotate-z{syntax:\"*\";inherits:false}@property --tw-skew-x{syntax:\"*\";inherits:false}@property --tw-skew-y{syntax:\"*\";inherits:false}@property --tw-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:\"*\";inherits:false}@property --tw-gradient-from{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:\"<color>\";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:\"*\";inherits:false}@property --tw-gradient-via-stops{syntax:\"*\";inherits:false}@property --tw-gradient-from-position{syntax:\"<length-percentage>\";inherits:false;initial-value:0}@property --tw-gradient-via-position{syntax:\"<length-percentage>\";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:\"<length-percentage>\";inherits:false;initial-value:100%}@property --tw-leading{syntax:\"*\";inherits:false}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-tracking{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-blur{syntax:\"*\";inherits:false}@property --tw-brightness{syntax:\"*\";inherits:false}@property --tw-contrast{syntax:\"*\";inherits:false}@property --tw-grayscale{syntax:\"*\";inherits:false}@property --tw-hue-rotate{syntax:\"*\";inherits:false}@property --tw-invert{syntax:\"*\";inherits:false}@property --tw-opacity{syntax:\"*\";inherits:false}@property --tw-saturate{syntax:\"*\";inherits:false}@property --tw-sepia{syntax:\"*\";inherits:false}@property --tw-drop-shadow{syntax:\"*\";inherits:false}@property --tw-drop-shadow-color{syntax:\"*\";inherits:false}@property --tw-drop-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:\"*\";inherits:false}@property --tw-backdrop-blur{syntax:\"*\";inherits:false}@property --tw-backdrop-brightness{syntax:\"*\";inherits:false}@property --tw-backdrop-contrast{syntax:\"*\";inherits:false}@property --tw-backdrop-grayscale{syntax:\"*\";inherits:false}@property --tw-backdrop-hue-rotate{syntax:\"*\";inherits:false}@property --tw-backdrop-invert{syntax:\"*\";inherits:false}@property --tw-backdrop-opacity{syntax:\"*\";inherits:false}@property --tw-backdrop-saturate{syntax:\"*\";inherits:false}@property --tw-backdrop-sepia{syntax:\"*\";inherits:false}@property --tw-duration{syntax:\"*\";inherits:false}@property --tw-ease{syntax:\"*\";inherits:false}@property --tw-scale-x{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-y{syntax:\"*\";inherits:false;initial-value:1}@property --tw-scale-z{syntax:\"*\";inherits:false;initial-value:1}@keyframes spin{to{transform:rotate(1turn)}}@keyframes pulse{50%{opacity:.5}}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}";
|
|
12722
|
+
var css_248z = ".booking-widget-container{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;color:var(--bw-text-color,#1e293b);direction:ltr;display:block;font-family:var(--bw-font-family,system-ui,-apple-system,sans-serif);font-size:var(--bw-font-size,14px);isolation:isolate;line-height:1.5;position:relative;text-align:left}.booking-widget-container *,.booking-widget-container :after,.booking-widget-container :before{box-sizing:border-box;margin:0;padding:0}.booking-widget-container input,.booking-widget-container select,.booking-widget-container textarea{font-family:inherit;font-size:inherit;line-height:inherit}.booking-widget-container button{background:none;border:none;cursor:pointer;font-family:inherit;font-size:inherit}.booking-widget-container a{color:inherit;text-decoration:none}.booking-widget-container img{display:block;height:auto;max-width:100%;vertical-align:middle}.booking-widget-container ol,.booking-widget-container ul{list-style:none}.booking-widget-container h1,.booking-widget-container h2,.booking-widget-container h3,.booking-widget-container h4,.booking-widget-container h5,.booking-widget-container h6{font-size:inherit;font-weight:inherit}#booking-widget-portal{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:var(--bw-text-color,#1e293b);direction:ltr;font-family:var(--bw-font-family,system-ui,-apple-system,sans-serif);font-size:var(--bw-font-size,14px);isolation:isolate;line-height:1.5;text-align:left}#booking-widget-portal *,#booking-widget-portal :after,#booking-widget-portal :before{box-sizing:border-box}#booking-widget-portal-root{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:var(--bw-text-color,#1e293b);font-family:var(--bw-font-family,system-ui,-apple-system,sans-serif);font-size:var(--bw-font-size,14px);line-height:1.5}:root{--bw-highlight-color:#00b1aa;--bw-highlight-color-rgb:0,177,170;--bw-background-color:#f8fdfe;--bw-surface-color:#fff;--bw-text-color:#0e7490;--bw-text-muted:rgba(14,116,144,.7);--bw-border-color:#bae6fd;--bw-success-color:#38bdf8;--bw-warning-color:#fbbf24;--bw-error-color:#f43f5e;--bw-border-radius:18px;--bw-border-radius-small:calc(var(--bw-border-radius)*0.8);--bw-spacing:16px;--bw-spacing-large:24px;--bw-font-family:\"Inter\",system-ui,sans-serif;--bw-font-size:14px;--bw-font-size-large:18px;--bw-font-size-small:12px;--bw-shadow-md:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);--bw-shadow-lg:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);--bw-highlight-muted:rgba(0,177,170,.1);--bw-highlight-subtle:rgba(0,177,170,.05);--bw-text-subtle:rgba(14,116,144,.4)}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes shimmer{0%{transform:translateX(-100%)}to{transform:translateX(100%)}}@keyframes promo-wave{0%,to{transform:translateX(0) translateY(0)}25%{transform:translateX(5px) translateY(-3px)}50%{transform:translateX(0) translateY(-5px)}75%{transform:translateX(-5px) translateY(-3px)}}@keyframes promo-float{0%,to{transform:translateY(0)}50%{transform:translateY(-8px)}}@keyframes promo-shimmer{0%{background-position:-200%}to{background-position:200%}}@keyframes promo-sparkle{0%,to{opacity:.3;transform:scale(1)}50%{opacity:1;transform:scale(1.2)}}@keyframes promo-snow{0%{opacity:0;transform:translateY(-10px) rotate(0deg)}10%{opacity:1}90%{opacity:1}to{opacity:0;transform:translateY(350px) rotate(1turn)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}@keyframes slide-in-right{0%{opacity:0;transform:translateX(100%)}to{opacity:1;transform:translateX(0)}}@keyframes slide-out-right{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(100%)}}@keyframes slide-in-up{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes scale-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.animate-spin{animation:spin 1s linear infinite}.animate-shimmer{animation:shimmer 2s infinite}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.animate-fade-in{animation:fade-in .2s ease-out}.animate-slide-in-up{animation:slide-in-up .3s ease-out}.animate-scale-in{animation:scale-in .2s ease-out}.skeleton-shimmer{overflow:hidden;position:relative}.skeleton-shimmer:after{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,transparent,hsla(0,0%,100%,.3),transparent);content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}@media (max-width:768px){.sidebar-mobile{border-radius:0!important;max-width:100%!important;width:100%!important}}@media (max-width:600px){.event-type-list{gap:12px!important;padding:8px!important}.event-type-card{flex:1 1 100%!important;max-width:100%!important;padding:0!important}.event-type-img{height:160px!important}.event-type-title{font-size:1.1rem!important}.event-type-desc{font-size:.8rem!important;max-height:100px!important;min-height:100px!important}.event-type-content{padding:16px 24px!important}}.event-type-markdown{overflow:visible!important}.event-type-markdown p{color:var(--bw-text-muted);font-family:var(--bw-font-family);line-height:1.6;margin:0 0 8px}.event-type-markdown p:last-child{margin-bottom:0}.event-type-markdown h2{font-size:18px!important;font-weight:700!important;margin:12px 0 6px!important}.event-type-markdown h2,.event-type-markdown h3{color:var(--bw-text-color)!important;line-height:1.3!important}.event-type-markdown h3{font-size:16px!important;font-weight:600!important;margin:10px 0 4px!important}.event-type-markdown strong{color:var(--bw-text-color);font-weight:600}.event-type-markdown em{font-style:italic}.event-type-markdown u{text-decoration:underline}.event-type-markdown ul{list-style:none!important;margin:6px 0!important;padding:0 0 0 24px!important;position:relative!important}.event-type-markdown ul li{color:var(--bw-text-muted)!important;font-family:var(--bw-font-family)!important;margin-bottom:2px!important;padding-left:0!important;position:relative!important}.event-type-markdown ul li:before{color:var(--bw-text-color)!important;content:\"•\"!important;font-weight:700!important;left:-16px!important;position:absolute!important;top:0!important}.event-type-markdown ol{counter-reset:list-counter!important;list-style:none!important;margin:6px 0!important;padding:0 0 0 24px!important;position:relative!important}.event-type-markdown ol li{color:var(--bw-text-muted)!important;counter-increment:list-counter!important;font-family:var(--bw-font-family)!important;margin-bottom:2px!important;padding-left:0!important;position:relative!important}.event-type-markdown ol li:before{color:var(--bw-text-color)!important;content:counter(list-counter) \".\"!important;font-weight:700!important;left:-20px!important;position:absolute!important;top:0!important}.event-type-markdown blockquote{border-left:2px solid var(--bw-border-color);color:var(--bw-text-muted);font-style:italic;margin:4px 0;padding-left:12px}.event-type-markdown a{color:var(--bw-highlight-color);text-decoration:underline}.markdown-content h1,.markdown-content h2,.markdown-content h3,.markdown-content h4,.markdown-content h5,.markdown-content h6{color:var(--bw-text-color);font-weight:600;margin-bottom:.5em}.markdown-content h1{font-size:1.5em}.markdown-content h2{font-size:1.25em}.markdown-content h3{font-size:1.1em}.markdown-content p{line-height:1.6;margin-bottom:1em}.markdown-content ol,.markdown-content ul{margin-bottom:1em;padding-left:1.5em}.markdown-content ul{list-style-type:disc}.markdown-content ol{list-style-type:decimal}.markdown-content li{margin-bottom:.25em}.markdown-content a{color:var(--bw-highlight-color);text-decoration:underline}.markdown-content a:hover{opacity:.8}.markdown-content strong{font-weight:600}.markdown-content em{font-style:italic}.markdown-content code{background:var(--bw-highlight-subtle);border-radius:4px;font-family:monospace;font-size:.9em;padding:.125em .25em}.markdown-content blockquote{border-left:3px solid var(--bw-highlight-color);color:var(--bw-text-muted);margin:1em 0;padding-left:1em}.print-only{display:none}.print-hidden{display:block}@media print{.print-only{display:block}.print-hidden{display:none!important}.print-booking-header{border-bottom:2px solid #000;display:block;margin-bottom:24px;padding-bottom:16px;text-align:center}.print-booking-header h1{font-size:24px;margin:0 0 8px}.print-booking-header .subtitle{color:#666;font-size:14px}.print-booking-card{border:1px solid #ccc;border-radius:8px;margin-bottom:16px;padding:16px;page-break-inside:avoid}.print-section-title{border-bottom:1px solid #ddd;display:block;font-size:16px;font-weight:600;margin-bottom:12px;padding-bottom:8px}.print-detail-grid{display:grid;gap:12px;grid-template-columns:1fr 1fr}.print-detail-item{margin-bottom:8px}.print-detail-label{color:#666;font-size:12px;margin-bottom:4px}.print-detail-value{font-size:14px;font-weight:600}.print-status-badge{border-radius:9999px;display:inline-block;font-size:12px;font-weight:600;padding:4px 12px}.print-status-paid{background-color:#dcfce7;color:#166534;display:inline-block}.print-participant{align-items:center;background-color:#f9fafb;border-radius:4px;display:flex;justify-content:space-between;margin-bottom:8px;padding:8px}.print-participant-name{font-weight:600}.print-participant-age{color:#666;font-size:12px}.print-payment-summary{display:block}.print-payment-row{border-bottom:1px solid #eee;display:flex;justify-content:space-between;padding:4px 0}.print-payment-row:last-child{border-bottom:none;font-weight:600}.print-footer{border-top:1px solid #ddd;color:#666;display:block;font-size:12px;margin-top:24px;padding-top:16px;text-align:center}.print-footer p{margin:4px 0}}";
|
|
10563
12723
|
styleInject(css_248z);
|
|
10564
12724
|
|
|
10565
12725
|
// Export init function for vanilla JS usage
|