@happychef/reservation-sidebar 2.0.8 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.js +1342 -171
  2. package/dist/index.mjs +1313 -142
  3. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -1,18 +1,20 @@
1
1
  'use strict';
2
2
 
3
- var React = require('react');
3
+ var React9 = require('react');
4
+ var framerMotion = require('framer-motion');
5
+ var moment2 = require('moment-timezone');
4
6
  var algorithm = require('@happychef/algorithm');
7
+ var luxon = require('luxon');
8
+ var axios = require('axios');
5
9
  var Lottie = require('lottie-react');
6
10
  var fa = require('react-icons/fa');
7
- var axios = require('axios');
8
- var moment2 = require('moment-timezone');
9
11
 
10
12
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
11
13
 
12
- var React__default = /*#__PURE__*/_interopDefault(React);
13
- var Lottie__default = /*#__PURE__*/_interopDefault(Lottie);
14
- var axios__default = /*#__PURE__*/_interopDefault(axios);
14
+ var React9__default = /*#__PURE__*/_interopDefault(React9);
15
15
  var moment2__default = /*#__PURE__*/_interopDefault(moment2);
16
+ var axios__default = /*#__PURE__*/_interopDefault(axios);
17
+ var Lottie__default = /*#__PURE__*/_interopDefault(Lottie);
16
18
 
17
19
  var __create = Object.create;
18
20
  var __defProp = Object.defineProperty;
@@ -4050,7 +4052,7 @@ var require_nl = __commonJS({
4050
4052
  "node_modules/moment/locale/nl.js"(exports$1, module) {
4051
4053
  (function(global, factory) {
4052
4054
  typeof exports$1 === "object" && typeof module !== "undefined" && typeof __require === "function" ? factory(require_moment()) : typeof define === "function" && define.amd ? define(["../moment"], factory) : factory(global.moment);
4053
- })(exports$1, (function(moment3) {
4055
+ })(exports$1, (function(moment7) {
4054
4056
  var monthsShortWithDots = "jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"), monthsShortWithoutDots = "jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"), monthsParse = [
4055
4057
  /^jan/i,
4056
4058
  /^feb/i,
@@ -4065,7 +4067,7 @@ var require_nl = __commonJS({
4065
4067
  /^nov/i,
4066
4068
  /^dec/i
4067
4069
  ], monthsRegex = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;
4068
- var nl = moment3.defineLocale("nl", {
4070
+ var nl = moment7.defineLocale("nl", {
4069
4071
  months: "januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split(
4070
4072
  "_"
4071
4073
  ),
@@ -4161,24 +4163,1126 @@ function styleInject(css, { insertAt } = {}) {
4161
4163
  }
4162
4164
  }
4163
4165
 
4166
+ // src/components/ReservationStepOne/css/valueSelector.css
4167
+ styleInject(".new-reservation-page .value-selector {\n display: flex;\n flex-direction: column;\n gap: 15px;\n margin-bottom: 20px;\n}\n.new-reservation-page .non-absolute {\n position: relative !important;\n}\n.new-reservation-page .non-absolute::before {\n background: none;\n}\n.new-reservation-page .predefined-values {\n display: flex;\n gap: 10px;\n}\n.new-reservation-page .predefined-value-button {\n flex: 1;\n padding: 10px;\n border: 1px solid #ccc;\n border-radius: var(--border-radius);\n background-color: var(--color-white);\n cursor: pointer;\n font-size: 1rem;\n transition: background-color 0.3s ease;\n}\n.new-reservation-page .predefined-value-button.active,\n.new-reservation-page .predefined-value-button:hover {\n background-color: var(--color-blue);\n color: var(--color-white);\n}\n.new-reservation-page .slider-container {\n display: flex;\n align-items: center;\n gap: 15px;\n}\n.new-reservation-page .slider {\n flex: 1;\n appearance: none;\n -webkit-appearance: none;\n height: 5px;\n background: #ddd;\n border-radius: 5px;\n outline: none;\n}\n.new-reservation-page .slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 20px;\n height: 20px;\n background: var(--color-blue);\n cursor: pointer;\n border-radius: 50%;\n}\n.new-reservation-page .value-input {\n width: 80px;\n padding: 10px;\n border: 1px solid #ccc;\n border-radius: var(--border-radius);\n font-size: 1rem;\n}\n");
4168
+
4169
+ // src/components/ReservationStepOne/ValueSelector.js
4170
+ var ValueSelectorGuests = ({ setGuests, value: value2, onChange }) => {
4171
+ const predefinedValues = [1, 2, 3, "4+"];
4172
+ const [selectedValue, setSelectedValue] = React9.useState(value2 || "");
4173
+ const [showSlider, setShowSlider] = React9.useState(false);
4174
+ const handlePredefinedValueClick = (val) => {
4175
+ if (val === "4+") {
4176
+ setShowSlider(true);
4177
+ setSelectedValue(4);
4178
+ setGuests(4);
4179
+ onChange({ target: { name: "guests", value: 4 } });
4180
+ } else {
4181
+ setShowSlider(false);
4182
+ setSelectedValue(val);
4183
+ setGuests(val);
4184
+ onChange({ target: { name: "guests", value: val } });
4185
+ }
4186
+ };
4187
+ const handleSliderChange = (e) => {
4188
+ const val = e.target.value;
4189
+ setSelectedValue(val);
4190
+ setGuests(val);
4191
+ onChange({ target: { name: "guests", value: val } });
4192
+ };
4193
+ const handleInputChange = (e) => {
4194
+ const val = e.target.value;
4195
+ setSelectedValue(val);
4196
+ setGuests(val);
4197
+ onChange({ target: { name: "guests", value: val } });
4198
+ };
4199
+ return /* @__PURE__ */ React9__default.default.createElement("div", { className: "value-selector", translate: "no" }, /* @__PURE__ */ React9__default.default.createElement("div", { className: "predefined-values" }, predefinedValues.map((val) => /* @__PURE__ */ React9__default.default.createElement(
4200
+ "button",
4201
+ {
4202
+ key: val,
4203
+ type: "button",
4204
+ className: `predefined-value-button ${selectedValue == val || val === "4+" && showSlider ? "active" : ""}`,
4205
+ onClick: () => handlePredefinedValueClick(val)
4206
+ },
4207
+ val === "4+" ? "4+" : `${val} ${val === 1 ? "p" : "p"}`
4208
+ ))), /* @__PURE__ */ React9__default.default.createElement(framerMotion.AnimatePresence, null, showSlider && /* @__PURE__ */ React9__default.default.createElement(
4209
+ framerMotion.motion.div,
4210
+ {
4211
+ className: "slider-container",
4212
+ initial: { opacity: 0, height: 0 },
4213
+ animate: { opacity: 1, height: "auto" },
4214
+ exit: { opacity: 0, height: 0 }
4215
+ },
4216
+ /* @__PURE__ */ React9__default.default.createElement(
4217
+ "input",
4218
+ {
4219
+ type: "range",
4220
+ min: "4",
4221
+ max: "15",
4222
+ step: "1",
4223
+ value: selectedValue,
4224
+ onChange: handleSliderChange,
4225
+ className: "slider non-absolute"
4226
+ }
4227
+ ),
4228
+ /* @__PURE__ */ React9__default.default.createElement(
4229
+ "input",
4230
+ {
4231
+ type: "number",
4232
+ name: "guests",
4233
+ value: selectedValue,
4234
+ onChange: handleInputChange,
4235
+ className: "value-input",
4236
+ min: "4",
4237
+ max: "100",
4238
+ step: "1"
4239
+ }
4240
+ )
4241
+ )));
4242
+ };
4243
+ var ValueSelector_default = ValueSelectorGuests;
4244
+
4245
+ // src/components/ReservationStepOne/Calendar.js
4246
+ __toESM(require_nl());
4247
+ var isWeekInPast = (weekStartDate) => {
4248
+ const today = moment2__default.default().tz("Europe/Brussels").startOf("day");
4249
+ const weekEndDate = weekStartDate.clone().add(6, "days").endOf("day");
4250
+ return weekEndDate.isBefore(today);
4251
+ };
4252
+ var isSameDay = (date1, date2) => date1.isSame(date2, "day");
4253
+
4254
+ // src/components/ReservationStepOne/css/calendar.css
4255
+ styleInject(".new-reservation-page .calendar-container {\n position: relative;\n width: 100%;\n}\n.new-reservation-page .calendar-container .calendar-display {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: 10px;\n background-color: #fff;\n border: #ccc 1px solid;\n cursor: pointer;\n user-select: none;\n text-align: left;\n border-radius: 5px;\n}\n.new-reservation-page .calendar-container .calendar-display span:first-child {\n flex-grow: 1;\n}\n.new-reservation-page .calendar-container .calendar {\n position: absolute;\n z-index: 1000;\n width: 100%;\n background-color: rgba(255, 255, 255, 1);\n border: 1px solid #ccc;\n margin-top: 5px;\n padding: 10px;\n border-radius: 10px;\n animation: fadeInCalendar 0.3s ease-in-out;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);\n}\n@keyframes fadeInCalendar {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n.new-reservation-page .calendar-container .availability-hold-btn {\n font-size: 10px;\n}\n.new-reservation-page .calendar-container .calendar-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px;\n gap: 8px;\n flex-wrap: wrap;\n}\n.new-reservation-page .calendar-container .calendar-header button {\n background-color: transparent;\n border: none;\n cursor: pointer;\n font-size: 18px;\n}\n.new-reservation-page .calendar-container .calendar-header span {\n font-size: 15px;\n color: gray;\n font-weight: 500;\n}\n.new-reservation-page .calendar-container .calendar-weeks-wrapper {\n overflow: hidden;\n position: relative;\n width: 100%;\n}\n.new-reservation-page .calendar-container .calendar-table {\n width: 100%;\n border-collapse: collapse;\n}\n.new-reservation-page .calendar-container .calendar-table th,\n.new-reservation-page .calendar-container .calendar-table td {\n width: 14.28%;\n text-align: center;\n padding: 5px;\n}\n.calendar-container .calendar-table th {\n color: #666;\n font-weight: normal;\n padding-bottom: 10px;\n}\n.new-reservation-page .calendar-container .calendar-table td {\n vertical-align: middle;\n cursor: pointer;\n border: none;\n opacity: 1;\n position: relative;\n}\n.new-reservation-page .calendar-container .calendar-table td.empty-day {\n cursor: default;\n}\n.new-reservation-page .calendar-container .calendar-table td:hover .day-square.available {\n transform: scale(1.05);\n}\n.new-reservation-page .calendar-container .day-square {\n position: relative;\n width: 38px;\n height: 38px;\n border-radius: 4px;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n transition: all 0.2s ease;\n font-size: 16px;\n margin: 0 auto;\n}\n.new-reservation-page .calendar-container .day-number {\n line-height: 1;\n z-index: 2;\n}\n.new-reservation-page .calendar-container .available .day-square {\n background-color: #ccffcc;\n color: #006600;\n}\n.new-reservation-page .calendar-container .available:hover .day-square {\n background-color: #b3ffb3;\n}\n.new-reservation-page .calendar-container .available:active .day-square {\n background-color: #99ff99;\n}\n.new-reservation-page .calendar-container .unavailable .day-square {\n background-color: rgba(139, 0, 0, 0.13);\n color: darkred;\n}\n.new-reservation-page .calendar-container .gray-out .day-square {\n background-color: #e0e0e0;\n color: #999;\n cursor: not-allowed;\n}\n.new-reservation-page .calendar-container .selected .day-square {\n background-color: #006600;\n color: #ccffcc;\n}\n.new-reservation-page .calendar-container .calendar-table td.unavailable,\n.new-reservation-page .calendar-container .calendar-table td.gray-out {\n cursor: not-allowed;\n}\n.new-reservation-page .calendar-container .calendar-table td.unavailable:hover .day-square,\n.new-reservation-page .calendar-container .calendar-table td.gray-out:hover .day-square {\n transform: none;\n}\n.new-reservation-page .calendar-container .calendar-table td {\n border: none;\n}\n.new-reservation-page .calendar-container .arrow {\n margin-left: auto;\n color: gray;\n display: flex;\n align-items: center;\n}\n.new-reservation-page .calendar-container .available .availability-badge {\n background: #38a169;\n}\n.new-reservation-page .calendar-container .selected .availability-badge {\n background: #2d3748;\n}\n@media screen and (max-width: 900px) {\n .calendar-container .day-square {\n width: 35px !important;\n height: 35px !important;\n font-size: 15px !important;\n }\n .calendar-container .calendar-header span {\n font-size: 12px;\n }\n .new-reservation-page .calendar-container .availability-toggle-btn {\n padding: 5px 8px;\n font-size: 11px;\n }\n}\n");
4256
+
4257
+ // src/components/ReservationStepOne/translations.json
4258
+ var translations_default = {
4259
+ nl: {
4260
+ reservationStepOne: {
4261
+ errors: {
4262
+ openingHoursNotSet: "Openingstijden niet ingesteld.",
4263
+ clickHereToSet: "Klik hier om uw openingsuren in te stellen."
4264
+ },
4265
+ modes: {
4266
+ withLimits: "Met Limieten",
4267
+ unlimited: "Onbeperkt",
4268
+ openingHours: "Openingsuren",
4269
+ free: "Vrij"
4270
+ },
4271
+ fields: {
4272
+ time: "Tijd"
4273
+ },
4274
+ messages: {
4275
+ searchingTables: "Beschikbare tafels zoeken...",
4276
+ noTablesAvailable: "Geen specifieke tafels beschikbaar voor deze selectie."
4277
+ },
4278
+ warnings: {
4279
+ unlimitedMode: "Onbeperkt zal geen rekening houden met maximum limieten."
4280
+ }
4281
+ },
4282
+ calendar: {
4283
+ selectDatePlaceholder: "Selecteer een datum",
4284
+ today: "Vandaag",
4285
+ tomorrow: "Morgen",
4286
+ prevWeek: "Vorige week",
4287
+ nextWeek: "Volgende week",
4288
+ dayHeaders: ["Ma", "Di", "Wo", "Do", "Vr", "Za", "Zo"],
4289
+ seatsQuestion: "Zitplaatsen?"
4290
+ },
4291
+ timeSelector: {
4292
+ shifts: {
4293
+ breakfast: "Ontbijt",
4294
+ lunch: "Lunch",
4295
+ dinner: "Diner"
4296
+ },
4297
+ selectMeal: "Selecteer een maaltijd",
4298
+ selectTime: "Selecteer een tijd",
4299
+ noDateSelected: "Selecteer eerst een datum.",
4300
+ noTimes: "Geen beschikbare tijden.",
4301
+ back: "Terug"
4302
+ },
4303
+ tableSelector: {
4304
+ label: "Selecteer beschikbare tafel(s):",
4305
+ table: "Tafel",
4306
+ max: "Max",
4307
+ noTables: "Geen specifieke tafels beschikbaar voor deze tijd/gasten combinatie."
4308
+ }
4309
+ },
4310
+ en: {
4311
+ reservationStepOne: {
4312
+ errors: {
4313
+ openingHoursNotSet: "Opening hours not set.",
4314
+ clickHereToSet: "Click here to set your opening hours."
4315
+ },
4316
+ modes: {
4317
+ withLimits: "With Limits",
4318
+ unlimited: "Unlimited",
4319
+ openingHours: "Opening Hours",
4320
+ free: "Free"
4321
+ },
4322
+ fields: {
4323
+ time: "Time"
4324
+ },
4325
+ messages: {
4326
+ searchingTables: "Searching for available tables...",
4327
+ noTablesAvailable: "No specific tables available for this selection."
4328
+ },
4329
+ warnings: {
4330
+ unlimitedMode: "Unlimited will not take into account maximum limits."
4331
+ }
4332
+ },
4333
+ calendar: {
4334
+ selectDatePlaceholder: "Select a date",
4335
+ today: "Today",
4336
+ tomorrow: "Tomorrow",
4337
+ prevWeek: "Previous week",
4338
+ nextWeek: "Next week",
4339
+ dayHeaders: ["M", "T", "W", "T", "F", "S", "S"],
4340
+ seatsQuestion: "Seating?"
4341
+ },
4342
+ timeSelector: {
4343
+ shifts: {
4344
+ breakfast: "Breakfast",
4345
+ lunch: "Lunch",
4346
+ dinner: "Dinner"
4347
+ },
4348
+ selectMeal: "Select a meal",
4349
+ selectTime: "Select a time",
4350
+ noDateSelected: "Please select a date first.",
4351
+ noTimes: "No available times.",
4352
+ back: "Back"
4353
+ },
4354
+ tableSelector: {
4355
+ label: "Select available table(s):",
4356
+ table: "Table",
4357
+ max: "Max",
4358
+ noTables: "No specific tables available for this time/guest combination."
4359
+ }
4360
+ },
4361
+ fr: {
4362
+ reservationStepOne: {
4363
+ errors: {
4364
+ openingHoursNotSet: "Horaires non d\xE9finies.",
4365
+ clickHereToSet: "Cliquez ici pour d\xE9finir vos horaires."
4366
+ },
4367
+ modes: {
4368
+ withLimits: "Avec Limites",
4369
+ unlimited: "Illimit\xE9",
4370
+ openingHours: "Horaires",
4371
+ free: "Libre"
4372
+ },
4373
+ fields: {
4374
+ time: "Heure"
4375
+ },
4376
+ messages: {
4377
+ searchingTables: "Recherche de tables disponibles...",
4378
+ noTablesAvailable: "Aucune table sp\xE9cifique disponible pour cette s\xE9lection."
4379
+ },
4380
+ warnings: {
4381
+ unlimitedMode: "Illimit\xE9 ne tiendra pas compte des limites maximales."
4382
+ }
4383
+ },
4384
+ calendar: {
4385
+ selectDatePlaceholder: "S\xE9lectionnez une date",
4386
+ today: "Aujourd'hui",
4387
+ tomorrow: "Demain",
4388
+ prevWeek: "Semaine pr\xE9c\xE9dente",
4389
+ nextWeek: "Semaine suivante",
4390
+ dayHeaders: ["Lu", "Ma", "Me", "Je", "Ve", "Sa", "Di"],
4391
+ seatsQuestion: "Places ?"
4392
+ },
4393
+ timeSelector: {
4394
+ shifts: {
4395
+ breakfast: "Petit-d\xE9jeuner",
4396
+ lunch: "D\xE9jeuner",
4397
+ dinner: "D\xEEner"
4398
+ },
4399
+ selectMeal: "S\xE9lectionnez un repas",
4400
+ selectTime: "S\xE9lectionnez une heure",
4401
+ noDateSelected: "Veuillez d'abord s\xE9lectionner une date.",
4402
+ noTimes: "Aucun horaire disponible.",
4403
+ back: "Retour"
4404
+ },
4405
+ tableSelector: {
4406
+ label: "S\xE9lectionnez les table(s) disponibles :",
4407
+ table: "Table",
4408
+ max: "Max",
4409
+ noTables: "Aucune table sp\xE9cifique disponible pour cette combinaison temps/convives."
4410
+ }
4411
+ }
4412
+ };
4413
+
4414
+ // src/components/ReservationStepOne/Calendar.js
4415
+ moment2__default.default.locale("nl");
4416
+ var Calendar = ({
4417
+ guests: guests2,
4418
+ selectedDate,
4419
+ onSelectDate,
4420
+ autoExpand,
4421
+ reservationMode,
4422
+ restaurantData,
4423
+ startDate,
4424
+ onWeekChange,
4425
+ reservations,
4426
+ giftcard,
4427
+ zitplaats
4428
+ }) => {
4429
+ const lang = localStorage.getItem("preferredLanguage") || "nl";
4430
+ const t = translations_default[lang].calendar;
4431
+ const [isExpanded, setIsExpanded] = React9.useState(autoExpand || false);
4432
+ const [showAvailabilities, setShowAvailabilities] = React9.useState(false);
4433
+ const calendarRef = React9.useRef(null);
4434
+ const hideAvailTimerRef = React9.useRef(null);
4435
+ const maxDate = moment2__default.default().tz("Europe/Amsterdam").add(1, "year").endOf("day");
4436
+ React9.useEffect(() => {
4437
+ if (autoExpand) {
4438
+ setIsExpanded(true);
4439
+ }
4440
+ }, [autoExpand]);
4441
+ React9.useEffect(() => {
4442
+ const handleClickOutside = (event) => {
4443
+ if (calendarRef.current && !calendarRef.current.contains(event.target)) {
4444
+ setIsExpanded(false);
4445
+ setShowAvailabilities(false);
4446
+ }
4447
+ };
4448
+ document.addEventListener("mousedown", handleClickOutside);
4449
+ return () => {
4450
+ document.removeEventListener("mousedown", handleClickOutside);
4451
+ };
4452
+ }, []);
4453
+ React9.useEffect(() => {
4454
+ return () => {
4455
+ if (hideAvailTimerRef.current) {
4456
+ clearTimeout(hideAvailTimerRef.current);
4457
+ hideAvailTimerRef.current = null;
4458
+ }
4459
+ };
4460
+ }, []);
4461
+ const showAvailabilityNow = () => {
4462
+ if (hideAvailTimerRef.current) {
4463
+ clearTimeout(hideAvailTimerRef.current);
4464
+ hideAvailTimerRef.current = null;
4465
+ }
4466
+ setShowAvailabilities(true);
4467
+ };
4468
+ const hideAvailabilityAfterDelay = (delay = 1e3) => {
4469
+ if (hideAvailTimerRef.current) {
4470
+ clearTimeout(hideAvailTimerRef.current);
4471
+ }
4472
+ hideAvailTimerRef.current = setTimeout(() => {
4473
+ setShowAvailabilities(false);
4474
+ hideAvailTimerRef.current = null;
4475
+ }, delay);
4476
+ };
4477
+ const computeMaxGuestsForDate = (date, today) => {
4478
+ if (date.isBefore(today, "day") || date.isAfter(maxDate, "day")) {
4479
+ return 0;
4480
+ }
4481
+ const formattedDate = date.format("YYYY-MM-DD");
4482
+ if (showAvailabilities) {
4483
+ const tableSettings2 = restaurantData?.["table-settings"] || {};
4484
+ const isTableAssignmentEnabled2 = tableSettings2.isInstalled === true && tableSettings2.assignmentMode === "automatic";
4485
+ let maxFittable2 = 0;
4486
+ for (let g = 1; g <= 21; g++) {
4487
+ let ok;
4488
+ if (isTableAssignmentEnabled2) {
4489
+ ok = algorithm.isDateAvailableWithTableCheck(
4490
+ restaurantData,
4491
+ formattedDate,
4492
+ reservations,
4493
+ g,
4494
+ giftcard || null
4495
+ );
4496
+ } else {
4497
+ ok = algorithm.isDateAvailable(
4498
+ restaurantData,
4499
+ formattedDate,
4500
+ reservations,
4501
+ g,
4502
+ giftcard || null
4503
+ );
4504
+ }
4505
+ if (ok) maxFittable2 = g;
4506
+ }
4507
+ return maxFittable2;
4508
+ }
4509
+ if (reservationMode === "vrije_keuze") {
4510
+ return 21;
4511
+ }
4512
+ if (reservationMode !== "met_limieten") {
4513
+ const open = algorithm.isDateAvailable(
4514
+ restaurantData,
4515
+ formattedDate,
4516
+ reservations,
4517
+ -1e4,
4518
+ null
4519
+ );
4520
+ return open ? 21 : 0;
4521
+ }
4522
+ const tableSettings = restaurantData?.["table-settings"] || {};
4523
+ const isTableAssignmentEnabled = tableSettings.isInstalled === true && tableSettings.assignmentMode === "automatic" && reservationMode === "met_limieten";
4524
+ let maxFittable = 0;
4525
+ for (let g = 1; g <= 21; g++) {
4526
+ let ok;
4527
+ if (isTableAssignmentEnabled) {
4528
+ ok = algorithm.isDateAvailableWithTableCheck(
4529
+ restaurantData,
4530
+ formattedDate,
4531
+ reservations,
4532
+ g,
4533
+ giftcard || null
4534
+ );
4535
+ } else {
4536
+ ok = algorithm.isDateAvailable(
4537
+ restaurantData,
4538
+ formattedDate,
4539
+ reservations,
4540
+ g,
4541
+ giftcard || null
4542
+ );
4543
+ }
4544
+ if (ok) maxFittable = g;
4545
+ }
4546
+ return maxFittable;
4547
+ };
4548
+ const generateCalendarDays = (currentDate) => {
4549
+ const days2 = [];
4550
+ const today = moment2__default.default().tz("Europe/Amsterdam").startOf("day");
4551
+ const firstDayOfMonth = currentDate.clone().startOf("month");
4552
+ const lastDayOfMonth = currentDate.clone().endOf("month");
4553
+ const tableSettings = restaurantData?.["table-settings"] || {};
4554
+ const isTableAssignmentEnabled = tableSettings.isInstalled === true && tableSettings.assignmentMode === "automatic" && reservationMode === "met_limieten";
4555
+ let date = firstDayOfMonth.clone();
4556
+ while (date.isSameOrBefore(lastDayOfMonth, "day")) {
4557
+ const formattedDate = date.format("YYYY-MM-DD");
4558
+ let isAvailable;
4559
+ if (reservationMode === "vrije_keuze") {
4560
+ isAvailable = date.isBetween(today, maxDate, null, "[]");
4561
+ } else {
4562
+ const adjustedGuests = reservationMode !== "met_limieten" ? -1e4 : guests2;
4563
+ if (isTableAssignmentEnabled) {
4564
+ isAvailable = algorithm.isDateAvailableWithTableCheck(
4565
+ restaurantData,
4566
+ formattedDate,
4567
+ reservations,
4568
+ adjustedGuests,
4569
+ reservationMode === "met_limieten" ? giftcard : null
4570
+ );
4571
+ } else {
4572
+ isAvailable = algorithm.isDateAvailable(
4573
+ restaurantData,
4574
+ formattedDate,
4575
+ reservations,
4576
+ adjustedGuests,
4577
+ reservationMode === "met_limieten" ? giftcard : null
4578
+ );
4579
+ }
4580
+ }
4581
+ const maxGuestsAvailable = computeMaxGuestsForDate(date, today);
4582
+ days2.push({
4583
+ date: date.clone(),
4584
+ isPast: date.isBefore(today, "day"),
4585
+ isFuture: date.isAfter(maxDate, "day"),
4586
+ isAvailable,
4587
+ maxGuestsAvailable
4588
+ });
4589
+ date.add(1, "day");
4590
+ }
4591
+ return days2;
4592
+ };
4593
+ const handleDateClick = (day) => {
4594
+ if (day.isAvailable && !day.isPast && !day.isFuture) {
4595
+ onSelectDate(day.date.format("YYYY-MM-DD"));
4596
+ setIsExpanded(false);
4597
+ setShowAvailabilities(false);
4598
+ }
4599
+ };
4600
+ const handlePrevMonth = () => {
4601
+ const newStartDate = startDate.clone().subtract(1, "month").startOf("month");
4602
+ const today = moment2__default.default().tz("Europe/Amsterdam").startOf("day");
4603
+ if (newStartDate.clone().endOf("month").isBefore(today, "day")) {
4604
+ console.log("Cannot go to previous month. It is in the past.");
4605
+ return;
4606
+ }
4607
+ onWeekChange(newStartDate);
4608
+ };
4609
+ const handleNextMonth = () => {
4610
+ const newStartDate = startDate.clone().add(1, "month").startOf("month");
4611
+ onWeekChange(newStartDate);
4612
+ };
4613
+ const formatDisplayDate = () => {
4614
+ if (!selectedDate) {
4615
+ return t.selectDatePlaceholder;
4616
+ }
4617
+ const selectedMoment = moment2__default.default(selectedDate, "YYYY-MM-DD").tz("Europe/Amsterdam").startOf("day");
4618
+ const today = moment2__default.default().tz("Europe/Amsterdam").startOf("day");
4619
+ const tomorrow = today.clone().add(1, "day");
4620
+ if (selectedMoment.isSame(today, "day")) {
4621
+ return t.today;
4622
+ } else if (selectedMoment.isSame(tomorrow, "day")) {
4623
+ return t.tomorrow;
4624
+ } else {
4625
+ return selectedMoment.format("dddd D MMMM YYYY");
4626
+ }
4627
+ };
4628
+ const renderCalendarGrid = (days2) => {
4629
+ const firstDayOfMonth = startDate.clone().startOf("month");
4630
+ const dayOfWeek = firstDayOfMonth.day();
4631
+ const mondayStartDayOfWeek = dayOfWeek === 0 ? 6 : dayOfWeek - 1;
4632
+ const calendarGrid = [];
4633
+ for (let i = 0; i < mondayStartDayOfWeek; i++) {
4634
+ calendarGrid.push(null);
4635
+ }
4636
+ calendarGrid.push(...days2);
4637
+ const totalCells = calendarGrid.length;
4638
+ const weeksNeeded = Math.ceil(totalCells / 7);
4639
+ while (calendarGrid.length < weeksNeeded * 7) {
4640
+ calendarGrid.push(null);
4641
+ }
4642
+ const weeks2 = [];
4643
+ for (let week = 0; week < weeksNeeded; week++) {
4644
+ const weekDays = calendarGrid.slice(week * 7, week * 7 + 7);
4645
+ weeks2.push(weekDays);
4646
+ }
4647
+ return weeks2;
4648
+ };
4649
+ const days = startDate ? generateCalendarDays(startDate) : [];
4650
+ const weeks = startDate ? renderCalendarGrid(days) : [];
4651
+ const dayHeaders = t.dayHeaders;
4652
+ const renderAvailabilityNumber = (value2) => {
4653
+ if (value2 >= 21) return "20+";
4654
+ return String(value2);
4655
+ };
4656
+ return /* @__PURE__ */ React9__default.default.createElement("div", { className: "calendar-container", ref: calendarRef }, /* @__PURE__ */ React9__default.default.createElement(
4657
+ "div",
4658
+ {
4659
+ className: "calendar-display",
4660
+ onClick: () => setIsExpanded(!isExpanded)
4661
+ },
4662
+ /* @__PURE__ */ React9__default.default.createElement("span", null, formatDisplayDate()),
4663
+ /* @__PURE__ */ React9__default.default.createElement("span", { className: "arrow" }, /* @__PURE__ */ React9__default.default.createElement(
4664
+ "svg",
4665
+ {
4666
+ width: "12",
4667
+ height: "12",
4668
+ viewBox: "0 0 24 24",
4669
+ style: {
4670
+ transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)",
4671
+ transition: "transform 0.2s"
4672
+ }
4673
+ },
4674
+ /* @__PURE__ */ React9__default.default.createElement(
4675
+ "path",
4676
+ {
4677
+ d: "M7 10l5 5 5-5",
4678
+ fill: "none",
4679
+ stroke: "currentColor",
4680
+ strokeWidth: "2"
4681
+ }
4682
+ )
4683
+ ))
4684
+ ), isExpanded && startDate && /* @__PURE__ */ React9__default.default.createElement("div", { className: "calendar" }, /* @__PURE__ */ React9__default.default.createElement("div", { className: "calendar-header" }, /* @__PURE__ */ React9__default.default.createElement(
4685
+ "button",
4686
+ {
4687
+ type: "button",
4688
+ onClick: handlePrevMonth,
4689
+ "aria-label": t.prevWeek
4690
+ },
4691
+ "<"
4692
+ ), /* @__PURE__ */ React9__default.default.createElement("span", null, startDate.format("MMMM YYYY")), /* @__PURE__ */ React9__default.default.createElement(
4693
+ "button",
4694
+ {
4695
+ type: "button",
4696
+ onClick: handleNextMonth,
4697
+ "aria-label": t.nextWeek
4698
+ },
4699
+ ">"
4700
+ ), /* @__PURE__ */ React9__default.default.createElement(
4701
+ "button",
4702
+ {
4703
+ type: "button",
4704
+ className: `availability-hold-btn ${showAvailabilities ? "active" : ""}`,
4705
+ "aria-pressed": showAvailabilities,
4706
+ "aria-label": "Houd ingedrukt om beschikbaarheden te tonen",
4707
+ onMouseDown: showAvailabilityNow,
4708
+ onMouseUp: () => hideAvailabilityAfterDelay(1e3),
4709
+ onMouseLeave: () => hideAvailabilityAfterDelay(1e3),
4710
+ onTouchStart: showAvailabilityNow,
4711
+ onTouchEnd: () => hideAvailabilityAfterDelay(1e3),
4712
+ onTouchCancel: () => hideAvailabilityAfterDelay(1e3),
4713
+ onKeyDown: (e) => {
4714
+ if (e.key === " " || e.key === "Enter") showAvailabilityNow();
4715
+ },
4716
+ onKeyUp: (e) => {
4717
+ if (e.key === " " || e.key === "Enter")
4718
+ hideAvailabilityAfterDelay(1e3);
4719
+ },
4720
+ style: {
4721
+ fontSize: "15px",
4722
+ color: "gray",
4723
+ fontWeight: "450",
4724
+ textDecoration: "underline"
4725
+ }
4726
+ },
4727
+ t.seatsQuestion
4728
+ )), /* @__PURE__ */ React9__default.default.createElement("div", { className: "calendar-weeks-wrapper" }, /* @__PURE__ */ React9__default.default.createElement("table", { className: "calendar-table" }, /* @__PURE__ */ React9__default.default.createElement("thead", null, /* @__PURE__ */ React9__default.default.createElement("tr", { translate: "no" }, dayHeaders.map((day, i) => /* @__PURE__ */ React9__default.default.createElement("th", { key: i }, day)))), /* @__PURE__ */ React9__default.default.createElement("tbody", null, weeks.map((week, weekIndex) => /* @__PURE__ */ React9__default.default.createElement("tr", { key: weekIndex, translate: "no" }, week.map((dayObj, dayIndex) => {
4729
+ if (!dayObj) {
4730
+ return /* @__PURE__ */ React9__default.default.createElement("td", { key: dayIndex, className: "empty-day" });
4731
+ }
4732
+ const isSelected = selectedDate && isSameDay(
4733
+ dayObj.date,
4734
+ moment2__default.default(selectedDate, "YYYY-MM-DD").tz(
4735
+ "Europe/Amsterdam"
4736
+ )
4737
+ );
4738
+ const classNames = [];
4739
+ if (dayObj.isPast) {
4740
+ classNames.push("gray-out");
4741
+ } else if (dayObj.isAvailable) {
4742
+ classNames.push("available");
4743
+ } else {
4744
+ classNames.push("unavailable");
4745
+ }
4746
+ if (isSelected) {
4747
+ classNames.push("selected");
4748
+ }
4749
+ return /* @__PURE__ */ React9__default.default.createElement(
4750
+ "td",
4751
+ {
4752
+ key: dayIndex,
4753
+ className: classNames.join(" "),
4754
+ onClick: () => handleDateClick(dayObj),
4755
+ style: {
4756
+ "--animation-order": dayIndex + weekIndex * 7
4757
+ }
4758
+ },
4759
+ /* @__PURE__ */ React9__default.default.createElement(
4760
+ "div",
4761
+ {
4762
+ className: `day-square ${showAvailabilities ? "showing-availabilities" : ""}`
4763
+ },
4764
+ /* @__PURE__ */ React9__default.default.createElement("span", { className: "day-number" }, showAvailabilities ? renderAvailabilityNumber(
4765
+ dayObj.maxGuestsAvailable
4766
+ ) : dayObj.date.date())
4767
+ )
4768
+ );
4769
+ }))))))));
4770
+ };
4771
+ var Calendar_default = Calendar;
4772
+
4773
+ // src/components/ReservationStepOne/DateSelector.js
4774
+ var import_moment = __toESM(require_moment());
4775
+ var DateSelector = ({
4776
+ guests: guests2,
4777
+ formData,
4778
+ handleChange,
4779
+ resetFormDataFields,
4780
+ restaurantData,
4781
+ reservations,
4782
+ startDate,
4783
+ onWeekChange,
4784
+ reservationMode
4785
+ }) => {
4786
+ const handleDateSelect = (date) => {
4787
+ const formatted = (0, import_moment.default)(date).format("YYYY-MM-DD");
4788
+ console.log("Selected date:", formatted);
4789
+ handleChange({ target: { name: "date", value: formatted } });
4790
+ resetFormDataFields(["time"]);
4791
+ };
4792
+ const monthStartDate = startDate ? startDate.clone().startOf("month") : (0, import_moment.default)().startOf("month");
4793
+ return /* @__PURE__ */ React9__default.default.createElement("div", { className: "form-group date-selector-container" }, /* @__PURE__ */ React9__default.default.createElement(
4794
+ Calendar_default,
4795
+ {
4796
+ guests: guests2,
4797
+ selectedDate: formData.date || null,
4798
+ onSelectDate: handleDateSelect,
4799
+ autoExpand: false,
4800
+ reservationMode,
4801
+ restaurantData,
4802
+ startDate: monthStartDate,
4803
+ onWeekChange,
4804
+ reservations,
4805
+ giftcard: formData.giftcard,
4806
+ zitplaats: formData.zitplaats
4807
+ }
4808
+ ));
4809
+ };
4810
+ var DateSelector_default = DateSelector;
4811
+
4812
+ // src/components/ReservationStepOne/css/timeSelector.css
4813
+ styleInject(".new-reservation-page .time-selector-container {\n position: relative;\n}\n.new-reservation-page .time-display {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n padding: 10px;\n background-color: #fff;\n border: #ccc 1px solid;\n cursor: pointer;\n user-select: none;\n text-align: left;\n border-radius: 5px;\n}\n.new-reservation-page .time-display span:first-child {\n flex-grow: 1;\n}\n.new-reservation-page .time-selector {\n position: absolute;\n z-index: 1000;\n width: 100%;\n max-height: 300px;\n overflow-y: auto;\n background-color: rgba(255, 255, 255, 1);\n border: 1px solid #ccc;\n margin-top: 5px;\n padding: 10px;\n border-radius: 10px;\n animation: fadeInTimeSelector 0.3s ease-in-out;\n top: 75px;\n}\n@keyframes fadeInTimeSelector {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n.new-reservation-page .time-period {\n margin-bottom: 15px;\n}\n.new-reservation-page .time-period-label {\n font-weight: bold;\n margin-bottom: 5px;\n}\n.new-reservation-page .time-options {\n display: flex;\n flex-wrap: wrap;\n gap: 5px;\n}\n.new-reservation-page .time-option {\n padding: 8px 12px;\n background-color: #ccffcc;\n color: #006600;\n border-radius: 5px;\n cursor: pointer;\n transition: background-color 0.2s ease;\n}\n.new-reservation-page .time-option:hover {\n background-color: #b3ffb3;\n}\n.new-reservation-page .time-option.selected {\n background-color: #006600;\n color: #ccffcc;\n}\n.new-reservation-page .info-text {\n color: #666;\n font-style: italic;\n}\n.new-reservation-page .arrow {\n margin-left: auto;\n color: gray;\n display: flex;\n align-items: center;\n}\n@media screen and (max-width: 480px) {\n .new-reservation-page .time-option {\n padding: 6px 10px;\n font-size: 14px;\n }\n}\n");
4814
+ var TimeSelector = ({
4815
+ guests: guests2,
4816
+ formData,
4817
+ handleChange,
4818
+ field,
4819
+ selectedDate,
4820
+ expanded,
4821
+ setCurrentExpandedField,
4822
+ restaurantData,
4823
+ reservations,
4824
+ reservationMode
4825
+ }) => {
4826
+ const lang = localStorage.getItem("preferredLanguage") || "nl";
4827
+ const t = translations_default[lang].timeSelector;
4828
+ const [isExpanded, setIsExpanded] = React9.useState(expanded || false);
4829
+ const [availableTimes, setAvailableTimes] = React9.useState([]);
4830
+ const [selectedMealPeriod, setSelectedMealPeriod] = React9.useState(null);
4831
+ const timeSelectorRef = React9.useRef(null);
4832
+ const shifts = {
4833
+ breakfast: { start: "07:00", end: "11:00", label: t.shifts.breakfast },
4834
+ lunch: { start: "11:00", end: "16:00", label: t.shifts.lunch },
4835
+ dinner: { start: "16:00", end: "23:00", label: t.shifts.dinner }
4836
+ };
4837
+ React9.useEffect(() => {
4838
+ if (!selectedDate || !guests2) {
4839
+ setAvailableTimes([]);
4840
+ return;
4841
+ }
4842
+ if (reservationMode === "vrije_keuze") {
4843
+ if (selectedMealPeriod) {
4844
+ const shift = shifts[selectedMealPeriod];
4845
+ const start = luxon.DateTime.fromISO(`${selectedDate}T${shift.start}`, {
4846
+ zone: "Europe/Brussels"
4847
+ });
4848
+ const end = luxon.DateTime.fromISO(`${selectedDate}T${shift.end}`, {
4849
+ zone: "Europe/Brussels"
4850
+ });
4851
+ const times = [];
4852
+ let current = start;
4853
+ while (current < end) {
4854
+ times.push({
4855
+ value: current.toFormat("HH:mm"),
4856
+ label: current.toFormat("HH:mm")
4857
+ });
4858
+ current = current.plus({ minutes: 15 });
4859
+ }
4860
+ setAvailableTimes(times);
4861
+ } else {
4862
+ setAvailableTimes([]);
4863
+ }
4864
+ } else {
4865
+ if (restaurantData && reservations) {
4866
+ const adjustedGuests = reservationMode !== "met_limieten" ? -1e4 : guests2;
4867
+ const tableSettings = restaurantData?.["table-settings"] || {};
4868
+ const shouldUseTableFiltering = reservationMode === "met_limieten" && tableSettings.isInstalled === true && tableSettings.assignmentMode === "automatic";
4869
+ const selectedGiftcard = reservationMode === "met_limieten" ? formData.giftcard : null;
4870
+ const timeblocks = algorithm.getAvailableTimeblocks(
4871
+ restaurantData,
4872
+ selectedDate,
4873
+ reservations,
4874
+ adjustedGuests,
4875
+ selectedGiftcard
4876
+ );
4877
+ const filtered = shouldUseTableFiltering ? algorithm.getAvailableTimeblocksWithTableCheck(
4878
+ restaurantData,
4879
+ selectedDate,
4880
+ timeblocks,
4881
+ adjustedGuests,
4882
+ reservations
4883
+ ) : timeblocks;
4884
+ const times = Object.keys(filtered).map((time) => ({
4885
+ value: time,
4886
+ label: filtered[time].name || time
4887
+ }));
4888
+ times.sort((a, b) => {
4889
+ const [aH, aM] = a.value.split(":").map(Number);
4890
+ const [bH, bM] = b.value.split(":").map(Number);
4891
+ return aH * 60 + aM - (bH * 60 + bM);
4892
+ });
4893
+ setAvailableTimes(times);
4894
+ if (formData[field.id] && !times.some((ti) => ti.value === formData[field.id])) {
4895
+ handleChange({ target: { name: field.id, value: "" } });
4896
+ }
4897
+ } else {
4898
+ setAvailableTimes([]);
4899
+ }
4900
+ }
4901
+ }, [
4902
+ selectedDate,
4903
+ guests2,
4904
+ restaurantData,
4905
+ reservations,
4906
+ reservationMode,
4907
+ field.id,
4908
+ selectedMealPeriod,
4909
+ // only track the specific time value (not the whole formData) to avoid seat-triggered reruns
4910
+ formData[field.id],
4911
+ handleChange
4912
+ ]);
4913
+ React9.useEffect(() => {
4914
+ if (reservationMode === "vrije_keuze") {
4915
+ setSelectedMealPeriod(null);
4916
+ if (formData[field.id]) {
4917
+ handleChange({ target: { name: field.id, value: "" } });
4918
+ }
4919
+ }
4920
+ }, [selectedDate, reservationMode]);
4921
+ const handleTimeSelect = (timeValue) => {
4922
+ handleChange({ target: { name: field.id, value: timeValue } });
4923
+ setIsExpanded(false);
4924
+ setCurrentExpandedField?.(null);
4925
+ };
4926
+ const handleMealPeriodSelect = (period) => {
4927
+ if (selectedMealPeriod !== period && formData[field.id]) {
4928
+ handleChange({ target: { name: field.id, value: "" } });
4929
+ }
4930
+ setSelectedMealPeriod(period);
4931
+ };
4932
+ const formatDisplayTime = () => {
4933
+ if (reservationMode === "vrije_keuze") {
4934
+ if (!selectedMealPeriod) {
4935
+ return t.selectMeal;
4936
+ }
4937
+ if (formData[field.id]) {
4938
+ return `${shifts[selectedMealPeriod].label} \u2013 ${formData[field.id]}`;
4939
+ }
4940
+ return `${shifts[selectedMealPeriod].label} \u2013 ${t.selectTime}`;
4941
+ } else {
4942
+ if (formData[field.id]) {
4943
+ const sel = availableTimes.find(
4944
+ (time) => time.value === formData[field.id]
4945
+ );
4946
+ return sel ? sel.label : t.selectTime;
4947
+ }
4948
+ return t.selectTime;
4949
+ }
4950
+ };
4951
+ if (!field) return null;
4952
+ return /* @__PURE__ */ React9__default.default.createElement("div", { className: "form-group time-selector-container", ref: timeSelectorRef }, !selectedDate ? /* @__PURE__ */ React9__default.default.createElement("p", { className: "info-text" }, t.noDateSelected) : /* @__PURE__ */ React9__default.default.createElement(React9__default.default.Fragment, null, /* @__PURE__ */ React9__default.default.createElement(
4953
+ "div",
4954
+ {
4955
+ className: "time-display",
4956
+ onClick: () => {
4957
+ setIsExpanded(!isExpanded);
4958
+ if (!isExpanded) setCurrentExpandedField?.(field.id);
4959
+ }
4960
+ },
4961
+ /* @__PURE__ */ React9__default.default.createElement("span", null, formatDisplayTime()),
4962
+ /* @__PURE__ */ React9__default.default.createElement("span", { className: "arrow" }, /* @__PURE__ */ React9__default.default.createElement(
4963
+ "svg",
4964
+ {
4965
+ width: "12",
4966
+ height: "12",
4967
+ viewBox: "0 0 24 24",
4968
+ style: {
4969
+ transform: isExpanded ? "rotate(180deg)" : "rotate(0deg)",
4970
+ transition: "transform 0.2s"
4971
+ }
4972
+ },
4973
+ /* @__PURE__ */ React9__default.default.createElement(
4974
+ "path",
4975
+ {
4976
+ d: "M7 10l5 5 5-5",
4977
+ fill: "none",
4978
+ stroke: "currentColor",
4979
+ strokeWidth: "2"
4980
+ }
4981
+ )
4982
+ ))
4983
+ ), isExpanded && /* @__PURE__ */ React9__default.default.createElement("div", { className: "time-selector" }, reservationMode === "vrije_keuze" ? selectedMealPeriod ? /* @__PURE__ */ React9__default.default.createElement("div", { className: "time-period" }, /* @__PURE__ */ React9__default.default.createElement("div", { className: "time-period-label" }, shifts[selectedMealPeriod].label, /* @__PURE__ */ React9__default.default.createElement(
4984
+ "button",
4985
+ {
4986
+ onClick: () => setSelectedMealPeriod(null),
4987
+ style: {
4988
+ marginLeft: "10px",
4989
+ background: "none",
4990
+ border: "none",
4991
+ cursor: "pointer",
4992
+ color: "#006600",
4993
+ fontSize: "0.9rem",
4994
+ padding: 0
4995
+ }
4996
+ },
4997
+ "\u2190 ",
4998
+ t.back
4999
+ )), /* @__PURE__ */ React9__default.default.createElement("div", { className: "time-options" }, availableTimes.length === 0 ? /* @__PURE__ */ React9__default.default.createElement("div", { className: "no-times" }, t.noTimes) : availableTimes.map((time) => /* @__PURE__ */ React9__default.default.createElement(
5000
+ "div",
5001
+ {
5002
+ key: time.value,
5003
+ className: `time-option ${formData[field.id] === time.value ? "selected" : ""}`,
5004
+ onClick: () => handleTimeSelect(time.value)
5005
+ },
5006
+ time.label
5007
+ )))) : /* @__PURE__ */ React9__default.default.createElement("div", { className: "time-options" }, Object.keys(shifts).map((period) => /* @__PURE__ */ React9__default.default.createElement(
5008
+ "div",
5009
+ {
5010
+ key: period,
5011
+ className: `time-option ${selectedMealPeriod === period ? "selected" : ""}`,
5012
+ onClick: () => handleMealPeriodSelect(period)
5013
+ },
5014
+ shifts[period].label
5015
+ ))) : /* @__PURE__ */ React9__default.default.createElement("div", { className: "time-options" }, availableTimes.length === 0 ? /* @__PURE__ */ React9__default.default.createElement("div", { className: "no-times" }, t.noTimes) : availableTimes.map((time) => /* @__PURE__ */ React9__default.default.createElement(
5016
+ "div",
5017
+ {
5018
+ key: time.value,
5019
+ className: `time-option ${formData[field.id] === time.value ? "selected" : ""}`,
5020
+ onClick: () => handleTimeSelect(time.value)
5021
+ },
5022
+ time.label
5023
+ ))))));
5024
+ };
5025
+ var TimeSelector_default = TimeSelector;
5026
+
5027
+ // src/components/ReservationStepOne/css/tableSelector.css
5028
+ styleInject(".new-reservation-page .table-selector-container {\n margin-top: 15px;\n padding: 10px;\n border: 1px solid #eee;\n border-radius: 4px;\n background-color: #f9f9f9;\n}\n.new-reservation-page .table-selector-label {\n display: block;\n margin-bottom: 10px;\n font-weight: bold;\n color: #333;\n font-size: 0.95rem;\n}\n.new-reservation-page .table-options {\n display: flex;\n flex-wrap: wrap;\n gap: 10px;\n}\n.new-reservation-page .table-option {\n display: inline-block;\n margin-right: 15px;\n margin-bottom: 5px;\n padding: 5px 8px;\n border: 1px solid #ccc;\n border-radius: 4px;\n background-color: #fff;\n transition: background-color 0.2s ease;\n}\n.new-reservation-page .table-option label {\n display: flex;\n align-items: center;\n cursor: pointer;\n font-size: 0.9rem;\n color: #555;\n}\n.new-reservation-page .table-option input[type=checkbox] {\n margin-right: 8px;\n cursor: pointer;\n accent-color: var(--primary-color, #006600);\n}\n.new-reservation-page .table-option:has(input[type=checkbox]:checked) {\n background-color: #e0f2e0;\n border-color: #006600;\n}\n.new-reservation-page .table-option:hover {\n background-color: #f0f0f0;\n}\n.new-reservation-page .info-text {\n margin-top: 10px;\n font-size: 0.85rem;\n color: #666;\n}\n.new-reservation-page .selected-tables-info {\n margin-top: 10px;\n font-style: italic;\n}\n.new-reservation-page .info-text.loading-tables {\n font-style: italic;\n color: #006600;\n}\n");
5029
+
5030
+ // src/components/ReservationStepOne/TableSelector.js
5031
+ var TableSelector = ({
5032
+ availableTables = [],
5033
+ isFetching = false,
5034
+ formData = {},
5035
+ handleChange,
5036
+ setFormData
5037
+ // optional fallback if handleChange not provided
5038
+ }) => {
5039
+ const lang = localStorage.getItem("preferredLanguage") || "nl";
5040
+ const troot = translations_default?.[lang]?.tableSelector || {};
5041
+ const t = {
5042
+ label: troot.label || "Tafels",
5043
+ noTables: troot.noTables || "Geen tafels beschikbaar voor deze selectie.",
5044
+ table: troot.table || "Tafel",
5045
+ max: troot.max || "Max"
5046
+ };
5047
+ const selectedNumbers = Array.isArray(formData.selectedTableNumbers) ? formData.selectedTableNumbers : [];
5048
+ const selectedIds = Array.isArray(formData.selectedTableIds) ? formData.selectedTableIds : [];
5049
+ const updateSelection = (nextNums, nextIds) => {
5050
+ if (typeof handleChange === "function") {
5051
+ handleChange({
5052
+ target: {
5053
+ multiple: true,
5054
+ updates: {
5055
+ selectedTableNumbers: nextNums,
5056
+ selectedTableIds: nextIds
5057
+ }
5058
+ }
5059
+ });
5060
+ return;
5061
+ }
5062
+ if (typeof setFormData === "function") {
5063
+ setFormData((prev) => ({
5064
+ ...prev,
5065
+ selectedTableNumbers: nextNums,
5066
+ selectedTableIds: nextIds
5067
+ }));
5068
+ }
5069
+ };
5070
+ const onToggle = (tableNumber) => (e) => {
5071
+ const checked = e.target.checked;
5072
+ const table = availableTables.find((t2) => t2.tableNumber === tableNumber);
5073
+ if (!table) return;
5074
+ let nextNums = [...selectedNumbers];
5075
+ let nextIds = [...selectedIds];
5076
+ if (checked) {
5077
+ if (!nextNums.includes(tableNumber)) nextNums.push(tableNumber);
5078
+ if (!nextIds.includes(table.tableId)) nextIds.push(table.tableId);
5079
+ } else {
5080
+ nextNums = nextNums.filter((n) => n !== tableNumber);
5081
+ nextIds = nextIds.filter((id) => id !== table.tableId);
5082
+ }
5083
+ nextNums.sort((a, b) => a - b);
5084
+ updateSelection(nextNums, nextIds);
5085
+ };
5086
+ if (isFetching) {
5087
+ return /* @__PURE__ */ React9__default.default.createElement("div", { className: "form-group table-selector-container" }, /* @__PURE__ */ React9__default.default.createElement("label", { className: "table-selector-label" }, t.label), /* @__PURE__ */ React9__default.default.createElement("p", { className: "info-text" }, "Laden\u2026"));
5088
+ }
5089
+ if (!availableTables || availableTables.length === 0) {
5090
+ return /* @__PURE__ */ React9__default.default.createElement("div", { className: "form-group table-selector-container" }, /* @__PURE__ */ React9__default.default.createElement("label", { className: "table-selector-label" }, t.label), /* @__PURE__ */ React9__default.default.createElement("p", { className: "info-text" }, t.noTables));
5091
+ }
5092
+ return /* @__PURE__ */ React9__default.default.createElement("div", { className: "form-group table-selector-container" }, /* @__PURE__ */ React9__default.default.createElement("label", { className: "table-selector-label" }, t.label), /* @__PURE__ */ React9__default.default.createElement("div", { className: "table-options" }, availableTables.map((table) => {
5093
+ const number = table.tableNumber;
5094
+ const maxCapacity = table.maxCapacity ?? table.capacity ?? table.seats ?? "-";
5095
+ const checked = selectedNumbers.includes(number);
5096
+ return /* @__PURE__ */ React9__default.default.createElement("div", { key: `${table.tableId || number}`, className: "table-option" }, /* @__PURE__ */ React9__default.default.createElement("label", null, /* @__PURE__ */ React9__default.default.createElement(
5097
+ "input",
5098
+ {
5099
+ type: "checkbox",
5100
+ value: number,
5101
+ checked,
5102
+ onChange: onToggle(number)
5103
+ }
5104
+ ), t.table, " ", number, " (", t.max, ": ", maxCapacity, ")"));
5105
+ })));
5106
+ };
5107
+ var TableSelector_default = TableSelector;
5108
+
4164
5109
  // src/components/ReservationStepOne/css/reservationMode.css
4165
5110
  styleInject(".new-reservation-page .form-row .field-label {\n display: block;\n margin-bottom: 6px;\n font-weight: 600;\n}\n.new-reservation-page .form-row .reservation-mode-buttons {\n margin-top: 0;\n}\n.new-reservation-page .reservation-mode-buttons {\n display: flex;\n gap: 10px;\n margin-top: 10px;\n}\n.new-reservation-page .reservation-mode-button {\n flex: 1;\n padding: 10px;\n border: 1px solid #ccc;\n border-radius: var(--border-radius);\n background-color: var(--color-white);\n cursor: pointer;\n font-size: 1rem;\n transition: background-color 0.3s ease, color 0.3s ease;\n}\n.new-reservation-page .reservation-mode-button.active,\n.new-reservation-page .reservation-mode-button:hover {\n background-color: var(--color-blue);\n color: var(--color-white);\n}\n.new-reservation-page .reservation-modes-container {\n display: flex;\n flex-wrap: wrap;\n margin: 0 -5px;\n width: 100%;\n}\n.new-reservation-page .reservation-mode-button {\n flex: 0 0 calc(50% - 10px);\n margin: 5px;\n padding: 10px;\n box-sizing: border-box;\n text-align: center;\n border: 1px solid #ccc;\n background: #f7f7f7;\n cursor: pointer;\n}\n.new-reservation-page .reservation-mode-button:nth-child(3) {\n flex: 0 0 100%;\n}\n.new-reservation-page .reservation-modes-container {\n display: flex;\n flex-wrap: wrap;\n margin: 0 -5px;\n width: 100%;\n}\n.new-reservation-page .reservation-mode-button {\n flex: 0 0 calc(50% - 10px);\n margin: 5px;\n padding: 10px;\n box-sizing: border-box;\n text-align: center;\n border: 1px solid #ccc;\n background: #f7f7f7;\n cursor: pointer;\n}\n.new-reservation-page .reservation-mode-button.active,\n.new-reservation-page .reservation-mode-button:hover {\n background-color: var(--color-blue);\n color: var(--color-white);\n}\n.new-reservation-page .unlimited-mode-warning {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n margin: 15px 0;\n padding: 12px 15px;\n background-color: #fff3cd;\n border: 1px solid #ffeaa7;\n border-radius: var(--border-radius, 4px);\n border-left: 4px solid #e67e22;\n font-size: 0.9rem;\n line-height: 1.4;\n}\n.new-reservation-page .unlimited-mode-warning .warning-icon {\n color: #e67e22;\n font-size: 1.1rem;\n margin-top: 2px;\n flex-shrink: 0;\n}\n.new-reservation-page .unlimited-mode-warning .warning-text {\n color: #856404;\n margin: 0;\n}\n@media screen and (max-width: 480px) {\n .new-reservation-page .unlimited-mode-warning {\n margin: 10px 0;\n padding: 10px 12px;\n font-size: 0.85rem;\n }\n .new-reservation-page .unlimited-mode-warning .warning-icon {\n font-size: 1rem;\n }\n}\n.new-reservation-page .reservation-sidebar-component {\n position: fixed;\n top: 0;\n right: -400px;\n width: 400px;\n height: 100%;\n background-color: #fff;\n box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);\n z-index: var(--z-index-sidebar-reservation);\n display: flex;\n flex-direction: column;\n overflow-y: auto;\n transition: right 0.3s ease-in-out;\n}\n.new-reservation-page .admin-title {\n text-align: center;\n margin-bottom: 30px;\n}\n.new-reservation-page .reservation-sidebar-component.open {\n right: 0;\n}\n.new-reservation-page .reservation-sidebar-content {\n padding: 20px;\n padding-top: 60px;\n}\n.new-reservation-page .close-sidebar-button {\n position: absolute;\n top: 10px;\n left: 10px;\n background-color: transparent;\n border: none;\n cursor: pointer;\n}\n.new-reservation-page .close-sidebar-button svg {\n color: #000;\n}\n.new-reservation-page .sidebar-section-one,\n.new-reservation-page .sidebar-section-two {\n margin-bottom: 20px;\n}\n.new-reservation-page .reservation-footer {\n margin-top: auto;\n}\n.new-reservation-page .store-reservation-button {\n width: 100%;\n padding: 12px;\n background-color: var(--color-blue);\n color: #fff;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n font-size: 1.1rem;\n}\n.new-reservation-page .open-sidebar-button {\n position: fixed;\n bottom: 20px;\n right: 20px;\n background-color: var(--color-blue);\n color: #fff;\n border: none;\n border-radius: 50%;\n width: 50px;\n height: 50px;\n cursor: pointer;\n z-index: var(--z-index-modal) !important;\n transition: all 0.3s ease;\n}\n.new-reservation-page .open-sidebar-button:hover {\n background-color: var(--color-blue-hover-accent) !important;\n}\n.new-reservation-page .open-sidebar-button svg {\n position: relative;\n top: 2px;\n}\n@media screen and (max-width: 480px) {\n .new-reservation-page .reservation-sidebar-component {\n width: 100%;\n }\n}\n.new-reservation-page .sidebar-section-personeel {\n margin-bottom: 10px;\n}\n");
4166
5111
 
4167
- // src/components/ReservationStepOne/ReservationStepOne.js
5112
+ // src/components/ReservationStepOne/index.js
5113
+ var import_moment2 = __toESM(require_moment());
5114
+ var useApi = () => {
5115
+ const getJwtToken = React9.useCallback(() => {
5116
+ return localStorage.getItem("accessToken");
5117
+ }, []);
5118
+ const get = React9.useCallback(
5119
+ (endpoint, config = {}) => {
5120
+ const { params, ...axiosConfig } = config;
5121
+ const token = getJwtToken();
5122
+ return axios__default.default.get(endpoint, {
5123
+ ...axiosConfig,
5124
+ params,
5125
+ headers: {
5126
+ ...axiosConfig.headers,
5127
+ ...token ? { Authorization: `Bearer ${token}` } : {}
5128
+ }
5129
+ }).then((response) => response.data).catch((error) => {
5130
+ console.error("Error fetching data:", error);
5131
+ throw error;
5132
+ });
5133
+ },
5134
+ [getJwtToken]
5135
+ );
5136
+ const mutate = React9.useCallback(
5137
+ (method, endpoint, data = null, config = {}) => {
5138
+ const token = getJwtToken();
5139
+ return axios__default.default({
5140
+ method,
5141
+ url: endpoint,
5142
+ data,
5143
+ ...config,
5144
+ headers: {
5145
+ ...config.headers,
5146
+ ...token ? { Authorization: `Bearer ${token}` } : {}
5147
+ }
5148
+ }).then((response) => response.data).catch((error) => {
5149
+ console.error(`Error with ${method} request:`, error);
5150
+ throw error;
5151
+ });
5152
+ },
5153
+ [getJwtToken]
5154
+ );
5155
+ const apiMethods = React9.useMemo(
5156
+ () => ({
5157
+ get,
5158
+ post: (endpoint, data, config) => mutate("POST", endpoint, data, config),
5159
+ put: (endpoint, data, config) => mutate("PUT", endpoint, data, config),
5160
+ patch: (endpoint, data, config) => mutate("PATCH", endpoint, data, config),
5161
+ delete: (endpoint, config) => mutate("DELETE", endpoint, null, config)
5162
+ }),
5163
+ [get, mutate]
5164
+ );
5165
+ return apiMethods;
5166
+ };
5167
+ var useApi_default = useApi;
4168
5168
  var ReservationStepOne = ({
4169
5169
  formData,
4170
5170
  errors,
4171
5171
  handleChange,
5172
+ handleStepOneSubmit,
4172
5173
  setFormData,
4173
5174
  timeblocks,
4174
5175
  loadingTimeblocks,
4175
5176
  timeblocksError,
4176
- restaurantData,
4177
- reservations = []
5177
+ restaurantData
4178
5178
  }) => {
4179
- const [availableTables, setAvailableTables] = React.useState([]);
4180
- const [isFetchingTables, setIsFetchingTables] = React.useState(false);
4181
- React.useEffect(() => {
5179
+ const lang = localStorage.getItem("preferredLanguage") || "nl";
5180
+ const t = translations_default[lang].reservationStepOne;
5181
+ const [guests2, setGuests] = React9.useState(formData.guests || 2);
5182
+ const [startDate, setStartDate] = React9.useState(null);
5183
+ const [reservations, setReservations] = React9.useState([]);
5184
+ const api = useApi_default();
5185
+ const [availableTables, setAvailableTables] = React9.useState([]);
5186
+ const [isFetchingTables, setIsFetchingTables] = React9.useState(false);
5187
+ const initializationDone = React9.useRef(false);
5188
+ const resetFormDataFields = React9.useCallback(
5189
+ (fieldsToReset) => {
5190
+ setFormData((prevFormData) => {
5191
+ const newFormData = { ...prevFormData };
5192
+ fieldsToReset.forEach((field) => {
5193
+ newFormData[field] = "";
5194
+ });
5195
+ if (fieldsToReset.includes("date") || fieldsToReset.includes("time") || fieldsToReset.includes("guests")) {
5196
+ newFormData.selectedTableNumbers = [];
5197
+ newFormData.selectedTableIds = [];
5198
+ setAvailableTables([]);
5199
+ }
5200
+ return newFormData;
5201
+ });
5202
+ },
5203
+ [setFormData]
5204
+ );
5205
+ React9.useEffect(() => {
5206
+ const today = (0, import_moment2.default)().tz("Europe/Amsterdam").startOf("day");
5207
+ let firstWeekStart = today.clone().startOf("isoWeek");
5208
+ while (isWeekInPast(firstWeekStart)) {
5209
+ firstWeekStart.add(1, "week");
5210
+ }
5211
+ setStartDate(firstWeekStart);
5212
+ }, []);
5213
+ React9.useEffect(() => {
5214
+ const fetchReservations = async () => {
5215
+ if (startDate && (formData.reservationMode === "met_limieten" || formData.reservationMode === "zonder_regels")) {
5216
+ const tableSettings2 = restaurantData?.["table-settings"] || {};
5217
+ const isAutomaticAssignment = tableSettings2.isInstalled === true && tableSettings2.assignmentMode === "automatic";
5218
+ if (formData.reservationMode === "met_limieten" || formData.reservationMode === "zonder_regels" && isAutomaticAssignment) {
5219
+ const beginDate = startDate.format("YYYY-MM-DD");
5220
+ const endDate = startDate.clone().add(13, "days").format("YYYY-MM-DD");
5221
+ const restaurantId = localStorage.getItem("username");
5222
+ const endpoint = `${window.baseDomain}api/slots/${restaurantId}/${beginDate}/${endDate}`;
5223
+ try {
5224
+ const data = await api.get(endpoint, { noCache: true });
5225
+ setReservations(data || []);
5226
+ } catch (error) {
5227
+ console.error("Error fetching reservations:", error);
5228
+ setReservations([]);
5229
+ }
5230
+ } else {
5231
+ setReservations([]);
5232
+ }
5233
+ } else {
5234
+ setReservations([]);
5235
+ }
5236
+ };
5237
+ fetchReservations();
5238
+ }, [startDate, api, formData.reservationMode, restaurantData]);
5239
+ const handleWeekChange = (newStartDate) => {
5240
+ setStartDate(newStartDate);
5241
+ resetFormDataFields([
5242
+ "date",
5243
+ "time",
5244
+ "selectedTableNumbers",
5245
+ "selectedTableIds"
5246
+ ]);
5247
+ };
5248
+ React9.useEffect(() => {
5249
+ if (!initializationDone.current) {
5250
+ let needsUpdate = false;
5251
+ const updates = {};
5252
+ if (!formData.reservationMode) {
5253
+ updates.reservationMode = "met_limieten";
5254
+ needsUpdate = true;
5255
+ }
5256
+ if (!formData.guests || formData.guests === "") {
5257
+ updates.guests = guests2;
5258
+ needsUpdate = true;
5259
+ }
5260
+ if (!Array.isArray(formData.selectedTableNumbers)) {
5261
+ updates.selectedTableNumbers = [];
5262
+ needsUpdate = true;
5263
+ }
5264
+ if (!Array.isArray(formData.selectedTableIds)) {
5265
+ updates.selectedTableIds = [];
5266
+ needsUpdate = true;
5267
+ }
5268
+ if (needsUpdate) {
5269
+ setTimeout(() => {
5270
+ handleChange({ target: { multiple: true, updates } });
5271
+ }, 0);
5272
+ initializationDone.current = true;
5273
+ } else {
5274
+ initializationDone.current = true;
5275
+ }
5276
+ }
5277
+ }, [
5278
+ formData.reservationMode,
5279
+ formData.guests,
5280
+ formData.selectedTableNumbers,
5281
+ formData.selectedTableIds,
5282
+ guests2,
5283
+ handleChange
5284
+ ]);
5285
+ React9.useEffect(() => {
4182
5286
  const tableSettings2 = restaurantData?.["table-settings"] || {};
4183
5287
  const isAutomaticAssignment = tableSettings2.isInstalled === true && tableSettings2.assignmentMode === "automatic";
4184
5288
  if (isAutomaticAssignment && formData.date && formData.time && formData.guests > 0 && restaurantData && reservations) {
@@ -4240,44 +5344,165 @@ var ReservationStepOne = ({
4240
5344
  formData.guests,
4241
5345
  restaurantData,
4242
5346
  reservations,
5347
+ formData.reservationMode,
4243
5348
  formData.selectedTableNumbers,
4244
5349
  formData.selectedTableIds,
4245
5350
  handleChange
4246
5351
  ]);
5352
+ const handleGuestChange = (event) => {
5353
+ const newGuestCount = parseInt(event.target.value, 10) || 1;
5354
+ setGuests(newGuestCount);
5355
+ handleChange(event);
5356
+ resetFormDataFields(["time", "selectedTableNumbers", "selectedTableIds"]);
5357
+ };
5358
+ React9.useEffect(() => {
5359
+ resetFormDataFields([
5360
+ "date",
5361
+ "time",
5362
+ "selectedTableNumbers",
5363
+ "selectedTableIds"
5364
+ ]);
5365
+ }, [formData.reservationMode, resetFormDataFields]);
5366
+ const handleTopLevelSelection = (mode) => {
5367
+ if (mode === "met_limieten") {
5368
+ handleChange({
5369
+ target: { name: "reservationMode", value: "met_limieten" }
5370
+ });
5371
+ } else if (mode === "onbeperkt_parent") {
5372
+ if (!["zonder_regels", "vrije_keuze"].includes(formData.reservationMode)) {
5373
+ handleChange({
5374
+ target: { name: "reservationMode", value: "zonder_regels" }
5375
+ });
5376
+ }
5377
+ }
5378
+ };
5379
+ const handleSubSelection = (mode) => {
5380
+ handleChange({ target: { name: "reservationMode", value: mode } });
5381
+ };
5382
+ const currentMode = formData.reservationMode;
5383
+ const isFinalMode = ["met_limieten", "zonder_regels", "vrije_keuze"].includes(
5384
+ currentMode
5385
+ );
5386
+ const tableSettings = restaurantData?.["table-settings"] || {};
5387
+ const showTableSelector = isFinalMode && formData.date && formData.time && formData.guests > 0 && tableSettings.isInstalled === true && tableSettings.assignmentMode === "automatic" && availableTables.length > 0;
5388
+ const seatSelectionEnabled = !!restaurantData?.["general-settings"]?.seatSelectionEnabled;
5389
+ const seatOptions = ["Terras", "Restaurant"];
5390
+ const handleSeatPick = (seat) => {
5391
+ setFormData((prev) => ({ ...prev, zitplaats: seat }));
5392
+ };
4247
5393
  if (timeblocksError) {
4248
- return /* @__PURE__ */ React__default.default.createElement("div", null, "Error loading opening hours. Please configure your restaurant opening hours.");
4249
- }
4250
- if (loadingTimeblocks) {
4251
- return /* @__PURE__ */ React__default.default.createElement("div", null, "Loading availability...");
5394
+ return /* @__PURE__ */ React9__default.default.createElement("div", null, t.errors.openingHoursNotSet, " ", /* @__PURE__ */ React9__default.default.createElement(
5395
+ "a",
5396
+ {
5397
+ href: "https://happychef.cloud/#/openinghours/dinner",
5398
+ target: "_blank",
5399
+ rel: "noopener noreferrer",
5400
+ style: { color: "var(--color-blue)", textDecoration: "underline" }
5401
+ },
5402
+ t.errors.clickHereToSet
5403
+ ));
4252
5404
  }
4253
- const tableSettings = restaurantData?.["table-settings"] || {};
4254
- const showTableSelector = formData.date && formData.time && formData.guests > 0 && tableSettings.isInstalled === true && tableSettings.assignmentMode === "automatic" && availableTables.length > 0;
4255
- return /* @__PURE__ */ React__default.default.createElement("div", { className: "reservation-step-one-placeholder" }, /* @__PURE__ */ React__default.default.createElement("p", null, /* @__PURE__ */ React__default.default.createElement("strong", null, "Note:"), " This is a simplified ReservationStepOne component."), /* @__PURE__ */ React__default.default.createElement("p", null, "Uses @happychef/algorithm to calculate available tables based on restaurant data, date, time, guests, and existing reservations."), /* @__PURE__ */ React__default.default.createElement("p", null, "Current form data:"), /* @__PURE__ */ React__default.default.createElement("ul", null, /* @__PURE__ */ React__default.default.createElement("li", null, "Guests: ", formData.guests), /* @__PURE__ */ React__default.default.createElement("li", null, "Date: ", formData.date || "Not selected"), /* @__PURE__ */ React__default.default.createElement("li", null, "Time: ", formData.time || "Not selected"), /* @__PURE__ */ React__default.default.createElement("li", null, "Available tables: ", availableTables.length), isFetchingTables && /* @__PURE__ */ React__default.default.createElement("li", null, "Calculating availability...")), /* @__PURE__ */ React__default.default.createElement("div", null, /* @__PURE__ */ React__default.default.createElement("label", null, "Guests:", /* @__PURE__ */ React__default.default.createElement(
4256
- "input",
5405
+ return /* @__PURE__ */ React9__default.default.createElement("form", { className: "account-manage-form", noValidate: true }, /* @__PURE__ */ React9__default.default.createElement("div", { className: "form-group reservation-mode" }, /* @__PURE__ */ React9__default.default.createElement("div", { className: "reservation-modes-container" }, /* @__PURE__ */ React9__default.default.createElement(
5406
+ "button",
4257
5407
  {
4258
- type: "number",
4259
- name: "guests",
4260
- value: formData.guests,
4261
- onChange: handleChange,
4262
- min: "1"
5408
+ type: "button",
5409
+ className: `reservation-mode-button ${currentMode === "met_limieten" ? "active" : ""}`,
5410
+ onClick: () => handleTopLevelSelection("met_limieten"),
5411
+ "aria-pressed": currentMode === "met_limieten"
5412
+ },
5413
+ t.modes.withLimits
5414
+ ), /* @__PURE__ */ React9__default.default.createElement(
5415
+ "button",
5416
+ {
5417
+ type: "button",
5418
+ className: `reservation-mode-button ${["onbeperkt_parent", "zonder_regels", "vrije_keuze"].includes(
5419
+ currentMode
5420
+ ) ? "active" : ""}`,
5421
+ onClick: () => handleTopLevelSelection("onbeperkt_parent"),
5422
+ "aria-pressed": [
5423
+ "onbeperkt_parent",
5424
+ "zonder_regels",
5425
+ "vrije_keuze"
5426
+ ].includes(currentMode)
5427
+ },
5428
+ t.modes.unlimited
5429
+ )), ["onbeperkt_parent", "zonder_regels", "vrije_keuze"].includes(
5430
+ currentMode
5431
+ ) && /* @__PURE__ */ React9__default.default.createElement("div", { className: "reservation-modes-container sub-modes" }, /* @__PURE__ */ React9__default.default.createElement(
5432
+ "button",
5433
+ {
5434
+ type: "button",
5435
+ className: `reservation-mode-button ${currentMode === "zonder_regels" ? "active" : ""}`,
5436
+ onClick: () => handleSubSelection("zonder_regels"),
5437
+ "aria-pressed": currentMode === "zonder_regels"
5438
+ },
5439
+ t.modes.openingHours
5440
+ ), /* @__PURE__ */ React9__default.default.createElement(
5441
+ "button",
5442
+ {
5443
+ type: "button",
5444
+ className: `reservation-mode-button ${currentMode === "vrije_keuze" ? "active" : ""}`,
5445
+ onClick: () => handleSubSelection("vrije_keuze"),
5446
+ "aria-pressed": currentMode === "vrije_keuze"
5447
+ },
5448
+ t.modes.free
5449
+ ))), ["onbeperkt_parent", "zonder_regels", "vrije_keuze"].includes(
5450
+ currentMode
5451
+ ) && /* @__PURE__ */ React9__default.default.createElement("div", { className: "unlimited-mode-warning" }, /* @__PURE__ */ React9__default.default.createElement("div", { className: "warning-text" }, t.warnings?.unlimitedMode || (lang === "nl" ? "Let op: Bij onbeperkte boekingen wordt geen rekening gehouden met de maximale capaciteit van het restaurant. De maximale zitplaatslimiet kan worden overschreden." : "Warning: Unlimited bookings do not take into account the restaurant's maximum capacity. The maximum seating limit may be exceeded."))), /* @__PURE__ */ React9__default.default.createElement(
5452
+ ValueSelector_default,
5453
+ {
5454
+ setGuests,
5455
+ value: formData.guests || guests2,
5456
+ onChange: handleGuestChange,
5457
+ error: errors.guests
4263
5458
  }
4264
- )), errors.guests && /* @__PURE__ */ React__default.default.createElement("span", { className: "error" }, errors.guests)), /* @__PURE__ */ React__default.default.createElement("div", null, /* @__PURE__ */ React__default.default.createElement("label", null, "Date:", /* @__PURE__ */ React__default.default.createElement(
4265
- "input",
5459
+ ), isFinalMode && formData.guests > 0 && /* @__PURE__ */ React9__default.default.createElement(
5460
+ DateSelector_default,
4266
5461
  {
4267
- type: "date",
4268
- name: "date",
4269
- value: formData.date,
4270
- onChange: handleChange
5462
+ guests: formData.guests,
5463
+ formData,
5464
+ handleChange,
5465
+ resetFormDataFields,
5466
+ restaurantData,
5467
+ reservations,
5468
+ startDate,
5469
+ onWeekChange: handleWeekChange,
5470
+ reservationMode: currentMode
5471
+ }
5472
+ ), isFinalMode && formData.date && /* @__PURE__ */ React9__default.default.createElement(
5473
+ TimeSelector_default,
5474
+ {
5475
+ guests: formData.guests,
5476
+ formData,
5477
+ handleChange,
5478
+ field: { id: "time", label: t.fields.time },
5479
+ selectedDate: formData.date,
5480
+ setCurrentExpandedField: () => {
5481
+ },
5482
+ restaurantData,
5483
+ reservations,
5484
+ reservationMode: currentMode
4271
5485
  }
4272
- )), errors.date && /* @__PURE__ */ React__default.default.createElement("span", { className: "error" }, errors.date)), /* @__PURE__ */ React__default.default.createElement("div", null, /* @__PURE__ */ React__default.default.createElement("label", null, "Time:", /* @__PURE__ */ React__default.default.createElement(
4273
- "input",
5486
+ ), seatSelectionEnabled && /* @__PURE__ */ React9__default.default.createElement("div", { className: "form-row", style: { marginTop: 12 } }, /* @__PURE__ */ React9__default.default.createElement("div", { className: "reservation-mode-buttons" }, seatOptions.map((opt) => /* @__PURE__ */ React9__default.default.createElement(
5487
+ "button",
4274
5488
  {
4275
- type: "time",
4276
- name: "time",
4277
- value: formData.time,
4278
- onChange: handleChange
5489
+ key: opt,
5490
+ type: "button",
5491
+ className: `reservation-mode-button ${formData.zitplaats === opt ? "active" : ""}`,
5492
+ onClick: () => handleSeatPick(opt),
5493
+ "aria-pressed": formData.zitplaats === opt
5494
+ },
5495
+ opt
5496
+ ))), errors.zitplaats && /* @__PURE__ */ React9__default.default.createElement("small", { className: "error" }, errors.zitplaats)), showTableSelector && /* @__PURE__ */ React9__default.default.createElement(
5497
+ TableSelector_default,
5498
+ {
5499
+ availableTables,
5500
+ isFetching: isFetchingTables,
5501
+ formData,
5502
+ setFormData,
5503
+ handleChange
4279
5504
  }
4280
- )), errors.time && /* @__PURE__ */ React__default.default.createElement("span", { className: "error" }, errors.time)), showTableSelector && /* @__PURE__ */ React__default.default.createElement("div", { className: "available-tables" }, /* @__PURE__ */ React__default.default.createElement("h4", null, "Available Tables (", availableTables.length, ")"), /* @__PURE__ */ React__default.default.createElement("ul", null, availableTables.map((table) => /* @__PURE__ */ React__default.default.createElement("li", { key: table.tableId }, "Table ", table.tableNumber, " - Capacity: ", table.capacity)))));
5505
+ ));
4281
5506
  };
4282
5507
  var ReservationStepOne_default = ReservationStepOne;
4283
5508
 
@@ -4295,7 +5520,7 @@ var getSection = (translationsObj, sectionKey, fallbackLang = "nl") => {
4295
5520
  var magicAnimation_default = { v: "5.12.1", fr: 30, ip: 0, op: 530, w: 1024, h: 900, nm: "gr1", ddd: 0, assets: [], layers: [{ ddd: 0, ind: 1, ty: 4, nm: "Layer 6", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 1, k: [{ i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 25, s: [0] }, { i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 145, s: [-9] }, { i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 265, s: [0] }, { i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 385, s: [9] }, { t: 505, s: [0] }], ix: 10 }, p: { a: 0, k: [1206.514, -59.851, 0], ix: 2, l: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1, l: 2 }, s: { a: 1, k: [{ i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 25, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 145, s: [134.764, 134.764, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 265, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 385, s: [134.764, 134.764, 100] }, { t: 505, s: [100, 100, 100] }], ix: 6, l: 2 } }, ao: 0, ef: [{ ty: 29, nm: "Gaussian Blur", np: 5, mn: "ADBE Gaussian Blur 2", ix: 1, en: 1, ef: [{ ty: 0, nm: "Blurriness", mn: "ADBE Gaussian Blur 2-0001", ix: 1, v: { a: 0, k: 150, ix: 1 } }, { ty: 7, nm: "Blur Dimensions", mn: "ADBE Gaussian Blur 2-0002", ix: 2, v: { a: 0, k: 1, ix: 2 } }, { ty: 7, nm: "Repeat Edge Pixels", mn: "ADBE Gaussian Blur 2-0003", ix: 3, v: { a: 0, k: 0, ix: 3 } }] }], shapes: [{ ty: "gr", it: [{ ind: 0, ty: "sh", ix: 1, ks: { a: 0, k: { i: [[446.031, 78.565], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], o: [[-474.322, -83.548], [0, 0], [0, 0], [0.57, 0.727], [0, 0], [-8.99, -11.449]], v: [[-95.525, 259.75], [-429.671, -292.588], [-219.085, -449.194], [448.196, 448.091], [449.016, 449.194], [448.196, 448.091]], c: true }, ix: 2 }, nm: "Path 1", mn: "ADBE Vector Shape - Group", hd: false }, { ty: "fl", c: { a: 0, k: [0.129411771894, 0.149019613862, 0.313725501299, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: false }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Group 1", np: 2, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: false }, { ty: "gr", it: [{ ty: "rc", d: 1, s: { a: 0, k: [1200, 900], ix: 2 }, p: { a: 0, k: [0, 0], ix: 3 }, r: { a: 0, k: 0, ix: 4 }, nm: "Rectangle Path 1", mn: "ADBE Vector Shape - Rect", hd: false }, { ty: "st", c: { a: 0, k: [0.494117647059, 0.298039215686, 0.619607843137, 1], ix: 3 }, o: { a: 0, k: 100, ix: 4 }, w: { a: 0, k: 0, ix: 5 }, lc: 1, lj: 1, ml: 4, bm: 0, nm: "Stroke 1", mn: "ADBE Vector Graphic - Stroke", hd: false }, { ty: "fl", c: { a: 0, k: [0, 0.792156862745, 0.843137254902, 1], ix: 4 }, o: { a: 0, k: 0, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: false }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [178.543, 174.429], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Rectangle 1", np: 3, cix: 2, bm: 0, ix: 2, mn: "ADBE Vector Group", hd: false }], ip: 0, op: 1535, st: 25, ct: 1, bm: 0 }, { ddd: 0, ind: 2, ty: 4, nm: "Layer 5", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 1, k: [{ i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 20, s: [0] }, { i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 140, s: [-9] }, { i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 260, s: [0] }, { i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 380, s: [9] }, { t: 500, s: [0] }], ix: 10 }, p: { a: 0, k: [1073.85, -30.391, 0], ix: 2, l: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1, l: 2 }, s: { a: 1, k: [{ i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 20, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 140, s: [134.764, 134.764, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 260, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 380, s: [134.764, 134.764, 100] }, { t: 500, s: [100, 100, 100] }], ix: 6, l: 2 } }, ao: 0, ef: [{ ty: 29, nm: "Gaussian Blur", np: 5, mn: "ADBE Gaussian Blur 2", ix: 1, en: 1, ef: [{ ty: 0, nm: "Blurriness", mn: "ADBE Gaussian Blur 2-0001", ix: 1, v: { a: 0, k: 150, ix: 1 } }, { ty: 7, nm: "Blur Dimensions", mn: "ADBE Gaussian Blur 2-0002", ix: 2, v: { a: 0, k: 1, ix: 2 } }, { ty: 7, nm: "Repeat Edge Pixels", mn: "ADBE Gaussian Blur 2-0003", ix: 3, v: { a: 0, k: 0, ix: 3 } }] }], shapes: [{ ty: "gr", it: [{ ind: 0, ty: "sh", ix: 1, ks: { a: 0, k: { i: [[424.081, 79.754], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]], o: [[-450.977, -84.811], [0, 0], [0, 0], [0.55, 0.7], [0, 0], [-8.65, -11.031]], v: [[-50.221, 245.909], [-467.951, -214.723], [-174.945, -432.62], [467.71, 431.558], [468.5, 432.62], [467.71, 431.558]], c: true }, ix: 2 }, nm: "Path 1", mn: "ADBE Vector Shape - Group", hd: false }, { ty: "fl", c: { a: 0, k: [0, 0.792156875134, 0.843137264252, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: false }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Group 1", np: 2, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: false }, { ty: "gr", it: [{ ty: "rc", d: 1, s: { a: 0, k: [1200, 900], ix: 2 }, p: { a: 0, k: [0, 0], ix: 3 }, r: { a: 0, k: 0, ix: 4 }, nm: "Rectangle Path 1", mn: "ADBE Vector Shape - Rect", hd: false }, { ty: "st", c: { a: 0, k: [0.494117647059, 0.298039215686, 0.619607843137, 1], ix: 3 }, o: { a: 0, k: 100, ix: 4 }, w: { a: 0, k: 0, ix: 5 }, lc: 1, lj: 1, ml: 4, bm: 0, nm: "Stroke 1", mn: "ADBE Vector Graphic - Stroke", hd: false }, { ty: "fl", c: { a: 0, k: [0, 0.792156862745, 0.843137254902, 1], ix: 4 }, o: { a: 0, k: 0, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: false }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [178.543, 174.429], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Rectangle 1", np: 3, cix: 2, bm: 0, ix: 2, mn: "ADBE Vector Group", hd: false }], ip: 0, op: 1530, st: 20, ct: 1, bm: 0 }, { ddd: 0, ind: 3, ty: 4, nm: "Layer 4", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 1, k: [{ i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 15, s: [0] }, { i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 135, s: [-9] }, { i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 255, s: [0] }, { i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 375, s: [9] }, { t: 495, s: [0] }], ix: 10 }, p: { a: 0, k: [988.859, 75.079, 0], ix: 2, l: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1, l: 2 }, s: { a: 1, k: [{ i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 15, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 135, s: [134.764, 134.764, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 255, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 375, s: [134.764, 134.764, 100] }, { t: 495, s: [100, 100, 100] }], ix: 6, l: 2 } }, ao: 0, ef: [{ ty: 29, nm: "Gaussian Blur", np: 5, mn: "ADBE Gaussian Blur 2", ix: 1, en: 1, ef: [{ ty: 0, nm: "Blurriness", mn: "ADBE Gaussian Blur 2-0001", ix: 1, v: { a: 0, k: 100, ix: 1 } }, { ty: 7, nm: "Blur Dimensions", mn: "ADBE Gaussian Blur 2-0002", ix: 2, v: { a: 0, k: 1, ix: 2 } }, { ty: 7, nm: "Repeat Edge Pixels", mn: "ADBE Gaussian Blur 2-0003", ix: 3, v: { a: 0, k: 0, ix: 3 } }] }], shapes: [{ ty: "gr", it: [{ ind: 0, ty: "sh", ix: 1, ks: { a: 1, k: [{ i: { x: 0.833, y: 1 }, o: { x: 0.333, y: 0 }, t: 75, s: [{ i: [[432.399, 124.912], [0, 0], [0, 0], [123.76, -96.677]], o: [[-432.397, -124.911], [0, 0], [0, 0], [-123.77, 96.676]], v: [[-78.678, 155.686], [-500.894, -232.49], [-167.127, -480.7], [487.581, 460.594]], c: true }] }, { i: { x: 0.833, y: 1 }, o: { x: 0.167, y: 0 }, t: 195, s: [{ i: [[432.399, 124.912], [0, 0], [0, 0], [123.76, -96.677]], o: [[-432.397, -124.911], [0, 0], [0, 0], [-123.77, 96.676]], v: [[-97.842, 203.742], [-500.894, -232.49], [-167.127, -480.7], [487.581, 460.594]], c: true }] }, { i: { x: 0.833, y: 1 }, o: { x: 0.167, y: 0 }, t: 315, s: [{ i: [[253.734, 244.526], [0, 0], [0, 0], [123.76, -96.677]], o: [[-324.079, -312.318], [0, 0], [0, 0], [-123.77, 96.676]], v: [[-129.581, 213.076], [-500.894, -232.49], [-167.127, -480.7], [487.581, 460.594]], c: true }] }, { i: { x: 0.667, y: 1 }, o: { x: 0.167, y: 0 }, t: 435, s: [{ i: [[226.573, 11.739], [0, 0], [0, 0], [123.76, -96.677]], o: [[-147.242, -7.629], [0, 0], [0, 0], [-123.77, 96.676]], v: [[-215.336, 122.406], [-500.894, -232.49], [-167.127, -480.7], [487.581, 460.594]], c: true }] }, { t: 529, s: [{ i: [[432.399, 124.912], [0, 0], [0, 0], [123.76, -96.677]], o: [[-432.397, -124.911], [0, 0], [0, 0], [-123.77, 96.676]], v: [[-78.678, 155.686], [-500.894, -232.49], [-167.127, -480.7], [487.581, 460.594]], c: true }] }], ix: 2 }, nm: "Path 1", mn: "ADBE Vector Shape - Group", hd: false }, { ty: "fl", c: { a: 0, k: [0.929411768913, 1, 0.482352942228, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: false }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Group 1", np: 2, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: false }, { ty: "gr", it: [{ ty: "rc", d: 1, s: { a: 0, k: [1200, 900], ix: 2 }, p: { a: 0, k: [0, 0], ix: 3 }, r: { a: 0, k: 0, ix: 4 }, nm: "Rectangle Path 1", mn: "ADBE Vector Shape - Rect", hd: false }, { ty: "st", c: { a: 0, k: [0.494117647059, 0.298039215686, 0.619607843137, 1], ix: 3 }, o: { a: 0, k: 100, ix: 4 }, w: { a: 0, k: 0, ix: 5 }, lc: 1, lj: 1, ml: 4, bm: 0, nm: "Stroke 1", mn: "ADBE Vector Graphic - Stroke", hd: false }, { ty: "fl", c: { a: 0, k: [0, 0.792156862745, 0.843137254902, 1], ix: 4 }, o: { a: 0, k: 0, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: false }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [178.543, 174.429], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Rectangle 1", np: 3, cix: 2, bm: 0, ix: 2, mn: "ADBE Vector Group", hd: false }], ip: 0, op: 1525, st: 15, ct: 1, bm: 0 }, { ddd: 0, ind: 4, ty: 4, nm: "Layer 3", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 1, k: [{ i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 10, s: [0] }, { i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 130, s: [-9] }, { i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 250, s: [0] }, { i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 370, s: [9] }, { t: 490, s: [0] }], ix: 10 }, p: { a: 0, k: [894.117, 84.677, 0], ix: 2, l: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1, l: 2 }, s: { a: 1, k: [{ i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 10, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 130, s: [134.764, 134.764, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 250, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 370, s: [134.764, 134.764, 100] }, { t: 490, s: [100, 100, 100] }], ix: 6, l: 2 } }, ao: 0, ef: [{ ty: 29, nm: "Gaussian Blur", np: 5, mn: "ADBE Gaussian Blur 2", ix: 1, en: 1, ef: [{ ty: 0, nm: "Blurriness", mn: "ADBE Gaussian Blur 2-0001", ix: 1, v: { a: 0, k: 40, ix: 1 } }, { ty: 7, nm: "Blur Dimensions", mn: "ADBE Gaussian Blur 2-0002", ix: 2, v: { a: 0, k: 1, ix: 2 } }, { ty: 7, nm: "Repeat Edge Pixels", mn: "ADBE Gaussian Blur 2-0003", ix: 3, v: { a: 0, k: 0, ix: 3 } }] }], shapes: [{ ty: "gr", it: [{ ind: 0, ty: "sh", ix: 1, ks: { a: 1, k: [{ i: { x: 0.667, y: 1 }, o: { x: 0.167, y: 0 }, t: 67, s: [{ i: [[361.666, 65.659], [0, 0], [0, 0], [92.214, -68.58]], o: [[-361.667, -65.659], [0, 0], [0, 0], [-92.219, 68.579]], v: [[-99.227, 158.019], [-431.16, -238.63], [-176.178, -428.251], [423.289, 416.898]], c: true }] }, { i: { x: 0.833, y: 1 }, o: { x: 0.333, y: 0 }, t: 190, s: [{ i: [[303.862, 85.416], [0, 0], [0, 0], [92.214, -68.58]], o: [[-353.863, -99.472], [0, 0], [0, 0], [-92.219, 68.579]], v: [[-114.955, 184.127], [-431.16, -238.63], [-176.178, -428.251], [423.289, 416.898]], c: true }] }, { i: { x: 0.833, y: 1 }, o: { x: 0.167, y: 0 }, t: 310, s: [{ i: [[66.949, 140.982], [0, 0], [0, 0], [92.213, -68.58]], o: [[-157.679, -332.04], [0, 0], [0, 0], [-92.219, 68.579]], v: [[-182.308, 153.536], [-647.392, -141.284], [-176.178, -428.251], [423.29, 416.898]], c: true }] }, { i: { x: 0.833, y: 1 }, o: { x: 0.167, y: 0 }, t: 430, s: [{ i: [[160.75, 51.563], [0, 0], [0, 0], [92.213, -68.58]], o: [[-350.011, -112.272], [0, 0], [0, 0], [-92.219, 68.579]], v: [[-133.05, 149.658], [-420.434, -232.638], [-176.178, -428.251], [423.29, 416.898]], c: true }] }, { t: 524, s: [{ i: [[361.666, 65.659], [0, 0], [0, 0], [92.214, -68.58]], o: [[-361.667, -65.659], [0, 0], [0, 0], [-92.219, 68.579]], v: [[-99.227, 158.019], [-431.16, -238.63], [-176.178, -428.251], [423.289, 416.898]], c: true }] }], ix: 2 }, nm: "Path 1", mn: "ADBE Vector Shape - Group", hd: false }, { ty: "st", c: { a: 0, k: [0.129411771894, 0.149019613862, 0.313725501299, 1], ix: 3 }, o: { a: 0, k: 100, ix: 4 }, w: { a: 0, k: 8, ix: 5 }, lc: 1, lj: 1, ml: 4, bm: 0, nm: "Stroke 1", mn: "ADBE Vector Graphic - Stroke", hd: false }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Group 1", np: 2, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: false }, { ty: "gr", it: [{ ty: "rc", d: 1, s: { a: 0, k: [1200, 900], ix: 2 }, p: { a: 0, k: [0, 0], ix: 3 }, r: { a: 0, k: 0, ix: 4 }, nm: "Rectangle Path 1", mn: "ADBE Vector Shape - Rect", hd: false }, { ty: "st", c: { a: 0, k: [0.494117647059, 0.298039215686, 0.619607843137, 1], ix: 3 }, o: { a: 0, k: 100, ix: 4 }, w: { a: 0, k: 0, ix: 5 }, lc: 1, lj: 1, ml: 4, bm: 0, nm: "Stroke 1", mn: "ADBE Vector Graphic - Stroke", hd: false }, { ty: "fl", c: { a: 0, k: [0, 0.792156862745, 0.843137254902, 1], ix: 4 }, o: { a: 0, k: 0, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: false }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [178.543, 174.429], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Rectangle 1", np: 3, cix: 2, bm: 0, ix: 2, mn: "ADBE Vector Group", hd: false }], ip: 0, op: 1520, st: 10, ct: 1, bm: 0 }, { ddd: 0, ind: 5, ty: 4, nm: "Layer 2", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 1, k: [{ i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 5, s: [0] }, { i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 125, s: [-9] }, { i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 245, s: [0] }, { i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 365, s: [9] }, { t: 485, s: [0] }], ix: 10 }, p: { a: 0, k: [894.117, 83.978, 0], ix: 2, l: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1, l: 2 }, s: { a: 1, k: [{ i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 5, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 125, s: [134.764, 134.764, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 245, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 365, s: [134.764, 134.764, 100] }, { t: 485, s: [100, 100, 100] }], ix: 6, l: 2 } }, ao: 0, shapes: [{ ty: "gr", it: [{ ind: 0, ty: "sh", ix: 1, ks: { a: 1, k: [{ i: { x: 0.667, y: 1 }, o: { x: 0.167, y: 0 }, t: 62, s: [{ i: [[361.666, 65.659], [0, 0], [0, 0], [92.214, -68.58]], o: [[-361.667, -65.659], [0, 0], [0, 0], [-92.219, 68.579]], v: [[-99.227, 158.019], [-431.16, -238.63], [-176.178, -428.251], [423.289, 416.898]], c: true }] }, { i: { x: 0.833, y: 1 }, o: { x: 0.333, y: 0 }, t: 185, s: [{ i: [[303.862, 85.416], [0, 0], [0, 0], [92.214, -68.58]], o: [[-353.863, -99.472], [0, 0], [0, 0], [-92.219, 68.579]], v: [[-114.955, 184.127], [-431.16, -238.63], [-176.178, -428.251], [423.289, 416.898]], c: true }] }, { i: { x: 0.833, y: 1 }, o: { x: 0.167, y: 0 }, t: 305, s: [{ i: [[66.949, 140.982], [0, 0], [0, 0], [92.213, -68.58]], o: [[-157.679, -332.04], [0, 0], [0, 0], [-92.219, 68.579]], v: [[-182.308, 153.536], [-647.392, -141.284], [-176.178, -428.251], [423.29, 416.898]], c: true }] }, { i: { x: 0.833, y: 1 }, o: { x: 0.167, y: 0 }, t: 425, s: [{ i: [[160.75, 51.563], [0, 0], [0, 0], [92.213, -68.58]], o: [[-350.011, -112.272], [0, 0], [0, 0], [-92.219, 68.579]], v: [[-133.05, 149.658], [-420.434, -232.638], [-176.178, -428.251], [423.29, 416.898]], c: true }] }, { t: 519, s: [{ i: [[361.666, 65.659], [0, 0], [0, 0], [92.214, -68.58]], o: [[-361.667, -65.659], [0, 0], [0, 0], [-92.219, 68.579]], v: [[-99.227, 158.019], [-431.16, -238.63], [-176.178, -428.251], [423.289, 416.898]], c: true }] }], ix: 2 }, nm: "Path 1", mn: "ADBE Vector Shape - Group", hd: false }, { ty: "fl", c: { a: 0, k: [0.956862747669, 0.980392158031, 0.976470589638, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: false }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Group 1", np: 2, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: false }, { ty: "gr", it: [{ ty: "rc", d: 1, s: { a: 0, k: [1200, 900], ix: 2 }, p: { a: 0, k: [0, 0], ix: 3 }, r: { a: 0, k: 0, ix: 4 }, nm: "Rectangle Path 1", mn: "ADBE Vector Shape - Rect", hd: false }, { ty: "st", c: { a: 0, k: [0.494117647059, 0.298039215686, 0.619607843137, 1], ix: 3 }, o: { a: 0, k: 100, ix: 4 }, w: { a: 0, k: 0, ix: 5 }, lc: 1, lj: 1, ml: 4, bm: 0, nm: "Stroke 1", mn: "ADBE Vector Graphic - Stroke", hd: false }, { ty: "fl", c: { a: 0, k: [0, 0.792156862745, 0.843137254902, 1], ix: 4 }, o: { a: 0, k: 0, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: false }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [178.543, 174.429], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Rectangle 1", np: 3, cix: 2, bm: 0, ix: 2, mn: "ADBE Vector Group", hd: false }], ip: 0, op: 1515, st: 5, ct: 1, bm: 0 }, { ddd: 0, ind: 6, ty: 4, nm: "Layer 1", sr: 1, ks: { o: { a: 0, k: 100, ix: 11 }, r: { a: 1, k: [{ i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 0, s: [0] }, { i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 120, s: [-9] }, { i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 240, s: [0] }, { i: { x: [0.667], y: [1] }, o: { x: [0.333], y: [0] }, t: 360, s: [9] }, { t: 480, s: [0] }], ix: 10 }, p: { a: 0, k: [895.851, 111.19, 0], ix: 2, l: 2 }, a: { a: 0, k: [0, 0, 0], ix: 1, l: 2 }, s: { a: 1, k: [{ i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 0, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 120, s: [134.764, 134.764, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 240, s: [100, 100, 100] }, { i: { x: [0.667, 0.667, 0.667], y: [1, 1, 1] }, o: { x: [0.333, 0.333, 0.333], y: [0, 0, 0] }, t: 360, s: [134.764, 134.764, 100] }, { t: 480, s: [100, 100, 100] }], ix: 6, l: 2 } }, ao: 0, ef: [{ ty: 29, nm: "Gaussian Blur", np: 5, mn: "ADBE Gaussian Blur 2", ix: 1, en: 1, ef: [{ ty: 0, nm: "Blurriness", mn: "ADBE Gaussian Blur 2-0001", ix: 1, v: { a: 0, k: 200, ix: 1 } }, { ty: 7, nm: "Blur Dimensions", mn: "ADBE Gaussian Blur 2-0002", ix: 2, v: { a: 0, k: 1, ix: 2 } }, { ty: 7, nm: "Repeat Edge Pixels", mn: "ADBE Gaussian Blur 2-0003", ix: 3, v: { a: 0, k: 0, ix: 3 } }] }], shapes: [{ ty: "gr", it: [{ ind: 0, ty: "sh", ix: 1, ks: { a: 1, k: [{ i: { x: 0.667, y: 1 }, o: { x: 0.333, y: 0 }, t: 57, s: [{ i: [[261.24, 94.803], [0, 0], [0, 0], [280.19, -208.366]], o: [[-261.24, -94.803], [0, 0], [0, 0], [-280.189, 208.367]], v: [[-130.27, 227.181], [-489.015, -224.108], [-180.898, -453.243], [434.739, 374.6]], c: true }] }, { i: { x: 0.667, y: 1 }, o: { x: 0.333, y: 0 }, t: 180, s: [{ i: [[240.029, 117.135], [0, 0], [0, 0], [280.191, -208.366]], o: [[-249.757, -121.882], [0, 0], [0, 0], [-280.189, 208.367]], v: [[-256.037, 109.609], [-489.015, -224.108], [-180.898, -453.243], [434.739, 374.6]], c: true }] }, { i: { x: 0.667, y: 1 }, o: { x: 0.333, y: 0 }, t: 300, s: [{ i: [[153.185, 80.344], [0, 0], [0, 0], [280.191, -208.366]], o: [[-246.114, -129.083], [0, 0], [0, 0], [-280.189, 208.367]], v: [[-99.854, 269.938], [-489.015, -224.108], [-180.898, -453.243], [434.739, 374.6]], c: true }] }, { i: { x: 0.667, y: 1 }, o: { x: 0.333, y: 0 }, t: 420, s: [{ i: [[172.303, 15.256], [0, 0], [0, 0], [280.191, -208.366]], o: [[-418.35, -37.043], [0, 0], [0, 0], [-280.189, 208.367]], v: [[-1.548, 216.055], [-489.015, -224.108], [-180.898, -453.243], [434.739, 374.6]], c: true }] }, { t: 514, s: [{ i: [[261.24, 94.803], [0, 0], [0, 0], [280.19, -208.366]], o: [[-261.24, -94.803], [0, 0], [0, 0], [-280.189, 208.367]], v: [[-130.27, 227.181], [-489.015, -224.108], [-180.898, -453.243], [434.739, 374.6]], c: true }] }], ix: 2 }, nm: "Path 1", mn: "ADBE Vector Shape - Group", hd: false }, { ty: "fl", c: { a: 0, k: [0, 0.792156875134, 0.843137264252, 1], ix: 4 }, o: { a: 0, k: 100, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: false }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [100, 100], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Group 1", np: 2, cix: 2, bm: 0, ix: 1, mn: "ADBE Vector Group", hd: false }, { ty: "gr", it: [{ ty: "rc", d: 1, s: { a: 0, k: [1200, 900], ix: 2 }, p: { a: 0, k: [0, 0], ix: 3 }, r: { a: 0, k: 0, ix: 4 }, nm: "Rectangle Path 1", mn: "ADBE Vector Shape - Rect", hd: false }, { ty: "st", c: { a: 0, k: [0.494117647059, 0.298039215686, 0.619607843137, 1], ix: 3 }, o: { a: 0, k: 100, ix: 4 }, w: { a: 0, k: 0, ix: 5 }, lc: 1, lj: 1, ml: 4, bm: 0, nm: "Stroke 1", mn: "ADBE Vector Graphic - Stroke", hd: false }, { ty: "fl", c: { a: 0, k: [0, 0.792156862745, 0.843137254902, 1], ix: 4 }, o: { a: 0, k: 0, ix: 5 }, r: 1, bm: 0, nm: "Fill 1", mn: "ADBE Vector Graphic - Fill", hd: false }, { ty: "tr", p: { a: 0, k: [0, 0], ix: 2 }, a: { a: 0, k: [0, 0], ix: 1 }, s: { a: 0, k: [178.543, 174.429], ix: 3 }, r: { a: 0, k: 0, ix: 6 }, o: { a: 0, k: 100, ix: 7 }, sk: { a: 0, k: 0, ix: 4 }, sa: { a: 0, k: 0, ix: 5 }, nm: "Transform" }], nm: "Rectangle 1", np: 3, cix: 2, bm: 0, ix: 2, mn: "ADBE Vector Group", hd: false }], ip: 0, op: 1510, st: 0, ct: 1, bm: 0 }], markers: [], props: {} };
4296
5521
 
4297
5522
  // src/components/FormField/translations.json
4298
- var translations_default = {
5523
+ var translations_default2 = {
4299
5524
  nl: {
4300
5525
  formField: {
4301
5526
  selectPlaceholder: "Selecteer een optie",
@@ -4346,14 +5571,14 @@ var FormField = ({
4346
5571
  onRightIconClick: onRightIconClick2,
4347
5572
  tooltipContent
4348
5573
  }) => {
4349
- const t = getSection(translations_default, "formField");
5574
+ const t = getSection(translations_default2, "formField");
4350
5575
  const selectPlaceholderText = selectPlaceholder || t.selectPlaceholder;
4351
- const [showTooltip, setShowTooltip] = React.useState(false);
4352
- const tooltipRef = React.useRef(null);
4353
- const timerRef = React.useRef(null);
5576
+ const [showTooltip, setShowTooltip] = React9.useState(false);
5577
+ const tooltipRef = React9.useRef(null);
5578
+ const timerRef = React9.useRef(null);
4354
5579
  const RightIconComponent = rightIcon2;
4355
5580
  const Icon = icon;
4356
- React.useEffect(() => {
5581
+ React9.useEffect(() => {
4357
5582
  const handleClickOutside = (e) => {
4358
5583
  if (tooltipRef.current && !tooltipRef.current.contains(e.target)) {
4359
5584
  if (timerRef.current) clearTimeout(timerRef.current);
@@ -4373,19 +5598,19 @@ var FormField = ({
4373
5598
  };
4374
5599
  const renderControl = () => {
4375
5600
  if (type === "select") {
4376
- return /* @__PURE__ */ React__default.default.createElement("select", { ...baseControlProps }, /* @__PURE__ */ React__default.default.createElement("option", { value: "" }, selectPlaceholderText), options.map((opt) => /* @__PURE__ */ React__default.default.createElement("option", { key: opt.value, value: opt.value }, opt.label)));
5601
+ return /* @__PURE__ */ React9__default.default.createElement("select", { ...baseControlProps }, /* @__PURE__ */ React9__default.default.createElement("option", { value: "" }, selectPlaceholderText), options.map((opt) => /* @__PURE__ */ React9__default.default.createElement("option", { key: opt.value, value: opt.value }, opt.label)));
4377
5602
  }
4378
5603
  if (type === "textarea")
4379
- return /* @__PURE__ */ React__default.default.createElement("textarea", { ...baseControlProps, placeholder });
4380
- return /* @__PURE__ */ React__default.default.createElement("input", { type, ...baseControlProps, placeholder });
5604
+ return /* @__PURE__ */ React9__default.default.createElement("textarea", { ...baseControlProps, placeholder });
5605
+ return /* @__PURE__ */ React9__default.default.createElement("input", { type, ...baseControlProps, placeholder });
4381
5606
  };
4382
- return /* @__PURE__ */ React__default.default.createElement(
5607
+ return /* @__PURE__ */ React9__default.default.createElement(
4383
5608
  "div",
4384
5609
  {
4385
5610
  className: `form-group ${halfWidth ? "half-width" : ""}`,
4386
5611
  style: { position: "relative" }
4387
5612
  },
4388
- /* @__PURE__ */ React__default.default.createElement("div", { className: "input-container" }, Icon && /* @__PURE__ */ React__default.default.createElement(Icon, { className: "input-icon" }), renderControl(), RightIconComponent && /* @__PURE__ */ React__default.default.createElement(
5613
+ /* @__PURE__ */ React9__default.default.createElement("div", { className: "input-container" }, Icon && /* @__PURE__ */ React9__default.default.createElement(Icon, { className: "input-icon" }), renderControl(), RightIconComponent && /* @__PURE__ */ React9__default.default.createElement(
4389
5614
  "div",
4390
5615
  {
4391
5616
  className: "magic-wand-container",
@@ -4405,14 +5630,14 @@ var FormField = ({
4405
5630
  cursor: "pointer"
4406
5631
  }
4407
5632
  },
4408
- /* @__PURE__ */ React__default.default.createElement(
5633
+ /* @__PURE__ */ React9__default.default.createElement(
4409
5634
  RightIconComponent,
4410
5635
  {
4411
5636
  className: "magic-wand-icon",
4412
5637
  style: { color: "#B567C2" }
4413
5638
  }
4414
5639
  ),
4415
- showTooltip && tooltipContent && /* @__PURE__ */ React__default.default.createElement(
5640
+ showTooltip && tooltipContent && /* @__PURE__ */ React9__default.default.createElement(
4416
5641
  "div",
4417
5642
  {
4418
5643
  ref: tooltipRef,
@@ -4432,7 +5657,7 @@ var FormField = ({
4432
5657
  overflow: "hidden"
4433
5658
  }
4434
5659
  },
4435
- /* @__PURE__ */ React__default.default.createElement(
5660
+ /* @__PURE__ */ React9__default.default.createElement(
4436
5661
  "div",
4437
5662
  {
4438
5663
  className: "lottie-container",
@@ -4447,7 +5672,7 @@ var FormField = ({
4447
5672
  zIndex: 1
4448
5673
  }
4449
5674
  },
4450
- /* @__PURE__ */ React__default.default.createElement(
5675
+ /* @__PURE__ */ React9__default.default.createElement(
4451
5676
  Lottie__default.default,
4452
5677
  {
4453
5678
  animationData: magicAnimation_default,
@@ -4456,7 +5681,7 @@ var FormField = ({
4456
5681
  }
4457
5682
  )
4458
5683
  ),
4459
- /* @__PURE__ */ React__default.default.createElement("div", { style: { position: "relative", zIndex: 2, padding: "12px 20px" } }, /* @__PURE__ */ React__default.default.createElement(
5684
+ /* @__PURE__ */ React9__default.default.createElement("div", { style: { position: "relative", zIndex: 2, padding: "12px 20px" } }, /* @__PURE__ */ React9__default.default.createElement(
4460
5685
  "div",
4461
5686
  {
4462
5687
  style: {
@@ -4466,7 +5691,7 @@ var FormField = ({
4466
5691
  }
4467
5692
  },
4468
5693
  tooltipContent
4469
- ), /* @__PURE__ */ React__default.default.createElement(
5694
+ ), /* @__PURE__ */ React9__default.default.createElement(
4470
5695
  "div",
4471
5696
  {
4472
5697
  style: {
@@ -4477,7 +5702,7 @@ var FormField = ({
4477
5702
  }
4478
5703
  },
4479
5704
  t.tooltip?.confirm
4480
- ), /* @__PURE__ */ React__default.default.createElement(
5705
+ ), /* @__PURE__ */ React9__default.default.createElement(
4481
5706
  "div",
4482
5707
  {
4483
5708
  style: {
@@ -4491,71 +5716,17 @@ var FormField = ({
4491
5716
  ))
4492
5717
  )
4493
5718
  )),
4494
- error && /* @__PURE__ */ React__default.default.createElement("p", { className: "form-error" }, error)
5719
+ error && /* @__PURE__ */ React9__default.default.createElement("p", { className: "form-error" }, error)
4495
5720
  );
4496
5721
  };
4497
5722
  var FormField_default = FormField;
4498
5723
 
4499
5724
  // src/components/ReservationStepTwo/ReservationStepTwo.js
4500
- var import_moment = __toESM(require_moment());
5725
+ var import_moment3 = __toESM(require_moment());
4501
5726
  __toESM(require_nl());
4502
- var useApi = () => {
4503
- const getJwtToken = React.useCallback(() => {
4504
- return localStorage.getItem("accessToken");
4505
- }, []);
4506
- const get = React.useCallback(
4507
- (endpoint, config = {}) => {
4508
- const { params, ...axiosConfig } = config;
4509
- const token = getJwtToken();
4510
- return axios__default.default.get(endpoint, {
4511
- ...axiosConfig,
4512
- params,
4513
- headers: {
4514
- ...axiosConfig.headers,
4515
- ...token ? { Authorization: `Bearer ${token}` } : {}
4516
- }
4517
- }).then((response) => response.data).catch((error) => {
4518
- console.error("Error fetching data:", error);
4519
- throw error;
4520
- });
4521
- },
4522
- [getJwtToken]
4523
- );
4524
- const mutate = React.useCallback(
4525
- (method, endpoint, data = null, config = {}) => {
4526
- const token = getJwtToken();
4527
- return axios__default.default({
4528
- method,
4529
- url: endpoint,
4530
- data,
4531
- ...config,
4532
- headers: {
4533
- ...config.headers,
4534
- ...token ? { Authorization: `Bearer ${token}` } : {}
4535
- }
4536
- }).then((response) => response.data).catch((error) => {
4537
- console.error(`Error with ${method} request:`, error);
4538
- throw error;
4539
- });
4540
- },
4541
- [getJwtToken]
4542
- );
4543
- const apiMethods = React.useMemo(
4544
- () => ({
4545
- get,
4546
- post: (endpoint, data, config) => mutate("POST", endpoint, data, config),
4547
- put: (endpoint, data, config) => mutate("PUT", endpoint, data, config),
4548
- patch: (endpoint, data, config) => mutate("PATCH", endpoint, data, config),
4549
- delete: (endpoint, config) => mutate("DELETE", endpoint, null, config)
4550
- }),
4551
- [get, mutate]
4552
- );
4553
- return apiMethods;
4554
- };
4555
- var useApi_default = useApi;
4556
5727
 
4557
5728
  // src/components/ReservationStepTwo/translations.json
4558
- var translations_default2 = {
5729
+ var translations_default3 = {
4559
5730
  nl: {
4560
5731
  reservationStepTwoFiltering: {
4561
5732
  labels: {
@@ -4690,25 +5861,25 @@ var ReservationStepTwo = ({
4690
5861
  menuData
4691
5862
  }) => {
4692
5863
  const lang = getPreferredLanguage();
4693
- const t = getSection(translations_default2, "reservationStepTwoFiltering");
4694
- const [availableMenus, setAvailableMenus] = React.useState([]);
4695
- const [hasAutofilled, setHasAutofilled] = React.useState(false);
4696
- const [pendingAutofill, setPendingAutofill] = React.useState(null);
5864
+ const t = getSection(translations_default3, "reservationStepTwoFiltering");
5865
+ const [availableMenus, setAvailableMenus] = React9.useState([]);
5866
+ const [hasAutofilled, setHasAutofilled] = React9.useState(false);
5867
+ const [pendingAutofill, setPendingAutofill] = React9.useState(null);
4697
5868
  const api = useApi_default();
4698
- React.useEffect(() => {
4699
- import_moment.default.locale(lang);
5869
+ React9.useEffect(() => {
5870
+ import_moment3.default.locale(lang);
4700
5871
  if (!formData.date || !formData.time || !menuData.length) return setAvailableMenus([]);
4701
- const sel = (0, import_moment.default)(`${formData.date} ${formData.time}`, "YYYY-MM-DD HH:mm");
5872
+ const sel = (0, import_moment3.default)(`${formData.date} ${formData.time}`, "YYYY-MM-DD HH:mm");
4702
5873
  const filtered = menuData.filter((menu) => {
4703
5874
  const inDate = sel.isBetween(
4704
- (0, import_moment.default)(menu.startDate, "YYYY-MM-DD"),
4705
- (0, import_moment.default)(menu.endDate, "YYYY-MM-DD"),
5875
+ (0, import_moment3.default)(menu.startDate, "YYYY-MM-DD"),
5876
+ (0, import_moment3.default)(menu.endDate, "YYYY-MM-DD"),
4706
5877
  "day",
4707
5878
  "[]"
4708
5879
  );
4709
- const inTime = (0, import_moment.default)(formData.time, "HH:mm").isBetween(
4710
- (0, import_moment.default)(menu.startHour, "HH:mm"),
4711
- (0, import_moment.default)(menu.endHour, "HH:mm"),
5880
+ const inTime = (0, import_moment3.default)(formData.time, "HH:mm").isBetween(
5881
+ (0, import_moment3.default)(menu.startHour, "HH:mm"),
5882
+ (0, import_moment3.default)(menu.endHour, "HH:mm"),
4712
5883
  "minute",
4713
5884
  "[]"
4714
5885
  );
@@ -4741,10 +5912,10 @@ var ReservationStepTwo = ({
4741
5912
  console.error("Autofill error");
4742
5913
  }
4743
5914
  };
4744
- React.useEffect(() => {
5915
+ React9.useEffect(() => {
4745
5916
  tryAutofill();
4746
5917
  }, [formData.email, formData.phone]);
4747
- const magicProps = React.useMemo(() => {
5918
+ const magicProps = React9.useMemo(() => {
4748
5919
  if (!pendingAutofill)
4749
5920
  return { email: {}, phone: {} };
4750
5921
  const emailActive = pendingAutofill.sources.includes("email") && (formData.email || "").trim().toLowerCase() === pendingAutofill.email.trim().toLowerCase();
@@ -4756,15 +5927,15 @@ var ReservationStepTwo = ({
4756
5927
  return {
4757
5928
  email: emailActive ? {
4758
5929
  ...common,
4759
- tooltipContent: /* @__PURE__ */ React__default.default.createElement("div", null, /* @__PURE__ */ React__default.default.createElement("div", { style: { textAlign: "center", fontWeight: "bold" } }, t.magic?.title), /* @__PURE__ */ React__default.default.createElement("div", null, pendingAutofill.firstName, " ", pendingAutofill.lastName), /* @__PURE__ */ React__default.default.createElement("div", null, pendingAutofill.phone))
5930
+ tooltipContent: /* @__PURE__ */ React9__default.default.createElement("div", null, /* @__PURE__ */ React9__default.default.createElement("div", { style: { textAlign: "center", fontWeight: "bold" } }, t.magic?.title), /* @__PURE__ */ React9__default.default.createElement("div", null, pendingAutofill.firstName, " ", pendingAutofill.lastName), /* @__PURE__ */ React9__default.default.createElement("div", null, pendingAutofill.phone))
4760
5931
  } : {},
4761
5932
  phone: phoneActive ? {
4762
5933
  ...common,
4763
- tooltipContent: /* @__PURE__ */ React__default.default.createElement("div", null, /* @__PURE__ */ React__default.default.createElement("div", { style: { textAlign: "center", fontWeight: "bold" } }, t.magic?.title), /* @__PURE__ */ React__default.default.createElement("div", null, pendingAutofill.firstName, " ", pendingAutofill.lastName), /* @__PURE__ */ React__default.default.createElement("div", null, pendingAutofill.email))
5934
+ tooltipContent: /* @__PURE__ */ React9__default.default.createElement("div", null, /* @__PURE__ */ React9__default.default.createElement("div", { style: { textAlign: "center", fontWeight: "bold" } }, t.magic?.title), /* @__PURE__ */ React9__default.default.createElement("div", null, pendingAutofill.firstName, " ", pendingAutofill.lastName), /* @__PURE__ */ React9__default.default.createElement("div", null, pendingAutofill.email))
4764
5935
  } : {}
4765
5936
  };
4766
5937
  }, [pendingAutofill, formData.email, formData.phone, t.magic?.title]);
4767
- return /* @__PURE__ */ React__default.default.createElement("div", { className: "reservation-step-two" }, /* @__PURE__ */ React__default.default.createElement("div", { className: "account-manage-form" }, availableMenus.length > 0 && /* @__PURE__ */ React__default.default.createElement(
5938
+ return /* @__PURE__ */ React9__default.default.createElement("div", { className: "reservation-step-two" }, /* @__PURE__ */ React9__default.default.createElement("div", { className: "account-manage-form" }, availableMenus.length > 0 && /* @__PURE__ */ React9__default.default.createElement(
4768
5939
  FormField_default,
4769
5940
  {
4770
5941
  label: t.labels?.menu || "Menu",
@@ -4775,7 +5946,7 @@ var ReservationStepTwo = ({
4775
5946
  onChange: handleChange,
4776
5947
  error: errors.menu
4777
5948
  }
4778
- ), /* @__PURE__ */ React__default.default.createElement("div", { className: "name-fields" }, /* @__PURE__ */ React__default.default.createElement(
5949
+ ), /* @__PURE__ */ React9__default.default.createElement("div", { className: "name-fields" }, /* @__PURE__ */ React9__default.default.createElement(
4779
5950
  FormField_default,
4780
5951
  {
4781
5952
  label: t.labels?.firstName || "Voornaam",
@@ -4786,7 +5957,7 @@ var ReservationStepTwo = ({
4786
5957
  error: errors.firstName,
4787
5958
  icon: fa.FaUser
4788
5959
  }
4789
- ), /* @__PURE__ */ React__default.default.createElement(
5960
+ ), /* @__PURE__ */ React9__default.default.createElement(
4790
5961
  FormField_default,
4791
5962
  {
4792
5963
  label: t.labels?.lastName || "Achternaam",
@@ -4797,7 +5968,7 @@ var ReservationStepTwo = ({
4797
5968
  error: errors.lastName,
4798
5969
  icon: fa.FaUser
4799
5970
  }
4800
- )), /* @__PURE__ */ React__default.default.createElement(
5971
+ )), /* @__PURE__ */ React9__default.default.createElement(
4801
5972
  FormField_default,
4802
5973
  {
4803
5974
  label: t.labels?.email || "Email",
@@ -4811,7 +5982,7 @@ var ReservationStepTwo = ({
4811
5982
  icon: fa.FaEnvelope,
4812
5983
  ...magicProps.email
4813
5984
  }
4814
- ), /* @__PURE__ */ React__default.default.createElement(
5985
+ ), /* @__PURE__ */ React9__default.default.createElement(
4815
5986
  FormField_default,
4816
5987
  {
4817
5988
  label: t.labels?.phone || "Telefoon",
@@ -4825,7 +5996,7 @@ var ReservationStepTwo = ({
4825
5996
  icon: fa.FaPhone,
4826
5997
  ...magicProps.phone
4827
5998
  }
4828
- ), /* @__PURE__ */ React__default.default.createElement(
5999
+ ), /* @__PURE__ */ React9__default.default.createElement(
4829
6000
  FormField_default,
4830
6001
  {
4831
6002
  label: t.labels?.extraInfo || "Extra info",
@@ -4842,7 +6013,7 @@ var ReservationStepTwo = ({
4842
6013
  var ReservationStepTwo_default = ReservationStepTwo;
4843
6014
 
4844
6015
  // src/components/ReservationSummary/translations.json
4845
- var translations_default3 = {
6016
+ var translations_default4 = {
4846
6017
  nl: {
4847
6018
  reservationStepTwoFiltering: {
4848
6019
  labels: {
@@ -4973,13 +6144,13 @@ var ReservationSummary = ({
4973
6144
  formData,
4974
6145
  onNewReservation
4975
6146
  }) => {
4976
- const t = getSection(translations_default3, "reservationSummary");
4977
- return /* @__PURE__ */ React__default.default.createElement("div", { className: "reservation-summary" }, /* @__PURE__ */ React__default.default.createElement("ul", { className: "reservation-details" }, /* @__PURE__ */ React__default.default.createElement("li", null, /* @__PURE__ */ React__default.default.createElement("strong", null, t.title)), /* @__PURE__ */ React__default.default.createElement("li", null, /* @__PURE__ */ React__default.default.createElement("strong", null, t.guests, ":"), " ", formData.guests), /* @__PURE__ */ React__default.default.createElement("li", null, /* @__PURE__ */ React__default.default.createElement("strong", null, t.date, ":"), " ", formData.date), /* @__PURE__ */ React__default.default.createElement("li", null, /* @__PURE__ */ React__default.default.createElement("strong", null, t.time, ":"), " ", formData.time), /* @__PURE__ */ React__default.default.createElement("li", null, /* @__PURE__ */ React__default.default.createElement("strong", null, t.firstName, ":"), " ", formData.firstName), /* @__PURE__ */ React__default.default.createElement("li", null, /* @__PURE__ */ React__default.default.createElement("strong", null, t.lastName, ":"), " ", formData.lastName), /* @__PURE__ */ React__default.default.createElement("li", null, /* @__PURE__ */ React__default.default.createElement("strong", null, t.email, ":"), " ", formData.email), /* @__PURE__ */ React__default.default.createElement("li", null, /* @__PURE__ */ React__default.default.createElement("strong", null, t.phone, ":"), " ", formData.phone), formData.menu && /* @__PURE__ */ React__default.default.createElement("li", null, /* @__PURE__ */ React__default.default.createElement("strong", null, t.menu, ":"), " ", formData.menu), formData.personeel && /* @__PURE__ */ React__default.default.createElement("li", null, /* @__PURE__ */ React__default.default.createElement("strong", null, t.staff, ":"), " ", formData.personeel), formData.giftcard && /* @__PURE__ */ React__default.default.createElement("li", null, /* @__PURE__ */ React__default.default.createElement("strong", null, t.giftcard, ":"), " ", formData.giftcard), formData.extraInfo && /* @__PURE__ */ React__default.default.createElement("li", null, /* @__PURE__ */ React__default.default.createElement("strong", null, t.extraInfo, ":"), " ", formData.extraInfo), formData.zitplaats && /* @__PURE__ */ React__default.default.createElement("li", null, /* @__PURE__ */ React__default.default.createElement("strong", null, t.seatPlace, ":"), " ", formData.zitplaats)), /* @__PURE__ */ React__default.default.createElement("button", { className: "button-style-3", onClick: onNewReservation }, t.newReservationButton));
6147
+ const t = getSection(translations_default4, "reservationSummary");
6148
+ return /* @__PURE__ */ React9__default.default.createElement("div", { className: "reservation-summary" }, /* @__PURE__ */ React9__default.default.createElement("ul", { className: "reservation-details" }, /* @__PURE__ */ React9__default.default.createElement("li", null, /* @__PURE__ */ React9__default.default.createElement("strong", null, t.title)), /* @__PURE__ */ React9__default.default.createElement("li", null, /* @__PURE__ */ React9__default.default.createElement("strong", null, t.guests, ":"), " ", formData.guests), /* @__PURE__ */ React9__default.default.createElement("li", null, /* @__PURE__ */ React9__default.default.createElement("strong", null, t.date, ":"), " ", formData.date), /* @__PURE__ */ React9__default.default.createElement("li", null, /* @__PURE__ */ React9__default.default.createElement("strong", null, t.time, ":"), " ", formData.time), /* @__PURE__ */ React9__default.default.createElement("li", null, /* @__PURE__ */ React9__default.default.createElement("strong", null, t.firstName, ":"), " ", formData.firstName), /* @__PURE__ */ React9__default.default.createElement("li", null, /* @__PURE__ */ React9__default.default.createElement("strong", null, t.lastName, ":"), " ", formData.lastName), /* @__PURE__ */ React9__default.default.createElement("li", null, /* @__PURE__ */ React9__default.default.createElement("strong", null, t.email, ":"), " ", formData.email), /* @__PURE__ */ React9__default.default.createElement("li", null, /* @__PURE__ */ React9__default.default.createElement("strong", null, t.phone, ":"), " ", formData.phone), formData.menu && /* @__PURE__ */ React9__default.default.createElement("li", null, /* @__PURE__ */ React9__default.default.createElement("strong", null, t.menu, ":"), " ", formData.menu), formData.personeel && /* @__PURE__ */ React9__default.default.createElement("li", null, /* @__PURE__ */ React9__default.default.createElement("strong", null, t.staff, ":"), " ", formData.personeel), formData.giftcard && /* @__PURE__ */ React9__default.default.createElement("li", null, /* @__PURE__ */ React9__default.default.createElement("strong", null, t.giftcard, ":"), " ", formData.giftcard), formData.extraInfo && /* @__PURE__ */ React9__default.default.createElement("li", null, /* @__PURE__ */ React9__default.default.createElement("strong", null, t.extraInfo, ":"), " ", formData.extraInfo), formData.zitplaats && /* @__PURE__ */ React9__default.default.createElement("li", null, /* @__PURE__ */ React9__default.default.createElement("strong", null, t.seatPlace, ":"), " ", formData.zitplaats)), /* @__PURE__ */ React9__default.default.createElement("button", { className: "button-style-3", onClick: onNewReservation }, t.newReservationButton));
4978
6149
  };
4979
6150
  var ReservationSummary_default = ReservationSummary;
4980
6151
 
4981
6152
  // src/components/GiftcardSelection/translations.json
4982
- var translations_default4 = {
6153
+ var translations_default5 = {
4983
6154
  nl: {
4984
6155
  zitplaatsSelection: {
4985
6156
  labels: { seating: "Zitplaats" },
@@ -5022,9 +6193,9 @@ var GiftcardSelection = ({
5022
6193
  handleChange,
5023
6194
  resetFormDataFields
5024
6195
  }) => {
5025
- const t = getSection(translations_default4, "giftcardSelection");
5026
- const [availableGiftcards, setAvailableGiftcards] = React.useState([]);
5027
- React.useEffect(() => {
6196
+ const t = getSection(translations_default5, "giftcardSelection");
6197
+ const [availableGiftcards, setAvailableGiftcards] = React9.useState([]);
6198
+ React9.useEffect(() => {
5028
6199
  if (!restaurantData) return;
5029
6200
  const periods = ["breakfast", "lunch", "dinner"];
5030
6201
  const cards = /* @__PURE__ */ new Set();
@@ -5044,7 +6215,7 @@ var GiftcardSelection = ({
5044
6215
  handleChange({ target: { name: "giftcard", value: e.target.value } });
5045
6216
  resetFormDataFields(["date", "time"]);
5046
6217
  };
5047
- return /* @__PURE__ */ React__default.default.createElement("div", { className: "giftcard-selection" }, /* @__PURE__ */ React__default.default.createElement(
6218
+ return /* @__PURE__ */ React9__default.default.createElement("div", { className: "giftcard-selection" }, /* @__PURE__ */ React9__default.default.createElement(
5048
6219
  FormField_default,
5049
6220
  {
5050
6221
  label: t.labels?.giftcard || "Giftcard",
@@ -5060,7 +6231,7 @@ var GiftcardSelection = ({
5060
6231
  var GiftcardSelection_default = GiftcardSelection;
5061
6232
 
5062
6233
  // src/components/ZitplaatsSelection/translations.json
5063
- var translations_default5 = {
6234
+ var translations_default6 = {
5064
6235
  nl: {
5065
6236
  zitplaatsSelection: {
5066
6237
  labels: { seating: "Zitplaats" },
@@ -5103,9 +6274,9 @@ var ZitplaatsSelection = ({
5103
6274
  handleChange,
5104
6275
  resetFormDataFields
5105
6276
  }) => {
5106
- const [availableZitplaatsen, setAvailableZitplaatsen] = React.useState([]);
5107
- const t = getSection(translations_default5, "zitplaatsSelection");
5108
- React.useEffect(() => {
6277
+ const [availableZitplaatsen, setAvailableZitplaatsen] = React9.useState([]);
6278
+ const t = getSection(translations_default6, "zitplaatsSelection");
6279
+ React9.useEffect(() => {
5109
6280
  if (!restaurantData?.floors || !Array.isArray(restaurantData.floors)) return;
5110
6281
  const set = /* @__PURE__ */ new Set();
5111
6282
  restaurantData.floors.forEach(
@@ -5121,7 +6292,7 @@ var ZitplaatsSelection = ({
5121
6292
  const tableSettings = restaurantData?.["table-settings"] || {};
5122
6293
  const isTableAssignmentEnabled = tableSettings.isInstalled === true && tableSettings.assignmentMode === "automatic";
5123
6294
  if (!isTableAssignmentEnabled || availableZitplaatsen.length === 0) return null;
5124
- return /* @__PURE__ */ React__default.default.createElement("div", { className: "zitplaats-selection" }, /* @__PURE__ */ React__default.default.createElement("label", { htmlFor: "zitplaats", className: "form-label" }, t.labels?.seating || "Zitplaats"), /* @__PURE__ */ React__default.default.createElement("div", { className: "input-container select-field" }, /* @__PURE__ */ React__default.default.createElement(
6295
+ return /* @__PURE__ */ React9__default.default.createElement("div", { className: "zitplaats-selection" }, /* @__PURE__ */ React9__default.default.createElement("label", { htmlFor: "zitplaats", className: "form-label" }, t.labels?.seating || "Zitplaats"), /* @__PURE__ */ React9__default.default.createElement("div", { className: "input-container select-field" }, /* @__PURE__ */ React9__default.default.createElement(
5125
6296
  "select",
5126
6297
  {
5127
6298
  id: "zitplaats",
@@ -5129,8 +6300,8 @@ var ZitplaatsSelection = ({
5129
6300
  value: formData.zitplaats || "",
5130
6301
  onChange: handleZitplaatsChange
5131
6302
  },
5132
- /* @__PURE__ */ React__default.default.createElement("option", { value: "" }, t.options?.noPreference || "Geen voorkeur"),
5133
- availableZitplaatsen.map((zitplaats) => /* @__PURE__ */ React__default.default.createElement(
6303
+ /* @__PURE__ */ React9__default.default.createElement("option", { value: "" }, t.options?.noPreference || "Geen voorkeur"),
6304
+ availableZitplaatsen.map((zitplaats) => /* @__PURE__ */ React9__default.default.createElement(
5134
6305
  "option",
5135
6306
  {
5136
6307
  key: zitplaats,
@@ -5183,20 +6354,20 @@ var ReservationSidebar = ({
5183
6354
  onNewReservation,
5184
6355
  apiBaseDomain
5185
6356
  }) => {
5186
- React.useEffect(() => {
6357
+ React9.useEffect(() => {
5187
6358
  if (apiBaseDomain && !window.baseDomain) {
5188
6359
  window.baseDomain = apiBaseDomain;
5189
6360
  }
5190
6361
  }, [apiBaseDomain]);
5191
6362
  const api = useApi_default();
5192
- const [timeblocks, setTimeblocks] = React.useState([]);
5193
- const [loadingTimeblocks, setLoadingTimeblocks] = React.useState(false);
5194
- const [timeblocksError, setTimeblocksError] = React.useState(null);
5195
- const [menuData, setMenuData] = React.useState([]);
5196
- const [restaurantData, setRestaurantData] = React.useState({});
5197
- const [availablePersoneel, setAvailablePersoneel] = React.useState([]);
6363
+ const [timeblocks, setTimeblocks] = React9.useState([]);
6364
+ const [loadingTimeblocks, setLoadingTimeblocks] = React9.useState(false);
6365
+ const [timeblocksError, setTimeblocksError] = React9.useState(null);
6366
+ const [menuData, setMenuData] = React9.useState([]);
6367
+ const [restaurantData, setRestaurantData] = React9.useState({});
6368
+ const [availablePersoneel, setAvailablePersoneel] = React9.useState([]);
5198
6369
  const t = getSection(translationsReservationSidebar_default, "reservationSidebar");
5199
- const resetFormDataFields = React.useCallback(
6370
+ const resetFormDataFields = React9.useCallback(
5200
6371
  (fieldsToReset) => {
5201
6372
  setFormData((prev) => {
5202
6373
  const next = { ...prev };
@@ -5208,7 +6379,7 @@ var ReservationSidebar = ({
5208
6379
  },
5209
6380
  [setFormData]
5210
6381
  );
5211
- React.useEffect(() => {
6382
+ React9.useEffect(() => {
5212
6383
  if (!isOpen) return;
5213
6384
  setLoadingTimeblocks(true);
5214
6385
  const fetchData = async () => {
@@ -5239,7 +6410,7 @@ var ReservationSidebar = ({
5239
6410
  };
5240
6411
  fetchData();
5241
6412
  }, [isOpen, api]);
5242
- const handleNewReservationClick = React.useCallback(() => {
6413
+ const handleNewReservationClick = React9.useCallback(() => {
5243
6414
  setFormData({
5244
6415
  guests,
5245
6416
  date: "",
@@ -5260,21 +6431,21 @@ var ReservationSidebar = ({
5260
6431
  onNewReservation();
5261
6432
  }, [onNewReservation, setFormData]);
5262
6433
  const seatSelectionEnabled = !!restaurantData?.["general-settings"]?.seatSelectionEnabled;
5263
- return /* @__PURE__ */ React__default.default.createElement("div", { className: `reservation-sidebar-component ${isOpen ? "open" : ""}` }, /* @__PURE__ */ React__default.default.createElement("div", { className: "reservation-sidebar-content" }, /* @__PURE__ */ React__default.default.createElement("h2", { className: "admin-title" }, "Admin Reservatie"), /* @__PURE__ */ React__default.default.createElement(
6434
+ return /* @__PURE__ */ React9__default.default.createElement("div", { className: `reservation-sidebar-component ${isOpen ? "open" : ""}` }, /* @__PURE__ */ React9__default.default.createElement("div", { className: "reservation-sidebar-content" }, /* @__PURE__ */ React9__default.default.createElement("h2", { className: "admin-title" }, "Admin Reservatie"), /* @__PURE__ */ React9__default.default.createElement(
5264
6435
  "button",
5265
6436
  {
5266
6437
  className: "close-sidebar-button",
5267
6438
  onClick: onClose,
5268
6439
  "aria-label": "Sluiten"
5269
6440
  },
5270
- /* @__PURE__ */ React__default.default.createElement(fa.FaTimes, { size: 20, color: "#000" })
5271
- ), reservationSubmitted ? /* @__PURE__ */ React__default.default.createElement(
6441
+ /* @__PURE__ */ React9__default.default.createElement(fa.FaTimes, { size: 20, color: "#000" })
6442
+ ), reservationSubmitted ? /* @__PURE__ */ React9__default.default.createElement(
5272
6443
  ReservationSummary_default,
5273
6444
  {
5274
6445
  formData,
5275
6446
  onNewReservation: handleNewReservationClick
5276
6447
  }
5277
- ) : /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, restaurantData && Object.keys(restaurantData).length > 0 && /* @__PURE__ */ React__default.default.createElement("div", { className: "sidebar-section-giftcard" }, /* @__PURE__ */ React__default.default.createElement(
6448
+ ) : /* @__PURE__ */ React9__default.default.createElement(React9__default.default.Fragment, null, restaurantData && Object.keys(restaurantData).length > 0 && /* @__PURE__ */ React9__default.default.createElement("div", { className: "sidebar-section-giftcard" }, /* @__PURE__ */ React9__default.default.createElement(
5278
6449
  GiftcardSelection_default,
5279
6450
  {
5280
6451
  restaurantData,
@@ -5282,7 +6453,7 @@ var ReservationSidebar = ({
5282
6453
  handleChange,
5283
6454
  resetFormDataFields
5284
6455
  }
5285
- )), restaurantData && Object.keys(restaurantData).length > 0 && seatSelectionEnabled && /* @__PURE__ */ React__default.default.createElement("div", { className: "sidebar-section-zitplaats" }, /* @__PURE__ */ React__default.default.createElement(
6456
+ )), restaurantData && Object.keys(restaurantData).length > 0 && seatSelectionEnabled && /* @__PURE__ */ React9__default.default.createElement("div", { className: "sidebar-section-zitplaats" }, /* @__PURE__ */ React9__default.default.createElement(
5286
6457
  ZitplaatsSelection_default,
5287
6458
  {
5288
6459
  restaurantData,
@@ -5290,7 +6461,7 @@ var ReservationSidebar = ({
5290
6461
  handleChange,
5291
6462
  resetFormDataFields
5292
6463
  }
5293
- )), availablePersoneel.length > 0 && /* @__PURE__ */ React__default.default.createElement("div", { className: "sidebar-section-personeel" }, /* @__PURE__ */ React__default.default.createElement(
6464
+ )), availablePersoneel.length > 0 && /* @__PURE__ */ React9__default.default.createElement("div", { className: "sidebar-section-personeel" }, /* @__PURE__ */ React9__default.default.createElement(
5294
6465
  FormField_default,
5295
6466
  {
5296
6467
  label: "",
@@ -5305,7 +6476,7 @@ var ReservationSidebar = ({
5305
6476
  error: errors.personeel,
5306
6477
  selectPlaceholder: "Toewijzen aan persoon"
5307
6478
  }
5308
- )), /* @__PURE__ */ React__default.default.createElement("div", { className: "sidebar-section-one" }, /* @__PURE__ */ React__default.default.createElement(
6479
+ )), /* @__PURE__ */ React9__default.default.createElement("div", { className: "sidebar-section-one" }, /* @__PURE__ */ React9__default.default.createElement(
5309
6480
  ReservationStepOne_default,
5310
6481
  {
5311
6482
  formData,
@@ -5317,7 +6488,7 @@ var ReservationSidebar = ({
5317
6488
  timeblocksError,
5318
6489
  restaurantData
5319
6490
  }
5320
- )), /* @__PURE__ */ React__default.default.createElement("div", { className: "sidebar-section-two" }, /* @__PURE__ */ React__default.default.createElement(
6491
+ )), /* @__PURE__ */ React9__default.default.createElement("div", { className: "sidebar-section-two" }, /* @__PURE__ */ React9__default.default.createElement(
5321
6492
  ReservationStepTwo_default,
5322
6493
  {
5323
6494
  formData,
@@ -5327,7 +6498,7 @@ var ReservationSidebar = ({
5327
6498
  isSubmitting,
5328
6499
  menuData
5329
6500
  }
5330
- )), /* @__PURE__ */ React__default.default.createElement("div", { className: "reservation-footer" }, /* @__PURE__ */ React__default.default.createElement(
6501
+ )), /* @__PURE__ */ React9__default.default.createElement("div", { className: "reservation-footer" }, /* @__PURE__ */ React9__default.default.createElement(
5331
6502
  "button",
5332
6503
  {
5333
6504
  type: "button",