@loczer/storefront-sdk 0.197.0 → 0.199.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 (63) hide show
  1. package/dist/StorefrontContext.d.ts +483 -0
  2. package/dist/StorefrontContext.d.ts.map +1 -0
  3. package/dist/StorefrontContext.js +39 -0
  4. package/dist/StorefrontProvider.d.ts +6 -486
  5. package/dist/StorefrontProvider.d.ts.map +1 -1
  6. package/dist/StorefrontProvider.js +34 -67
  7. package/dist/chunks/pkg/ui/dist/{MorphingModalWizard-j1CgFGLe.js → MorphingModalWizard-DOH1GYVR.js} +1 -0
  8. package/dist/components/AboutSection/index.js +5 -5
  9. package/dist/components/BikeProductCard/index.d.ts +2 -1
  10. package/dist/components/BikeProductCard/index.d.ts.map +1 -1
  11. package/dist/components/BikeProductCard/index.js +28 -28
  12. package/dist/components/BookingBikeQuickAddCard/index.d.ts +19 -0
  13. package/dist/components/BookingBikeQuickAddCard/index.d.ts.map +1 -0
  14. package/dist/components/BookingBikeQuickAddCard/index.js +174 -0
  15. package/dist/components/BookingBikeVariantDialog/index.d.ts +5 -2
  16. package/dist/components/BookingBikeVariantDialog/index.d.ts.map +1 -1
  17. package/dist/components/BookingBikeVariantDialog/index.js +85 -93
  18. package/dist/components/BookingPeriodSelector/components/BookingEndDateField.js +1 -1
  19. package/dist/components/BookingPeriodSelector/components/BookingEndTimeField.js +1 -1
  20. package/dist/components/BookingPeriodSelector/components/BookingStartDateField.js +1 -1
  21. package/dist/components/BookingPeriodSelector/components/BookingStartTimeField.js +1 -1
  22. package/dist/components/ContactSection/index.js +107 -107
  23. package/dist/components/ContractSaleDocument/Invoice.d.ts.map +1 -1
  24. package/dist/components/ContractSaleDocument/Invoice.js +117 -111
  25. package/dist/components/Header/index.js +4 -4
  26. package/dist/components/Layout/index.d.ts.map +1 -1
  27. package/dist/components/Layout/index.js +47 -40
  28. package/dist/components/PlatformFooter/index.js +1 -1
  29. package/dist/components/ProductPriceBadge/index.d.ts +2 -1
  30. package/dist/components/ProductPriceBadge/index.d.ts.map +1 -1
  31. package/dist/components/ProductPriceBadge/index.js +72 -70
  32. package/dist/components/TestimonialsSection/index.js +1 -1
  33. package/dist/i18n/en.d.ts +3 -0
  34. package/dist/i18n/en.d.ts.map +1 -1
  35. package/dist/i18n/en.js +3 -0
  36. package/dist/i18n/fr.d.ts +3 -0
  37. package/dist/i18n/fr.d.ts.map +1 -1
  38. package/dist/i18n/fr.js +3 -0
  39. package/dist/index.d.ts +19 -2
  40. package/dist/index.js +59 -58
  41. package/dist/lib/cartSummary.js +7 -7
  42. package/dist/lib/products.d.ts +6 -0
  43. package/dist/lib/products.d.ts.map +1 -1
  44. package/dist/lib/products.js +36 -32
  45. package/dist/lib/toast.d.ts +9 -0
  46. package/dist/lib/toast.d.ts.map +1 -0
  47. package/dist/lib/toast.js +13 -0
  48. package/dist/pages/BookingPage.d.ts.map +1 -1
  49. package/dist/pages/BookingPage.js +323 -396
  50. package/dist/pages/CheckoutPage.js +217 -217
  51. package/dist/pages/CheckoutPaymentPage.js +124 -124
  52. package/dist/pages/ContractSaleDocumentPage.d.ts.map +1 -1
  53. package/dist/pages/ContractSaleDocumentPage.js +83 -83
  54. package/dist/pages/ErrorPage.d.ts.map +1 -1
  55. package/dist/pages/ErrorPage.js +13 -13
  56. package/dist/pages/HomePage.js +6 -3
  57. package/dist/pages/NotFoundPage.js +1 -1
  58. package/dist/pages/ProductPage.d.ts.map +1 -1
  59. package/dist/pages/ProductPage.js +177 -165
  60. package/dist/pages/checkout/components/CheckoutPaymentSummaryCard.js +1 -1
  61. package/dist/storefront.css +1 -1
  62. package/dist/ui/button.js +3 -3
  63. package/package.json +3 -1
@@ -0,0 +1,483 @@
1
+ import { Context } from 'react';
2
+ import { StorefrontI18nLanguage } from './i18n/I18nProvider';
3
+ import { AccessoryProduct, BikeProduct } from './lib/products';
4
+ import { StorefrontConfiguration } from './storefrontSchemas';
5
+ export type StorefrontContextValue = {
6
+ storeSlug: string;
7
+ storefrontConfiguration: StorefrontConfiguration;
8
+ bikes: BikeProduct[];
9
+ accessories: AccessoryProduct[];
10
+ bookingBikes: BikeProduct[];
11
+ bookingAccessories: AccessoryProduct[];
12
+ mapboxToken?: string;
13
+ language: StorefrontI18nLanguage;
14
+ };
15
+ export declare const StorefrontContext: Context<StorefrontContextValue | undefined>;
16
+ export declare function useStorefront(): StorefrontContextValue;
17
+ export declare function useOptionalStorefront(): StorefrontContextValue | undefined;
18
+ export declare function useStorefrontConfig(): {
19
+ config: {
20
+ storeSlug: string;
21
+ shop: {
22
+ id: string;
23
+ name: string;
24
+ slug?: string | undefined;
25
+ logoImageId?: string | undefined;
26
+ timeZone?: string | undefined;
27
+ url?: string | undefined;
28
+ googleMapsLink?: string | undefined;
29
+ googleRequestReviewsLink?: string | undefined;
30
+ emailAddress?: string | undefined;
31
+ contactPhone1?: string | undefined;
32
+ contactPhone2?: string | undefined;
33
+ address?: string | undefined;
34
+ city?: string | undefined;
35
+ country?: string | undefined;
36
+ gpsCoordinates?: [number, number] | undefined;
37
+ };
38
+ settings: {
39
+ status: "unpublished" | "published";
40
+ checkoutMode: "auto_approve_when_possible" | "manual_approval_required";
41
+ availabilityDisplay: {
42
+ defaultMode: "fewRemaining" | "fewRemainingCounts" | "remainingCounts" | "soldOutAndFewRemaining" | "soldOutOnly";
43
+ defaultFewRemainingThreshold?: number | undefined;
44
+ };
45
+ enabled: boolean;
46
+ fulfillmentModes: ("pickup" | "delivery")[];
47
+ deliveryDisabledReason: string;
48
+ sameDayCutoff: string;
49
+ };
50
+ bookingEngine: {
51
+ availabilityDisplay: {
52
+ defaultMode: "fewRemaining" | "fewRemainingCounts" | "remainingCounts" | "soldOutAndFewRemaining" | "soldOutOnly";
53
+ defaultFewRemainingThreshold?: number | undefined;
54
+ };
55
+ holdSettings: {
56
+ enabled: boolean;
57
+ defaultTtlMinutes: number;
58
+ };
59
+ pricing: {
60
+ baseUnit: "day" | "half_day" | "hour" | "month" | "week";
61
+ rentalUnits: {
62
+ unit: "day" | "half_day" | "hour" | "month" | "week";
63
+ durationHours: number;
64
+ label?: Record<string, {
65
+ [x: string]: unknown;
66
+ value: string;
67
+ updatedAt: Date;
68
+ autoTranslated?: boolean | undefined;
69
+ }> | undefined;
70
+ }[];
71
+ halfDay?: {
72
+ enabled: boolean;
73
+ boundaryHour: number;
74
+ } | undefined;
75
+ };
76
+ bookingDeposit: {
77
+ enabled: boolean;
78
+ percentage: number;
79
+ optimizeDepositAmount: boolean;
80
+ };
81
+ cancellationPolicy: {
82
+ tiers: {
83
+ upToHours: number;
84
+ refundPercentage: number;
85
+ }[];
86
+ };
87
+ securityDeposit: {
88
+ mode: "optional" | "disabled" | "required";
89
+ };
90
+ shop: {
91
+ timeZone: string;
92
+ openingHours: {
93
+ name: string;
94
+ startDate: string;
95
+ endDate: string;
96
+ openingHours: {
97
+ day: 0 | 1 | 2 | 3 | 4 | 5 | 6;
98
+ openingSlots: {
99
+ start: string;
100
+ end: string;
101
+ }[];
102
+ }[];
103
+ }[];
104
+ openingHoursOverrides?: {
105
+ date: string;
106
+ openingSlots: {
107
+ start: string;
108
+ end: string;
109
+ }[];
110
+ }[] | undefined;
111
+ extraTimeSlots?: {
112
+ minutesAfterClose: number;
113
+ extraAmount: number;
114
+ }[] | undefined;
115
+ };
116
+ currency: "CHF" | "EUR" | "GBP" | "USD";
117
+ checkout: {
118
+ mode: "auto_approve_when_possible" | "manual_approval_required";
119
+ dynamicOptions?: {
120
+ fulfillmentModes?: ("pickup" | "delivery")[] | undefined;
121
+ sameDayCutoff?: string | undefined;
122
+ } | undefined;
123
+ };
124
+ };
125
+ workspace?: {
126
+ name?: string | undefined;
127
+ workspaceLanguage?: "fr" | "en" | undefined;
128
+ languages?: string[] | undefined;
129
+ } | undefined;
130
+ content?: {
131
+ heroMode: "current_booking_hero" | "booking_bar_overlay_hero" | "vertical_marquee_hero";
132
+ galleryImageIds: string[];
133
+ whatsappPhone1Enabled: boolean;
134
+ whatsappPhone2Enabled: boolean;
135
+ showWhatsappFloatingButton: boolean;
136
+ modalMessages: {
137
+ id: string;
138
+ enabled: boolean;
139
+ showOnEachVisit: boolean;
140
+ startDate: string | null;
141
+ endDate: string | null;
142
+ imageIds: string[];
143
+ title?: Record<string, {
144
+ [x: string]: unknown;
145
+ value: string;
146
+ updatedAt: Date;
147
+ autoTranslated?: boolean | undefined;
148
+ }> | undefined;
149
+ subtitle?: Record<string, {
150
+ [x: string]: unknown;
151
+ value: string;
152
+ updatedAt: Date;
153
+ autoTranslated?: boolean | undefined;
154
+ }> | undefined;
155
+ message?: Record<string, {
156
+ version: 1;
157
+ json: string;
158
+ html: string;
159
+ text: string;
160
+ }> | undefined;
161
+ }[];
162
+ faq: {
163
+ general: {
164
+ id: string;
165
+ question: Record<string, {
166
+ [x: string]: unknown;
167
+ value: string;
168
+ updatedAt: Date;
169
+ autoTranslated?: boolean | undefined;
170
+ }>;
171
+ answer: Record<string, {
172
+ [x: string]: unknown;
173
+ value: string;
174
+ updatedAt: Date;
175
+ autoTranslated?: boolean | undefined;
176
+ }>;
177
+ }[];
178
+ deliveries: {
179
+ id: string;
180
+ question: Record<string, {
181
+ [x: string]: unknown;
182
+ value: string;
183
+ updatedAt: Date;
184
+ autoTranslated?: boolean | undefined;
185
+ }>;
186
+ answer: Record<string, {
187
+ [x: string]: unknown;
188
+ value: string;
189
+ updatedAt: Date;
190
+ autoTranslated?: boolean | undefined;
191
+ }>;
192
+ }[];
193
+ booking: {
194
+ id: string;
195
+ question: Record<string, {
196
+ [x: string]: unknown;
197
+ value: string;
198
+ updatedAt: Date;
199
+ autoTranslated?: boolean | undefined;
200
+ }>;
201
+ answer: Record<string, {
202
+ [x: string]: unknown;
203
+ value: string;
204
+ updatedAt: Date;
205
+ autoTranslated?: boolean | undefined;
206
+ }>;
207
+ }[];
208
+ };
209
+ tagline?: Record<string, {
210
+ [x: string]: unknown;
211
+ value: string;
212
+ updatedAt: Date;
213
+ autoTranslated?: boolean | undefined;
214
+ }> | undefined;
215
+ logoSquareImageId?: string | undefined;
216
+ logoWideImageId?: string | undefined;
217
+ topBannerMessage?: Record<string, {
218
+ [x: string]: unknown;
219
+ value: string;
220
+ updatedAt: Date;
221
+ autoTranslated?: boolean | undefined;
222
+ }> | undefined;
223
+ about?: Record<string, {
224
+ version: 1;
225
+ json: string;
226
+ html: string;
227
+ text: string;
228
+ }> | undefined;
229
+ whatsappMessage?: Record<string, {
230
+ [x: string]: unknown;
231
+ value: string;
232
+ updatedAt: Date;
233
+ autoTranslated?: boolean | undefined;
234
+ }> | undefined;
235
+ } | undefined;
236
+ modules?: {
237
+ reviews?: {
238
+ enabled: boolean;
239
+ showRecentReviewsOnStorefront: boolean;
240
+ } | undefined;
241
+ insurance?: {
242
+ enabled: boolean;
243
+ } | undefined;
244
+ } | undefined;
245
+ };
246
+ storefrontConfiguration: {
247
+ storeSlug: string;
248
+ shop: {
249
+ id: string;
250
+ name: string;
251
+ slug?: string | undefined;
252
+ logoImageId?: string | undefined;
253
+ timeZone?: string | undefined;
254
+ url?: string | undefined;
255
+ googleMapsLink?: string | undefined;
256
+ googleRequestReviewsLink?: string | undefined;
257
+ emailAddress?: string | undefined;
258
+ contactPhone1?: string | undefined;
259
+ contactPhone2?: string | undefined;
260
+ address?: string | undefined;
261
+ city?: string | undefined;
262
+ country?: string | undefined;
263
+ gpsCoordinates?: [number, number] | undefined;
264
+ };
265
+ settings: {
266
+ status: "unpublished" | "published";
267
+ checkoutMode: "auto_approve_when_possible" | "manual_approval_required";
268
+ availabilityDisplay: {
269
+ defaultMode: "fewRemaining" | "fewRemainingCounts" | "remainingCounts" | "soldOutAndFewRemaining" | "soldOutOnly";
270
+ defaultFewRemainingThreshold?: number | undefined;
271
+ };
272
+ enabled: boolean;
273
+ fulfillmentModes: ("pickup" | "delivery")[];
274
+ deliveryDisabledReason: string;
275
+ sameDayCutoff: string;
276
+ };
277
+ bookingEngine: {
278
+ availabilityDisplay: {
279
+ defaultMode: "fewRemaining" | "fewRemainingCounts" | "remainingCounts" | "soldOutAndFewRemaining" | "soldOutOnly";
280
+ defaultFewRemainingThreshold?: number | undefined;
281
+ };
282
+ holdSettings: {
283
+ enabled: boolean;
284
+ defaultTtlMinutes: number;
285
+ };
286
+ pricing: {
287
+ baseUnit: "day" | "half_day" | "hour" | "month" | "week";
288
+ rentalUnits: {
289
+ unit: "day" | "half_day" | "hour" | "month" | "week";
290
+ durationHours: number;
291
+ label?: Record<string, {
292
+ [x: string]: unknown;
293
+ value: string;
294
+ updatedAt: Date;
295
+ autoTranslated?: boolean | undefined;
296
+ }> | undefined;
297
+ }[];
298
+ halfDay?: {
299
+ enabled: boolean;
300
+ boundaryHour: number;
301
+ } | undefined;
302
+ };
303
+ bookingDeposit: {
304
+ enabled: boolean;
305
+ percentage: number;
306
+ optimizeDepositAmount: boolean;
307
+ };
308
+ cancellationPolicy: {
309
+ tiers: {
310
+ upToHours: number;
311
+ refundPercentage: number;
312
+ }[];
313
+ };
314
+ securityDeposit: {
315
+ mode: "optional" | "disabled" | "required";
316
+ };
317
+ shop: {
318
+ timeZone: string;
319
+ openingHours: {
320
+ name: string;
321
+ startDate: string;
322
+ endDate: string;
323
+ openingHours: {
324
+ day: 0 | 1 | 2 | 3 | 4 | 5 | 6;
325
+ openingSlots: {
326
+ start: string;
327
+ end: string;
328
+ }[];
329
+ }[];
330
+ }[];
331
+ openingHoursOverrides?: {
332
+ date: string;
333
+ openingSlots: {
334
+ start: string;
335
+ end: string;
336
+ }[];
337
+ }[] | undefined;
338
+ extraTimeSlots?: {
339
+ minutesAfterClose: number;
340
+ extraAmount: number;
341
+ }[] | undefined;
342
+ };
343
+ currency: "CHF" | "EUR" | "GBP" | "USD";
344
+ checkout: {
345
+ mode: "auto_approve_when_possible" | "manual_approval_required";
346
+ dynamicOptions?: {
347
+ fulfillmentModes?: ("pickup" | "delivery")[] | undefined;
348
+ sameDayCutoff?: string | undefined;
349
+ } | undefined;
350
+ };
351
+ };
352
+ workspace?: {
353
+ name?: string | undefined;
354
+ workspaceLanguage?: "fr" | "en" | undefined;
355
+ languages?: string[] | undefined;
356
+ } | undefined;
357
+ content?: {
358
+ heroMode: "current_booking_hero" | "booking_bar_overlay_hero" | "vertical_marquee_hero";
359
+ galleryImageIds: string[];
360
+ whatsappPhone1Enabled: boolean;
361
+ whatsappPhone2Enabled: boolean;
362
+ showWhatsappFloatingButton: boolean;
363
+ modalMessages: {
364
+ id: string;
365
+ enabled: boolean;
366
+ showOnEachVisit: boolean;
367
+ startDate: string | null;
368
+ endDate: string | null;
369
+ imageIds: string[];
370
+ title?: Record<string, {
371
+ [x: string]: unknown;
372
+ value: string;
373
+ updatedAt: Date;
374
+ autoTranslated?: boolean | undefined;
375
+ }> | undefined;
376
+ subtitle?: Record<string, {
377
+ [x: string]: unknown;
378
+ value: string;
379
+ updatedAt: Date;
380
+ autoTranslated?: boolean | undefined;
381
+ }> | undefined;
382
+ message?: Record<string, {
383
+ version: 1;
384
+ json: string;
385
+ html: string;
386
+ text: string;
387
+ }> | undefined;
388
+ }[];
389
+ faq: {
390
+ general: {
391
+ id: string;
392
+ question: Record<string, {
393
+ [x: string]: unknown;
394
+ value: string;
395
+ updatedAt: Date;
396
+ autoTranslated?: boolean | undefined;
397
+ }>;
398
+ answer: Record<string, {
399
+ [x: string]: unknown;
400
+ value: string;
401
+ updatedAt: Date;
402
+ autoTranslated?: boolean | undefined;
403
+ }>;
404
+ }[];
405
+ deliveries: {
406
+ id: string;
407
+ question: Record<string, {
408
+ [x: string]: unknown;
409
+ value: string;
410
+ updatedAt: Date;
411
+ autoTranslated?: boolean | undefined;
412
+ }>;
413
+ answer: Record<string, {
414
+ [x: string]: unknown;
415
+ value: string;
416
+ updatedAt: Date;
417
+ autoTranslated?: boolean | undefined;
418
+ }>;
419
+ }[];
420
+ booking: {
421
+ id: string;
422
+ question: Record<string, {
423
+ [x: string]: unknown;
424
+ value: string;
425
+ updatedAt: Date;
426
+ autoTranslated?: boolean | undefined;
427
+ }>;
428
+ answer: Record<string, {
429
+ [x: string]: unknown;
430
+ value: string;
431
+ updatedAt: Date;
432
+ autoTranslated?: boolean | undefined;
433
+ }>;
434
+ }[];
435
+ };
436
+ tagline?: Record<string, {
437
+ [x: string]: unknown;
438
+ value: string;
439
+ updatedAt: Date;
440
+ autoTranslated?: boolean | undefined;
441
+ }> | undefined;
442
+ logoSquareImageId?: string | undefined;
443
+ logoWideImageId?: string | undefined;
444
+ topBannerMessage?: Record<string, {
445
+ [x: string]: unknown;
446
+ value: string;
447
+ updatedAt: Date;
448
+ autoTranslated?: boolean | undefined;
449
+ }> | undefined;
450
+ about?: Record<string, {
451
+ version: 1;
452
+ json: string;
453
+ html: string;
454
+ text: string;
455
+ }> | undefined;
456
+ whatsappMessage?: Record<string, {
457
+ [x: string]: unknown;
458
+ value: string;
459
+ updatedAt: Date;
460
+ autoTranslated?: boolean | undefined;
461
+ }> | undefined;
462
+ } | undefined;
463
+ modules?: {
464
+ reviews?: {
465
+ enabled: boolean;
466
+ showRecentReviewsOnStorefront: boolean;
467
+ } | undefined;
468
+ insurance?: {
469
+ enabled: boolean;
470
+ } | undefined;
471
+ } | undefined;
472
+ };
473
+ };
474
+ export declare function useStorefrontWorkspaceLanguage(): StorefrontI18nLanguage;
475
+ export declare function useStorefrontProducts(): {
476
+ bikes: BikeProduct[];
477
+ accessories: AccessoryProduct[];
478
+ };
479
+ export declare function useStorefrontBookingProducts(): {
480
+ bikes: BikeProduct[];
481
+ accessories: AccessoryProduct[];
482
+ };
483
+ //# sourceMappingURL=StorefrontContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StorefrontContext.d.ts","sourceRoot":"","sources":["../src/StorefrontContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,OAAO,EAAE,MAAM,OAAO,CAAA;AAE/D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AACjE,OAAO,KAAK,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAA;AAGlE,MAAM,MAAM,sBAAsB,GAAG;IACnC,SAAS,EAAE,MAAM,CAAA;IACjB,uBAAuB,EAAE,uBAAuB,CAAA;IAChD,KAAK,EAAE,WAAW,EAAE,CAAA;IACpB,WAAW,EAAE,gBAAgB,EAAE,CAAA;IAC/B,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,kBAAkB,EAAE,gBAAgB,EAAE,CAAA;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,sBAAsB,CAAA;CACjC,CAAA;AAUD,eAAO,MAAM,iBAAiB,6CAEmC,CAAA;AAKjE,wBAAgB,aAAa,2BAQ5B;AAED,wBAAgB,qBAAqB,uCAEpC;AAED,wBAAgB,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMlC;AAED,wBAAgB,8BAA8B,IAAI,sBAAsB,CAGvE;AAED,wBAAgB,qBAAqB;;;EAGpC;AAED,wBAAgB,4BAA4B;;;EAG3C"}
@@ -0,0 +1,39 @@
1
+ import { createContext as e, useContext as t } from "react";
2
+ //#region src/StorefrontContext.ts
3
+ var n = globalThis, r = n.__LOCZER_STOREFRONT_CONTEXT__ ?? e(void 0);
4
+ n.__LOCZER_STOREFRONT_CONTEXT__ = r, r.displayName = "StorefrontContext";
5
+ function i() {
6
+ let e = t(r);
7
+ if (e === void 0) throw Error("useStorefront must be used within StorefrontProvider");
8
+ return e;
9
+ }
10
+ function a() {
11
+ return t(r);
12
+ }
13
+ function o() {
14
+ let { storefrontConfiguration: e } = i();
15
+ return {
16
+ config: e,
17
+ storefrontConfiguration: e
18
+ };
19
+ }
20
+ function s() {
21
+ let { storefrontConfiguration: e } = i();
22
+ return e.workspace?.workspaceLanguage ?? "en";
23
+ }
24
+ function c() {
25
+ let { bikes: e, accessories: t } = i();
26
+ return {
27
+ bikes: e,
28
+ accessories: t
29
+ };
30
+ }
31
+ function l() {
32
+ let { bookingBikes: e, bookingAccessories: t } = i();
33
+ return {
34
+ bikes: e,
35
+ accessories: t
36
+ };
37
+ }
38
+ //#endregion
39
+ export { r as StorefrontContext, a as useOptionalStorefront, i as useStorefront, l as useStorefrontBookingProducts, o as useStorefrontConfig, c as useStorefrontProducts, s as useStorefrontWorkspaceLanguage };