@planetaexo/design-system 0.2.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.
- package/README.md +121 -0
- package/dist/index.cjs +1163 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +79 -0
- package/dist/index.d.ts +79 -0
- package/dist/index.js +1139 -0
- package/dist/index.js.map +1 -0
- package/package.json +61 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,1163 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React3 = require('react');
|
|
4
|
+
var lucideReact = require('lucide-react');
|
|
5
|
+
var clsx = require('clsx');
|
|
6
|
+
var tailwindMerge = require('tailwind-merge');
|
|
7
|
+
var separator = require('@base-ui/react/separator');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
9
|
+
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var React3__namespace = /*#__PURE__*/_interopNamespace(React3);
|
|
29
|
+
|
|
30
|
+
var __defProp = Object.defineProperty;
|
|
31
|
+
var __defProps = Object.defineProperties;
|
|
32
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
33
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
34
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
35
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
36
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
37
|
+
var __spreadValues = (a, b) => {
|
|
38
|
+
for (var prop in b || (b = {}))
|
|
39
|
+
if (__hasOwnProp.call(b, prop))
|
|
40
|
+
__defNormalProp(a, prop, b[prop]);
|
|
41
|
+
if (__getOwnPropSymbols)
|
|
42
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
43
|
+
if (__propIsEnum.call(b, prop))
|
|
44
|
+
__defNormalProp(a, prop, b[prop]);
|
|
45
|
+
}
|
|
46
|
+
return a;
|
|
47
|
+
};
|
|
48
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
49
|
+
var __objRest = (source, exclude) => {
|
|
50
|
+
var target = {};
|
|
51
|
+
for (var prop in source)
|
|
52
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
53
|
+
target[prop] = source[prop];
|
|
54
|
+
if (source != null && __getOwnPropSymbols)
|
|
55
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
56
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
57
|
+
target[prop] = source[prop];
|
|
58
|
+
}
|
|
59
|
+
return target;
|
|
60
|
+
};
|
|
61
|
+
function cn(...inputs) {
|
|
62
|
+
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
63
|
+
}
|
|
64
|
+
function Separator(_a) {
|
|
65
|
+
var _b = _a, {
|
|
66
|
+
className,
|
|
67
|
+
orientation = "horizontal"
|
|
68
|
+
} = _b, props = __objRest(_b, [
|
|
69
|
+
"className",
|
|
70
|
+
"orientation"
|
|
71
|
+
]);
|
|
72
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
73
|
+
separator.Separator,
|
|
74
|
+
__spreadValues({
|
|
75
|
+
"data-slot": "separator",
|
|
76
|
+
orientation,
|
|
77
|
+
className: cn(
|
|
78
|
+
"shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",
|
|
79
|
+
className
|
|
80
|
+
)
|
|
81
|
+
}, props)
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
var FloatingInput = React3__namespace.forwardRef(
|
|
85
|
+
(_a, ref) => {
|
|
86
|
+
var _b = _a, { label, error, id, className, required } = _b, props = __objRest(_b, ["label", "error", "id", "className", "required"]);
|
|
87
|
+
const inputId = id != null ? id : React3__namespace.useId();
|
|
88
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
|
|
89
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
90
|
+
"input",
|
|
91
|
+
__spreadValues({
|
|
92
|
+
id: inputId,
|
|
93
|
+
ref,
|
|
94
|
+
placeholder: " ",
|
|
95
|
+
className: cn(
|
|
96
|
+
"peer block w-full rounded-lg border border-border bg-background",
|
|
97
|
+
"px-3 pt-5 pb-2 text-base text-foreground font-ui",
|
|
98
|
+
"transition-colors placeholder-transparent",
|
|
99
|
+
"focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",
|
|
100
|
+
error && "border-destructive focus:border-destructive focus:ring-destructive"
|
|
101
|
+
),
|
|
102
|
+
required
|
|
103
|
+
}, props)
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
106
|
+
"label",
|
|
107
|
+
{
|
|
108
|
+
htmlFor: inputId,
|
|
109
|
+
className: cn(
|
|
110
|
+
"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2",
|
|
111
|
+
"text-base text-muted-foreground font-ui transition-all duration-150",
|
|
112
|
+
/* When peer has content or is focused, float up */
|
|
113
|
+
"peer-focus:top-3 peer-focus:translate-y-0 peer-focus:text-xs peer-focus:text-primary",
|
|
114
|
+
"peer-not-placeholder-shown:top-3 peer-not-placeholder-shown:translate-y-0 peer-not-placeholder-shown:text-xs peer-not-placeholder-shown:text-muted-foreground"
|
|
115
|
+
),
|
|
116
|
+
children: [
|
|
117
|
+
label,
|
|
118
|
+
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary ml-0.5", children: "*" })
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
),
|
|
122
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-destructive font-ui", children: error })
|
|
123
|
+
] });
|
|
124
|
+
}
|
|
125
|
+
);
|
|
126
|
+
FloatingInput.displayName = "FloatingInput";
|
|
127
|
+
var FloatingSelect = React3__namespace.forwardRef(
|
|
128
|
+
(_a, ref) => {
|
|
129
|
+
var _b = _a, { label, error, id, className, required, children } = _b, props = __objRest(_b, ["label", "error", "id", "className", "required", "children"]);
|
|
130
|
+
const inputId = id != null ? id : React3__namespace.useId();
|
|
131
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative", className), children: [
|
|
132
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
133
|
+
"select",
|
|
134
|
+
__spreadProps(__spreadValues({
|
|
135
|
+
id: inputId,
|
|
136
|
+
ref,
|
|
137
|
+
className: cn(
|
|
138
|
+
"peer block w-full appearance-none rounded-lg border border-border bg-background",
|
|
139
|
+
"px-3 pt-5 pb-2 text-base text-foreground font-ui",
|
|
140
|
+
"transition-colors",
|
|
141
|
+
"focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",
|
|
142
|
+
error && "border-destructive"
|
|
143
|
+
),
|
|
144
|
+
required
|
|
145
|
+
}, props), {
|
|
146
|
+
children
|
|
147
|
+
})
|
|
148
|
+
),
|
|
149
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute right-3 top-1/2 -translate-y-1/2", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
150
|
+
"svg",
|
|
151
|
+
{
|
|
152
|
+
className: "h-4 w-4 text-muted-foreground",
|
|
153
|
+
viewBox: "0 0 24 24",
|
|
154
|
+
fill: "none",
|
|
155
|
+
stroke: "currentColor",
|
|
156
|
+
strokeWidth: "2",
|
|
157
|
+
strokeLinecap: "round",
|
|
158
|
+
strokeLinejoin: "round",
|
|
159
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m6 9 6 6 6-6" })
|
|
160
|
+
}
|
|
161
|
+
) }),
|
|
162
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
163
|
+
"label",
|
|
164
|
+
{
|
|
165
|
+
htmlFor: inputId,
|
|
166
|
+
className: cn(
|
|
167
|
+
"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2",
|
|
168
|
+
"text-base text-muted-foreground font-ui transition-all duration-150",
|
|
169
|
+
"peer-focus:top-3 peer-focus:translate-y-0 peer-focus:text-xs peer-focus:text-primary",
|
|
170
|
+
"peer-not-placeholder-shown:top-3 peer-not-placeholder-shown:translate-y-0 peer-not-placeholder-shown:text-xs"
|
|
171
|
+
),
|
|
172
|
+
children: [
|
|
173
|
+
label,
|
|
174
|
+
required && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary ml-0.5", children: "*" })
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
),
|
|
178
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-destructive font-ui", children: error })
|
|
179
|
+
] });
|
|
180
|
+
}
|
|
181
|
+
);
|
|
182
|
+
FloatingSelect.displayName = "FloatingSelect";
|
|
183
|
+
|
|
184
|
+
// src/lib/phone-countries.ts
|
|
185
|
+
var PHONE_PRIORITY = [
|
|
186
|
+
{ code: "BR", name: "Brasil", flag: "\u{1F1E7}\u{1F1F7}", dial: "+55" },
|
|
187
|
+
{ code: "DE", name: "Deutschland", flag: "\u{1F1E9}\u{1F1EA}", dial: "+49" },
|
|
188
|
+
{ code: "FR", name: "France", flag: "\u{1F1EB}\u{1F1F7}", dial: "+33" },
|
|
189
|
+
{ code: "US", name: "United States", flag: "\u{1F1FA}\u{1F1F8}", dial: "+1" },
|
|
190
|
+
{ code: "GB", name: "United Kingdom", flag: "\u{1F1EC}\u{1F1E7}", dial: "+44" },
|
|
191
|
+
{ code: "NL", name: "Netherlands", flag: "\u{1F1F3}\u{1F1F1}", dial: "+31" }
|
|
192
|
+
];
|
|
193
|
+
var PHONE_REST = [
|
|
194
|
+
{ code: "AF", name: "Afghanistan", flag: "\u{1F1E6}\u{1F1EB}", dial: "+93" },
|
|
195
|
+
{ code: "AL", name: "Albania", flag: "\u{1F1E6}\u{1F1F1}", dial: "+355" },
|
|
196
|
+
{ code: "DZ", name: "Algeria", flag: "\u{1F1E9}\u{1F1FF}", dial: "+213" },
|
|
197
|
+
{ code: "AD", name: "Andorra", flag: "\u{1F1E6}\u{1F1E9}", dial: "+376" },
|
|
198
|
+
{ code: "AO", name: "Angola", flag: "\u{1F1E6}\u{1F1F4}", dial: "+244" },
|
|
199
|
+
{ code: "AG", name: "Antigua and Barbuda", flag: "\u{1F1E6}\u{1F1EC}", dial: "+1268" },
|
|
200
|
+
{ code: "AR", name: "Argentina", flag: "\u{1F1E6}\u{1F1F7}", dial: "+54" },
|
|
201
|
+
{ code: "AM", name: "Armenia", flag: "\u{1F1E6}\u{1F1F2}", dial: "+374" },
|
|
202
|
+
{ code: "AU", name: "Australia", flag: "\u{1F1E6}\u{1F1FA}", dial: "+61" },
|
|
203
|
+
{ code: "AT", name: "Austria", flag: "\u{1F1E6}\u{1F1F9}", dial: "+43" },
|
|
204
|
+
{ code: "AZ", name: "Azerbaijan", flag: "\u{1F1E6}\u{1F1FF}", dial: "+994" },
|
|
205
|
+
{ code: "BS", name: "Bahamas", flag: "\u{1F1E7}\u{1F1F8}", dial: "+1242" },
|
|
206
|
+
{ code: "BH", name: "Bahrain", flag: "\u{1F1E7}\u{1F1ED}", dial: "+973" },
|
|
207
|
+
{ code: "BD", name: "Bangladesh", flag: "\u{1F1E7}\u{1F1E9}", dial: "+880" },
|
|
208
|
+
{ code: "BB", name: "Barbados", flag: "\u{1F1E7}\u{1F1E7}", dial: "+1246" },
|
|
209
|
+
{ code: "BY", name: "Belarus", flag: "\u{1F1E7}\u{1F1FE}", dial: "+375" },
|
|
210
|
+
{ code: "BE", name: "Belgium", flag: "\u{1F1E7}\u{1F1EA}", dial: "+32" },
|
|
211
|
+
{ code: "BZ", name: "Belize", flag: "\u{1F1E7}\u{1F1FF}", dial: "+501" },
|
|
212
|
+
{ code: "BJ", name: "Benin", flag: "\u{1F1E7}\u{1F1EF}", dial: "+229" },
|
|
213
|
+
{ code: "BT", name: "Bhutan", flag: "\u{1F1E7}\u{1F1F9}", dial: "+975" },
|
|
214
|
+
{ code: "BO", name: "Bolivia", flag: "\u{1F1E7}\u{1F1F4}", dial: "+591" },
|
|
215
|
+
{ code: "BA", name: "Bosnia and Herzegovina", flag: "\u{1F1E7}\u{1F1E6}", dial: "+387" },
|
|
216
|
+
{ code: "BW", name: "Botswana", flag: "\u{1F1E7}\u{1F1FC}", dial: "+267" },
|
|
217
|
+
{ code: "BN", name: "Brunei", flag: "\u{1F1E7}\u{1F1F3}", dial: "+673" },
|
|
218
|
+
{ code: "BG", name: "Bulgaria", flag: "\u{1F1E7}\u{1F1EC}", dial: "+359" },
|
|
219
|
+
{ code: "BF", name: "Burkina Faso", flag: "\u{1F1E7}\u{1F1EB}", dial: "+226" },
|
|
220
|
+
{ code: "BI", name: "Burundi", flag: "\u{1F1E7}\u{1F1EE}", dial: "+257" },
|
|
221
|
+
{ code: "CV", name: "Cabo Verde", flag: "\u{1F1E8}\u{1F1FB}", dial: "+238" },
|
|
222
|
+
{ code: "KH", name: "Cambodia", flag: "\u{1F1F0}\u{1F1ED}", dial: "+855" },
|
|
223
|
+
{ code: "CM", name: "Cameroon", flag: "\u{1F1E8}\u{1F1F2}", dial: "+237" },
|
|
224
|
+
{ code: "CA", name: "Canada", flag: "\u{1F1E8}\u{1F1E6}", dial: "+1" },
|
|
225
|
+
{ code: "CF", name: "Central African Republic", flag: "\u{1F1E8}\u{1F1EB}", dial: "+236" },
|
|
226
|
+
{ code: "TD", name: "Chad", flag: "\u{1F1F9}\u{1F1E9}", dial: "+235" },
|
|
227
|
+
{ code: "CL", name: "Chile", flag: "\u{1F1E8}\u{1F1F1}", dial: "+56" },
|
|
228
|
+
{ code: "CN", name: "China", flag: "\u{1F1E8}\u{1F1F3}", dial: "+86" },
|
|
229
|
+
{ code: "CO", name: "Colombia", flag: "\u{1F1E8}\u{1F1F4}", dial: "+57" },
|
|
230
|
+
{ code: "KM", name: "Comoros", flag: "\u{1F1F0}\u{1F1F2}", dial: "+269" },
|
|
231
|
+
{ code: "CG", name: "Congo", flag: "\u{1F1E8}\u{1F1EC}", dial: "+242" },
|
|
232
|
+
{ code: "CD", name: "Congo (DRC)", flag: "\u{1F1E8}\u{1F1E9}", dial: "+243" },
|
|
233
|
+
{ code: "CR", name: "Costa Rica", flag: "\u{1F1E8}\u{1F1F7}", dial: "+506" },
|
|
234
|
+
{ code: "HR", name: "Croatia", flag: "\u{1F1ED}\u{1F1F7}", dial: "+385" },
|
|
235
|
+
{ code: "CU", name: "Cuba", flag: "\u{1F1E8}\u{1F1FA}", dial: "+53" },
|
|
236
|
+
{ code: "CY", name: "Cyprus", flag: "\u{1F1E8}\u{1F1FE}", dial: "+357" },
|
|
237
|
+
{ code: "CZ", name: "Czech Republic", flag: "\u{1F1E8}\u{1F1FF}", dial: "+420" },
|
|
238
|
+
{ code: "DK", name: "Denmark", flag: "\u{1F1E9}\u{1F1F0}", dial: "+45" },
|
|
239
|
+
{ code: "DJ", name: "Djibouti", flag: "\u{1F1E9}\u{1F1EF}", dial: "+253" },
|
|
240
|
+
{ code: "DM", name: "Dominica", flag: "\u{1F1E9}\u{1F1F2}", dial: "+1767" },
|
|
241
|
+
{ code: "DO", name: "Dominican Republic", flag: "\u{1F1E9}\u{1F1F4}", dial: "+1809" },
|
|
242
|
+
{ code: "EC", name: "Ecuador", flag: "\u{1F1EA}\u{1F1E8}", dial: "+593" },
|
|
243
|
+
{ code: "EG", name: "Egypt", flag: "\u{1F1EA}\u{1F1EC}", dial: "+20" },
|
|
244
|
+
{ code: "SV", name: "El Salvador", flag: "\u{1F1F8}\u{1F1FB}", dial: "+503" },
|
|
245
|
+
{ code: "GQ", name: "Equatorial Guinea", flag: "\u{1F1EC}\u{1F1F6}", dial: "+240" },
|
|
246
|
+
{ code: "ER", name: "Eritrea", flag: "\u{1F1EA}\u{1F1F7}", dial: "+291" },
|
|
247
|
+
{ code: "EE", name: "Estonia", flag: "\u{1F1EA}\u{1F1EA}", dial: "+372" },
|
|
248
|
+
{ code: "SZ", name: "Eswatini", flag: "\u{1F1F8}\u{1F1FF}", dial: "+268" },
|
|
249
|
+
{ code: "ET", name: "Ethiopia", flag: "\u{1F1EA}\u{1F1F9}", dial: "+251" },
|
|
250
|
+
{ code: "FJ", name: "Fiji", flag: "\u{1F1EB}\u{1F1EF}", dial: "+679" },
|
|
251
|
+
{ code: "FI", name: "Finland", flag: "\u{1F1EB}\u{1F1EE}", dial: "+358" },
|
|
252
|
+
{ code: "GA", name: "Gabon", flag: "\u{1F1EC}\u{1F1E6}", dial: "+241" },
|
|
253
|
+
{ code: "GM", name: "Gambia", flag: "\u{1F1EC}\u{1F1F2}", dial: "+220" },
|
|
254
|
+
{ code: "GE", name: "Georgia", flag: "\u{1F1EC}\u{1F1EA}", dial: "+995" },
|
|
255
|
+
{ code: "GH", name: "Ghana", flag: "\u{1F1EC}\u{1F1ED}", dial: "+233" },
|
|
256
|
+
{ code: "GR", name: "Greece", flag: "\u{1F1EC}\u{1F1F7}", dial: "+30" },
|
|
257
|
+
{ code: "GD", name: "Grenada", flag: "\u{1F1EC}\u{1F1E9}", dial: "+1473" },
|
|
258
|
+
{ code: "GT", name: "Guatemala", flag: "\u{1F1EC}\u{1F1F9}", dial: "+502" },
|
|
259
|
+
{ code: "GN", name: "Guinea", flag: "\u{1F1EC}\u{1F1F3}", dial: "+224" },
|
|
260
|
+
{ code: "GW", name: "Guinea-Bissau", flag: "\u{1F1EC}\u{1F1FC}", dial: "+245" },
|
|
261
|
+
{ code: "GY", name: "Guyana", flag: "\u{1F1EC}\u{1F1FE}", dial: "+592" },
|
|
262
|
+
{ code: "HT", name: "Haiti", flag: "\u{1F1ED}\u{1F1F9}", dial: "+509" },
|
|
263
|
+
{ code: "HN", name: "Honduras", flag: "\u{1F1ED}\u{1F1F3}", dial: "+504" },
|
|
264
|
+
{ code: "HU", name: "Hungary", flag: "\u{1F1ED}\u{1F1FA}", dial: "+36" },
|
|
265
|
+
{ code: "IS", name: "Iceland", flag: "\u{1F1EE}\u{1F1F8}", dial: "+354" },
|
|
266
|
+
{ code: "IN", name: "India", flag: "\u{1F1EE}\u{1F1F3}", dial: "+91" },
|
|
267
|
+
{ code: "ID", name: "Indonesia", flag: "\u{1F1EE}\u{1F1E9}", dial: "+62" },
|
|
268
|
+
{ code: "IR", name: "Iran", flag: "\u{1F1EE}\u{1F1F7}", dial: "+98" },
|
|
269
|
+
{ code: "IQ", name: "Iraq", flag: "\u{1F1EE}\u{1F1F6}", dial: "+964" },
|
|
270
|
+
{ code: "IE", name: "Ireland", flag: "\u{1F1EE}\u{1F1EA}", dial: "+353" },
|
|
271
|
+
{ code: "IL", name: "Israel", flag: "\u{1F1EE}\u{1F1F1}", dial: "+972" },
|
|
272
|
+
{ code: "IT", name: "Italy", flag: "\u{1F1EE}\u{1F1F9}", dial: "+39" },
|
|
273
|
+
{ code: "JM", name: "Jamaica", flag: "\u{1F1EF}\u{1F1F2}", dial: "+1876" },
|
|
274
|
+
{ code: "JP", name: "Japan", flag: "\u{1F1EF}\u{1F1F5}", dial: "+81" },
|
|
275
|
+
{ code: "JO", name: "Jordan", flag: "\u{1F1EF}\u{1F1F4}", dial: "+962" },
|
|
276
|
+
{ code: "KZ", name: "Kazakhstan", flag: "\u{1F1F0}\u{1F1FF}", dial: "+7" },
|
|
277
|
+
{ code: "KE", name: "Kenya", flag: "\u{1F1F0}\u{1F1EA}", dial: "+254" },
|
|
278
|
+
{ code: "KI", name: "Kiribati", flag: "\u{1F1F0}\u{1F1EE}", dial: "+686" },
|
|
279
|
+
{ code: "KW", name: "Kuwait", flag: "\u{1F1F0}\u{1F1FC}", dial: "+965" },
|
|
280
|
+
{ code: "KG", name: "Kyrgyzstan", flag: "\u{1F1F0}\u{1F1EC}", dial: "+996" },
|
|
281
|
+
{ code: "LA", name: "Laos", flag: "\u{1F1F1}\u{1F1E6}", dial: "+856" },
|
|
282
|
+
{ code: "LV", name: "Latvia", flag: "\u{1F1F1}\u{1F1FB}", dial: "+371" },
|
|
283
|
+
{ code: "LB", name: "Lebanon", flag: "\u{1F1F1}\u{1F1E7}", dial: "+961" },
|
|
284
|
+
{ code: "LS", name: "Lesotho", flag: "\u{1F1F1}\u{1F1F8}", dial: "+266" },
|
|
285
|
+
{ code: "LR", name: "Liberia", flag: "\u{1F1F1}\u{1F1F7}", dial: "+231" },
|
|
286
|
+
{ code: "LY", name: "Libya", flag: "\u{1F1F1}\u{1F1FE}", dial: "+218" },
|
|
287
|
+
{ code: "LI", name: "Liechtenstein", flag: "\u{1F1F1}\u{1F1EE}", dial: "+423" },
|
|
288
|
+
{ code: "LT", name: "Lithuania", flag: "\u{1F1F1}\u{1F1F9}", dial: "+370" },
|
|
289
|
+
{ code: "LU", name: "Luxembourg", flag: "\u{1F1F1}\u{1F1FA}", dial: "+352" },
|
|
290
|
+
{ code: "MG", name: "Madagascar", flag: "\u{1F1F2}\u{1F1EC}", dial: "+261" },
|
|
291
|
+
{ code: "MW", name: "Malawi", flag: "\u{1F1F2}\u{1F1FC}", dial: "+265" },
|
|
292
|
+
{ code: "MY", name: "Malaysia", flag: "\u{1F1F2}\u{1F1FE}", dial: "+60" },
|
|
293
|
+
{ code: "MV", name: "Maldives", flag: "\u{1F1F2}\u{1F1FB}", dial: "+960" },
|
|
294
|
+
{ code: "ML", name: "Mali", flag: "\u{1F1F2}\u{1F1F1}", dial: "+223" },
|
|
295
|
+
{ code: "MT", name: "Malta", flag: "\u{1F1F2}\u{1F1F9}", dial: "+356" },
|
|
296
|
+
{ code: "MH", name: "Marshall Islands", flag: "\u{1F1F2}\u{1F1ED}", dial: "+692" },
|
|
297
|
+
{ code: "MR", name: "Mauritania", flag: "\u{1F1F2}\u{1F1F7}", dial: "+222" },
|
|
298
|
+
{ code: "MU", name: "Mauritius", flag: "\u{1F1F2}\u{1F1FA}", dial: "+230" },
|
|
299
|
+
{ code: "MX", name: "Mexico", flag: "\u{1F1F2}\u{1F1FD}", dial: "+52" },
|
|
300
|
+
{ code: "FM", name: "Micronesia", flag: "\u{1F1EB}\u{1F1F2}", dial: "+691" },
|
|
301
|
+
{ code: "MD", name: "Moldova", flag: "\u{1F1F2}\u{1F1E9}", dial: "+373" },
|
|
302
|
+
{ code: "MC", name: "Monaco", flag: "\u{1F1F2}\u{1F1E8}", dial: "+377" },
|
|
303
|
+
{ code: "MN", name: "Mongolia", flag: "\u{1F1F2}\u{1F1F3}", dial: "+976" },
|
|
304
|
+
{ code: "ME", name: "Montenegro", flag: "\u{1F1F2}\u{1F1EA}", dial: "+382" },
|
|
305
|
+
{ code: "MA", name: "Morocco", flag: "\u{1F1F2}\u{1F1E6}", dial: "+212" },
|
|
306
|
+
{ code: "MZ", name: "Mozambique", flag: "\u{1F1F2}\u{1F1FF}", dial: "+258" },
|
|
307
|
+
{ code: "MM", name: "Myanmar", flag: "\u{1F1F2}\u{1F1F2}", dial: "+95" },
|
|
308
|
+
{ code: "NA", name: "Namibia", flag: "\u{1F1F3}\u{1F1E6}", dial: "+264" },
|
|
309
|
+
{ code: "NR", name: "Nauru", flag: "\u{1F1F3}\u{1F1F7}", dial: "+674" },
|
|
310
|
+
{ code: "NP", name: "Nepal", flag: "\u{1F1F3}\u{1F1F5}", dial: "+977" },
|
|
311
|
+
{ code: "NZ", name: "New Zealand", flag: "\u{1F1F3}\u{1F1FF}", dial: "+64" },
|
|
312
|
+
{ code: "NI", name: "Nicaragua", flag: "\u{1F1F3}\u{1F1EE}", dial: "+505" },
|
|
313
|
+
{ code: "NE", name: "Niger", flag: "\u{1F1F3}\u{1F1EA}", dial: "+227" },
|
|
314
|
+
{ code: "NG", name: "Nigeria", flag: "\u{1F1F3}\u{1F1EC}", dial: "+234" },
|
|
315
|
+
{ code: "KP", name: "North Korea", flag: "\u{1F1F0}\u{1F1F5}", dial: "+850" },
|
|
316
|
+
{ code: "MK", name: "North Macedonia", flag: "\u{1F1F2}\u{1F1F0}", dial: "+389" },
|
|
317
|
+
{ code: "NO", name: "Norway", flag: "\u{1F1F3}\u{1F1F4}", dial: "+47" },
|
|
318
|
+
{ code: "OM", name: "Oman", flag: "\u{1F1F4}\u{1F1F2}", dial: "+968" },
|
|
319
|
+
{ code: "PK", name: "Pakistan", flag: "\u{1F1F5}\u{1F1F0}", dial: "+92" },
|
|
320
|
+
{ code: "PW", name: "Palau", flag: "\u{1F1F5}\u{1F1FC}", dial: "+680" },
|
|
321
|
+
{ code: "PS", name: "Palestine", flag: "\u{1F1F5}\u{1F1F8}", dial: "+970" },
|
|
322
|
+
{ code: "PA", name: "Panama", flag: "\u{1F1F5}\u{1F1E6}", dial: "+507" },
|
|
323
|
+
{ code: "PG", name: "Papua New Guinea", flag: "\u{1F1F5}\u{1F1EC}", dial: "+675" },
|
|
324
|
+
{ code: "PY", name: "Paraguay", flag: "\u{1F1F5}\u{1F1FE}", dial: "+595" },
|
|
325
|
+
{ code: "PE", name: "Peru", flag: "\u{1F1F5}\u{1F1EA}", dial: "+51" },
|
|
326
|
+
{ code: "PH", name: "Philippines", flag: "\u{1F1F5}\u{1F1ED}", dial: "+63" },
|
|
327
|
+
{ code: "PL", name: "Poland", flag: "\u{1F1F5}\u{1F1F1}", dial: "+48" },
|
|
328
|
+
{ code: "PT", name: "Portugal", flag: "\u{1F1F5}\u{1F1F9}", dial: "+351" },
|
|
329
|
+
{ code: "QA", name: "Qatar", flag: "\u{1F1F6}\u{1F1E6}", dial: "+974" },
|
|
330
|
+
{ code: "RO", name: "Romania", flag: "\u{1F1F7}\u{1F1F4}", dial: "+40" },
|
|
331
|
+
{ code: "RU", name: "Russia", flag: "\u{1F1F7}\u{1F1FA}", dial: "+7" },
|
|
332
|
+
{ code: "RW", name: "Rwanda", flag: "\u{1F1F7}\u{1F1FC}", dial: "+250" },
|
|
333
|
+
{ code: "KN", name: "Saint Kitts and Nevis", flag: "\u{1F1F0}\u{1F1F3}", dial: "+1869" },
|
|
334
|
+
{ code: "LC", name: "Saint Lucia", flag: "\u{1F1F1}\u{1F1E8}", dial: "+1758" },
|
|
335
|
+
{ code: "VC", name: "Saint Vincent and Grenadines", flag: "\u{1F1FB}\u{1F1E8}", dial: "+1784" },
|
|
336
|
+
{ code: "WS", name: "Samoa", flag: "\u{1F1FC}\u{1F1F8}", dial: "+685" },
|
|
337
|
+
{ code: "SM", name: "San Marino", flag: "\u{1F1F8}\u{1F1F2}", dial: "+378" },
|
|
338
|
+
{ code: "ST", name: "S\xE3o Tom\xE9 and Pr\xEDncipe", flag: "\u{1F1F8}\u{1F1F9}", dial: "+239" },
|
|
339
|
+
{ code: "SA", name: "Saudi Arabia", flag: "\u{1F1F8}\u{1F1E6}", dial: "+966" },
|
|
340
|
+
{ code: "SN", name: "Senegal", flag: "\u{1F1F8}\u{1F1F3}", dial: "+221" },
|
|
341
|
+
{ code: "RS", name: "Serbia", flag: "\u{1F1F7}\u{1F1F8}", dial: "+381" },
|
|
342
|
+
{ code: "SC", name: "Seychelles", flag: "\u{1F1F8}\u{1F1E8}", dial: "+248" },
|
|
343
|
+
{ code: "SL", name: "Sierra Leone", flag: "\u{1F1F8}\u{1F1F1}", dial: "+232" },
|
|
344
|
+
{ code: "SG", name: "Singapore", flag: "\u{1F1F8}\u{1F1EC}", dial: "+65" },
|
|
345
|
+
{ code: "SK", name: "Slovakia", flag: "\u{1F1F8}\u{1F1F0}", dial: "+421" },
|
|
346
|
+
{ code: "SI", name: "Slovenia", flag: "\u{1F1F8}\u{1F1EE}", dial: "+386" },
|
|
347
|
+
{ code: "SB", name: "Solomon Islands", flag: "\u{1F1F8}\u{1F1E7}", dial: "+677" },
|
|
348
|
+
{ code: "SO", name: "Somalia", flag: "\u{1F1F8}\u{1F1F4}", dial: "+252" },
|
|
349
|
+
{ code: "ZA", name: "South Africa", flag: "\u{1F1FF}\u{1F1E6}", dial: "+27" },
|
|
350
|
+
{ code: "KR", name: "South Korea", flag: "\u{1F1F0}\u{1F1F7}", dial: "+82" },
|
|
351
|
+
{ code: "SS", name: "South Sudan", flag: "\u{1F1F8}\u{1F1F8}", dial: "+211" },
|
|
352
|
+
{ code: "ES", name: "Spain", flag: "\u{1F1EA}\u{1F1F8}", dial: "+34" },
|
|
353
|
+
{ code: "LK", name: "Sri Lanka", flag: "\u{1F1F1}\u{1F1F0}", dial: "+94" },
|
|
354
|
+
{ code: "SD", name: "Sudan", flag: "\u{1F1F8}\u{1F1E9}", dial: "+249" },
|
|
355
|
+
{ code: "SR", name: "Suriname", flag: "\u{1F1F8}\u{1F1F7}", dial: "+597" },
|
|
356
|
+
{ code: "SE", name: "Sweden", flag: "\u{1F1F8}\u{1F1EA}", dial: "+46" },
|
|
357
|
+
{ code: "CH", name: "Switzerland", flag: "\u{1F1E8}\u{1F1ED}", dial: "+41" },
|
|
358
|
+
{ code: "SY", name: "Syria", flag: "\u{1F1F8}\u{1F1FE}", dial: "+963" },
|
|
359
|
+
{ code: "TW", name: "Taiwan", flag: "\u{1F1F9}\u{1F1FC}", dial: "+886" },
|
|
360
|
+
{ code: "TJ", name: "Tajikistan", flag: "\u{1F1F9}\u{1F1EF}", dial: "+992" },
|
|
361
|
+
{ code: "TZ", name: "Tanzania", flag: "\u{1F1F9}\u{1F1FF}", dial: "+255" },
|
|
362
|
+
{ code: "TH", name: "Thailand", flag: "\u{1F1F9}\u{1F1ED}", dial: "+66" },
|
|
363
|
+
{ code: "TL", name: "Timor-Leste", flag: "\u{1F1F9}\u{1F1F1}", dial: "+670" },
|
|
364
|
+
{ code: "TG", name: "Togo", flag: "\u{1F1F9}\u{1F1EC}", dial: "+228" },
|
|
365
|
+
{ code: "TO", name: "Tonga", flag: "\u{1F1F9}\u{1F1F4}", dial: "+676" },
|
|
366
|
+
{ code: "TT", name: "Trinidad and Tobago", flag: "\u{1F1F9}\u{1F1F9}", dial: "+1868" },
|
|
367
|
+
{ code: "TN", name: "Tunisia", flag: "\u{1F1F9}\u{1F1F3}", dial: "+216" },
|
|
368
|
+
{ code: "TR", name: "Turkey", flag: "\u{1F1F9}\u{1F1F7}", dial: "+90" },
|
|
369
|
+
{ code: "TM", name: "Turkmenistan", flag: "\u{1F1F9}\u{1F1F2}", dial: "+993" },
|
|
370
|
+
{ code: "TV", name: "Tuvalu", flag: "\u{1F1F9}\u{1F1FB}", dial: "+688" },
|
|
371
|
+
{ code: "UG", name: "Uganda", flag: "\u{1F1FA}\u{1F1EC}", dial: "+256" },
|
|
372
|
+
{ code: "UA", name: "Ukraine", flag: "\u{1F1FA}\u{1F1E6}", dial: "+380" },
|
|
373
|
+
{ code: "AE", name: "United Arab Emirates", flag: "\u{1F1E6}\u{1F1EA}", dial: "+971" },
|
|
374
|
+
{ code: "UY", name: "Uruguay", flag: "\u{1F1FA}\u{1F1FE}", dial: "+598" },
|
|
375
|
+
{ code: "UZ", name: "Uzbekistan", flag: "\u{1F1FA}\u{1F1FF}", dial: "+998" },
|
|
376
|
+
{ code: "VU", name: "Vanuatu", flag: "\u{1F1FB}\u{1F1FA}", dial: "+678" },
|
|
377
|
+
{ code: "VA", name: "Vatican City", flag: "\u{1F1FB}\u{1F1E6}", dial: "+379" },
|
|
378
|
+
{ code: "VE", name: "Venezuela", flag: "\u{1F1FB}\u{1F1EA}", dial: "+58" },
|
|
379
|
+
{ code: "VN", name: "Vietnam", flag: "\u{1F1FB}\u{1F1F3}", dial: "+84" },
|
|
380
|
+
{ code: "YE", name: "Yemen", flag: "\u{1F1FE}\u{1F1EA}", dial: "+967" },
|
|
381
|
+
{ code: "ZM", name: "Zambia", flag: "\u{1F1FF}\u{1F1F2}", dial: "+260" },
|
|
382
|
+
{ code: "ZW", name: "Zimbabwe", flag: "\u{1F1FF}\u{1F1FC}", dial: "+263" }
|
|
383
|
+
];
|
|
384
|
+
var PHONE_COUNTRIES = [...PHONE_PRIORITY, ...PHONE_REST];
|
|
385
|
+
function PhoneCountrySelect({
|
|
386
|
+
value,
|
|
387
|
+
onChange,
|
|
388
|
+
className
|
|
389
|
+
}) {
|
|
390
|
+
var _a;
|
|
391
|
+
const [open, setOpen] = React3__namespace.useState(false);
|
|
392
|
+
const containerRef = React3__namespace.useRef(null);
|
|
393
|
+
const listRef = React3__namespace.useRef(null);
|
|
394
|
+
const selected = (_a = PHONE_COUNTRIES.find((c) => c.code === value)) != null ? _a : PHONE_COUNTRIES[0];
|
|
395
|
+
React3__namespace.useEffect(() => {
|
|
396
|
+
if (!open) return;
|
|
397
|
+
const handler = (e) => {
|
|
398
|
+
var _a2;
|
|
399
|
+
if (!((_a2 = containerRef.current) == null ? void 0 : _a2.contains(e.target))) {
|
|
400
|
+
setOpen(false);
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
document.addEventListener("mousedown", handler);
|
|
404
|
+
return () => document.removeEventListener("mousedown", handler);
|
|
405
|
+
}, [open]);
|
|
406
|
+
React3__namespace.useEffect(() => {
|
|
407
|
+
if (!open || !listRef.current) return;
|
|
408
|
+
const activeEl = listRef.current.querySelector("[data-selected=true]");
|
|
409
|
+
activeEl == null ? void 0 : activeEl.scrollIntoView({ block: "nearest" });
|
|
410
|
+
}, [open]);
|
|
411
|
+
const handleSelect = (code) => {
|
|
412
|
+
onChange(code);
|
|
413
|
+
setOpen(false);
|
|
414
|
+
};
|
|
415
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, className: cn("relative shrink-0", className), children: [
|
|
416
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
417
|
+
"button",
|
|
418
|
+
{
|
|
419
|
+
type: "button",
|
|
420
|
+
onClick: () => setOpen((v) => !v),
|
|
421
|
+
"aria-haspopup": "listbox",
|
|
422
|
+
"aria-expanded": open,
|
|
423
|
+
className: cn(
|
|
424
|
+
"flex h-14 items-center gap-1.5 rounded-l-lg border border-r-0 border-border bg-muted",
|
|
425
|
+
"px-3 font-ui text-sm text-foreground transition-colors",
|
|
426
|
+
"focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary",
|
|
427
|
+
open && "border-primary ring-1 ring-primary"
|
|
428
|
+
),
|
|
429
|
+
children: [
|
|
430
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base leading-none", children: selected.flag }),
|
|
431
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "tabular-nums", children: selected.dial }),
|
|
432
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
433
|
+
lucideReact.ChevronDownIcon,
|
|
434
|
+
{
|
|
435
|
+
className: cn(
|
|
436
|
+
"h-3.5 w-3.5 text-muted-foreground transition-transform",
|
|
437
|
+
open && "rotate-180"
|
|
438
|
+
)
|
|
439
|
+
}
|
|
440
|
+
)
|
|
441
|
+
]
|
|
442
|
+
}
|
|
443
|
+
),
|
|
444
|
+
open && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
445
|
+
"div",
|
|
446
|
+
{
|
|
447
|
+
ref: listRef,
|
|
448
|
+
role: "listbox",
|
|
449
|
+
className: cn(
|
|
450
|
+
"absolute left-0 top-[calc(100%+4px)] z-50",
|
|
451
|
+
"w-64 max-h-64 overflow-y-auto",
|
|
452
|
+
"rounded-lg border border-border bg-background shadow-lg",
|
|
453
|
+
"py-1"
|
|
454
|
+
),
|
|
455
|
+
children: [
|
|
456
|
+
PHONE_PRIORITY.map((c) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
457
|
+
"button",
|
|
458
|
+
{
|
|
459
|
+
type: "button",
|
|
460
|
+
role: "option",
|
|
461
|
+
"data-selected": c.code === value,
|
|
462
|
+
onClick: () => handleSelect(c.code),
|
|
463
|
+
className: cn(
|
|
464
|
+
"flex w-full items-center gap-2.5 px-3 py-2 text-sm font-ui text-left",
|
|
465
|
+
"transition-colors hover:bg-muted focus:outline-none focus:bg-muted",
|
|
466
|
+
c.code === value && "bg-primary/8 text-primary font-semibold"
|
|
467
|
+
),
|
|
468
|
+
children: [
|
|
469
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base leading-none shrink-0", children: c.flag }),
|
|
470
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-10 shrink-0 tabular-nums text-muted-foreground", children: c.dial }),
|
|
471
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-foreground", children: c.name })
|
|
472
|
+
]
|
|
473
|
+
},
|
|
474
|
+
c.code
|
|
475
|
+
)),
|
|
476
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "my-1 h-px bg-border" }),
|
|
477
|
+
PHONE_REST.map((c) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
478
|
+
"button",
|
|
479
|
+
{
|
|
480
|
+
type: "button",
|
|
481
|
+
role: "option",
|
|
482
|
+
"data-selected": c.code === value,
|
|
483
|
+
onClick: () => handleSelect(c.code),
|
|
484
|
+
className: cn(
|
|
485
|
+
"flex w-full items-center gap-2.5 px-3 py-2 text-sm font-ui text-left",
|
|
486
|
+
"transition-colors hover:bg-muted focus:outline-none focus:bg-muted",
|
|
487
|
+
c.code === value && "bg-primary/8 text-primary font-semibold"
|
|
488
|
+
),
|
|
489
|
+
children: [
|
|
490
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base leading-none shrink-0", children: c.flag }),
|
|
491
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-10 shrink-0 tabular-nums text-muted-foreground", children: c.dial }),
|
|
492
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-foreground", children: c.name })
|
|
493
|
+
]
|
|
494
|
+
},
|
|
495
|
+
c.code
|
|
496
|
+
))
|
|
497
|
+
]
|
|
498
|
+
}
|
|
499
|
+
)
|
|
500
|
+
] });
|
|
501
|
+
}
|
|
502
|
+
function OfferAdventureCard({ adventure }) {
|
|
503
|
+
var _a, _b, _c;
|
|
504
|
+
const [checked, setChecked] = React3__namespace.useState(
|
|
505
|
+
new Set((_b = (_a = adventure.optionals) == null ? void 0 : _a.filter((o) => o.defaultChecked).map((o) => o.id)) != null ? _b : [])
|
|
506
|
+
);
|
|
507
|
+
const toggleOptional = (id) => setChecked((prev) => {
|
|
508
|
+
const next = new Set(prev);
|
|
509
|
+
next.has(id) ? next.delete(id) : next.add(id);
|
|
510
|
+
return next;
|
|
511
|
+
});
|
|
512
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card overflow-hidden", children: [
|
|
513
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "aspect-[16/7] overflow-hidden bg-muted", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
514
|
+
"img",
|
|
515
|
+
{
|
|
516
|
+
src: adventure.image,
|
|
517
|
+
alt: (_c = adventure.imageAlt) != null ? _c : adventure.title,
|
|
518
|
+
className: "w-full h-full object-cover"
|
|
519
|
+
}
|
|
520
|
+
) }),
|
|
521
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-5 lg:p-6 flex flex-col gap-2.5", children: [
|
|
522
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-2 min-h-[22px]", children: [
|
|
523
|
+
adventure.reference ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center rounded-md bg-primary/10 px-2 py-0.5 text-xs font-semibold text-primary font-heading tracking-wide", children: adventure.reference }) : /* @__PURE__ */ jsxRuntime.jsx("span", {}),
|
|
524
|
+
adventure.onRemove && /* @__PURE__ */ jsxRuntime.jsx(
|
|
525
|
+
"button",
|
|
526
|
+
{
|
|
527
|
+
type: "button",
|
|
528
|
+
onClick: adventure.onRemove,
|
|
529
|
+
className: "text-[11px] text-destructive/60 hover:text-destructive transition-colors font-sans leading-none",
|
|
530
|
+
children: "Remove from proposal"
|
|
531
|
+
}
|
|
532
|
+
)
|
|
533
|
+
] }),
|
|
534
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-xl font-bold text-foreground font-heading leading-snug mt-0.5", children: adventure.title }),
|
|
535
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center gap-1.5 text-sm text-muted-foreground font-sans leading-none", children: [
|
|
536
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "w-3.5 h-3.5 text-primary shrink-0" }),
|
|
537
|
+
adventure.dateFrom,
|
|
538
|
+
" \u2192 ",
|
|
539
|
+
adventure.dateTo
|
|
540
|
+
] }),
|
|
541
|
+
adventure.location && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "flex items-center gap-1.5 text-sm text-muted-foreground font-sans leading-none", children: [
|
|
542
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MapPinIcon, { className: "w-3.5 h-3.5 text-primary shrink-0" }),
|
|
543
|
+
adventure.location
|
|
544
|
+
] }),
|
|
545
|
+
adventure.optionals && adventure.optionals.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 mt-1", children: [
|
|
546
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-bold text-muted-foreground font-heading uppercase tracking-widest", children: "Available optionals" }),
|
|
547
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-1.5", children: adventure.optionals.map((opt) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
548
|
+
"label",
|
|
549
|
+
{
|
|
550
|
+
className: "flex items-center gap-2.5 cursor-pointer group",
|
|
551
|
+
children: [
|
|
552
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
553
|
+
"input",
|
|
554
|
+
{
|
|
555
|
+
type: "checkbox",
|
|
556
|
+
checked: checked.has(opt.id),
|
|
557
|
+
onChange: () => toggleOptional(opt.id),
|
|
558
|
+
className: "h-4 w-4 shrink-0 rounded border-border accent-primary cursor-pointer"
|
|
559
|
+
}
|
|
560
|
+
),
|
|
561
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-sans text-foreground/80 group-hover:text-foreground transition-colors leading-snug", children: [
|
|
562
|
+
opt.label,
|
|
563
|
+
" ",
|
|
564
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-muted-foreground", children: [
|
|
565
|
+
"(",
|
|
566
|
+
opt.pricePerPerson,
|
|
567
|
+
")"
|
|
568
|
+
] })
|
|
569
|
+
] })
|
|
570
|
+
]
|
|
571
|
+
},
|
|
572
|
+
opt.id
|
|
573
|
+
)) })
|
|
574
|
+
] }),
|
|
575
|
+
adventure.description && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
576
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "my-1" }),
|
|
577
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
578
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-[10px] font-bold text-muted-foreground font-heading uppercase tracking-widest mb-2", children: "Itinerary" }),
|
|
579
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-base text-foreground/80 leading-relaxed font-sans", children: adventure.description })
|
|
580
|
+
] })
|
|
581
|
+
] }),
|
|
582
|
+
adventure.included && adventure.included.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 mt-1", children: [
|
|
583
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-bold text-foreground font-heading", children: "O que est\xE1 incluso" }),
|
|
584
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1", children: adventure.included.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2 text-sm text-foreground/80 font-sans", children: [
|
|
585
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, { className: "w-4 h-4 text-primary shrink-0 mt-0.5" }),
|
|
586
|
+
item
|
|
587
|
+
] }, i)) })
|
|
588
|
+
] }),
|
|
589
|
+
adventure.notIncluded && adventure.notIncluded.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 mt-1", children: [
|
|
590
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-bold text-foreground font-heading", children: "O que n\xE3o est\xE1 incluso" }),
|
|
591
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1", children: adventure.notIncluded.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2 text-sm text-foreground/80 font-sans", children: [
|
|
592
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.XIcon, { className: "w-4 h-4 text-destructive shrink-0 mt-0.5" }),
|
|
593
|
+
item
|
|
594
|
+
] }, i)) })
|
|
595
|
+
] }),
|
|
596
|
+
adventure.cancellationPolicy && adventure.cancellationPolicy.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2 mt-1", children: [
|
|
597
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "text-sm font-bold text-foreground font-heading", children: "Pol\xEDtica de cancelamento" }),
|
|
598
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1", children: adventure.cancellationPolicy.map((item, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-start gap-2 text-sm text-muted-foreground font-sans", children: [
|
|
599
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-primary shrink-0 mt-2" }),
|
|
600
|
+
item
|
|
601
|
+
] }, i)) })
|
|
602
|
+
] })
|
|
603
|
+
] })
|
|
604
|
+
] });
|
|
605
|
+
}
|
|
606
|
+
function OfferSidebar({
|
|
607
|
+
total,
|
|
608
|
+
agent,
|
|
609
|
+
onBook,
|
|
610
|
+
bookLabel
|
|
611
|
+
}) {
|
|
612
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
613
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card p-5 flex flex-col gap-4", children: [
|
|
614
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
615
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs uppercase tracking-widest text-muted-foreground font-heading mb-1", children: "Booking Total" }),
|
|
616
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-3xl font-black text-primary font-heading leading-none", children: total })
|
|
617
|
+
] }),
|
|
618
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
619
|
+
"button",
|
|
620
|
+
{
|
|
621
|
+
type: "button",
|
|
622
|
+
onClick: onBook,
|
|
623
|
+
className: cn(
|
|
624
|
+
"w-full rounded-full bg-primary py-3 text-sm font-bold tracking-wide uppercase",
|
|
625
|
+
"text-primary-foreground font-heading transition-colors hover:bg-primary/90",
|
|
626
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
627
|
+
),
|
|
628
|
+
children: bookLabel
|
|
629
|
+
}
|
|
630
|
+
)
|
|
631
|
+
] }),
|
|
632
|
+
agent && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card p-5 flex flex-col gap-4", children: [
|
|
633
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center gap-3 text-center", children: [
|
|
634
|
+
agent.avatar ? (
|
|
635
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
636
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
637
|
+
"img",
|
|
638
|
+
{
|
|
639
|
+
src: agent.avatar,
|
|
640
|
+
alt: agent.name,
|
|
641
|
+
className: "w-16 h-16 rounded-full object-cover ring-2 ring-primary/20"
|
|
642
|
+
}
|
|
643
|
+
)
|
|
644
|
+
) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-16 h-16 rounded-full bg-primary/10 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xl font-bold text-primary font-heading", children: agent.name.charAt(0) }) }),
|
|
645
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
646
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground font-sans", children: "Need help with your offer?" }),
|
|
647
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm font-sans text-foreground/80 mt-0.5", children: [
|
|
648
|
+
"Contact",
|
|
649
|
+
" ",
|
|
650
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-bold text-foreground font-heading", children: agent.name }),
|
|
651
|
+
" your travel advisor",
|
|
652
|
+
agent.company && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
653
|
+
" ",
|
|
654
|
+
"at",
|
|
655
|
+
" ",
|
|
656
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-primary", children: agent.company })
|
|
657
|
+
] })
|
|
658
|
+
] })
|
|
659
|
+
] })
|
|
660
|
+
] }),
|
|
661
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
662
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
663
|
+
agent.whatsappUrl && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
664
|
+
"a",
|
|
665
|
+
{
|
|
666
|
+
href: agent.whatsappUrl,
|
|
667
|
+
target: "_blank",
|
|
668
|
+
rel: "noopener noreferrer",
|
|
669
|
+
className: "flex items-center gap-2.5 rounded-lg border border-border px-4 py-2.5 text-sm font-sans text-foreground hover:bg-muted/50 transition-colors",
|
|
670
|
+
children: [
|
|
671
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-4 h-4 shrink-0 text-[#25D366]", viewBox: "0 0 24 24", fill: "currentColor", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z" }) }),
|
|
672
|
+
"WhatsApp"
|
|
673
|
+
]
|
|
674
|
+
}
|
|
675
|
+
),
|
|
676
|
+
agent.email && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
677
|
+
"a",
|
|
678
|
+
{
|
|
679
|
+
href: `mailto:${agent.email}`,
|
|
680
|
+
className: "flex items-center gap-2.5 rounded-lg border border-border px-4 py-2.5 text-sm font-sans text-foreground hover:bg-muted/50 transition-colors",
|
|
681
|
+
children: [
|
|
682
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MailIcon, { className: "w-4 h-4 shrink-0 text-primary" }),
|
|
683
|
+
"Email"
|
|
684
|
+
]
|
|
685
|
+
}
|
|
686
|
+
),
|
|
687
|
+
agent.scheduleUrl && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
688
|
+
"a",
|
|
689
|
+
{
|
|
690
|
+
href: agent.scheduleUrl,
|
|
691
|
+
target: "_blank",
|
|
692
|
+
rel: "noopener noreferrer",
|
|
693
|
+
className: "flex items-center gap-2.5 rounded-lg border border-border px-4 py-2.5 text-sm font-sans text-foreground hover:bg-muted/50 transition-colors",
|
|
694
|
+
children: [
|
|
695
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.PhoneIcon, { className: "w-4 h-4 shrink-0 text-primary" }),
|
|
696
|
+
"Schedule a call"
|
|
697
|
+
]
|
|
698
|
+
}
|
|
699
|
+
)
|
|
700
|
+
] })
|
|
701
|
+
] })
|
|
702
|
+
] });
|
|
703
|
+
}
|
|
704
|
+
function OfferSummarySection({
|
|
705
|
+
adventures,
|
|
706
|
+
subtotal,
|
|
707
|
+
total,
|
|
708
|
+
depositInfo,
|
|
709
|
+
onContinue,
|
|
710
|
+
continueLabel
|
|
711
|
+
}) {
|
|
712
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card p-5 flex flex-col gap-4", children: [
|
|
713
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-bold text-foreground font-heading text-base", children: "Summary" }),
|
|
714
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
715
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-4", children: adventures.map((adventure, i) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
716
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
717
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground font-heading leading-tight", children: adventure.title }),
|
|
718
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground font-heading shrink-0", children: adventure.totalPrice })
|
|
719
|
+
] }),
|
|
720
|
+
adventure.lineItems && adventure.lineItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-2 flex flex-col gap-1.5 pl-3 border-l-2 border-border ml-1", children: adventure.lineItems.map((item, j) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start justify-between gap-3", children: [
|
|
721
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground font-sans leading-tight", children: item.label }),
|
|
722
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: cn("text-xs font-sans shrink-0", item.isDiscount ? "text-success" : "text-muted-foreground"), children: [
|
|
723
|
+
item.isDiscount ? "\u2212" : "",
|
|
724
|
+
item.price
|
|
725
|
+
] })
|
|
726
|
+
] }, j)) }),
|
|
727
|
+
i < adventures.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(Separator, { className: "mt-4" })
|
|
728
|
+
] }, adventure.id)) }),
|
|
729
|
+
/* @__PURE__ */ jsxRuntime.jsx(Separator, {}),
|
|
730
|
+
subtotal && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
731
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground font-sans", children: "Subtotal" }),
|
|
732
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-foreground font-sans", children: subtotal })
|
|
733
|
+
] }),
|
|
734
|
+
depositInfo && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1.5 rounded-lg bg-muted/50 border border-border p-3", children: [
|
|
735
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
736
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground font-sans", children: [
|
|
737
|
+
"Deposit (",
|
|
738
|
+
depositInfo.depositPercent,
|
|
739
|
+
"%)"
|
|
740
|
+
] }),
|
|
741
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold text-foreground font-sans", children: depositInfo.depositAmount })
|
|
742
|
+
] }),
|
|
743
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
744
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground font-sans", children: "Remaining balance" }),
|
|
745
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold text-foreground font-sans", children: depositInfo.remainingAmount })
|
|
746
|
+
] }),
|
|
747
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
748
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-muted-foreground font-sans", children: "Balance due" }),
|
|
749
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-semibold text-foreground font-sans", children: depositInfo.balanceDueDate })
|
|
750
|
+
] })
|
|
751
|
+
] }),
|
|
752
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between pt-1", children: [
|
|
753
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-base font-bold text-foreground font-heading", children: "Total" }),
|
|
754
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-2xl font-black text-primary font-heading", children: total })
|
|
755
|
+
] }),
|
|
756
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
757
|
+
"button",
|
|
758
|
+
{
|
|
759
|
+
type: "button",
|
|
760
|
+
onClick: onContinue,
|
|
761
|
+
className: cn(
|
|
762
|
+
"w-full rounded-full bg-primary py-3.5 text-center text-sm font-bold uppercase tracking-wide",
|
|
763
|
+
"text-primary-foreground font-heading transition-colors hover:bg-primary/90",
|
|
764
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
765
|
+
),
|
|
766
|
+
children: continueLabel
|
|
767
|
+
}
|
|
768
|
+
)
|
|
769
|
+
] });
|
|
770
|
+
}
|
|
771
|
+
var WIZARD_STEPS = [
|
|
772
|
+
{ id: "responsible", label: "Responsible party details" },
|
|
773
|
+
{ id: "travellers", label: "Travellers" },
|
|
774
|
+
{ id: "payment", label: "Payment and terms" }
|
|
775
|
+
];
|
|
776
|
+
function BookingWizard({
|
|
777
|
+
adventures,
|
|
778
|
+
total,
|
|
779
|
+
depositInfo,
|
|
780
|
+
onCancel
|
|
781
|
+
}) {
|
|
782
|
+
const [step, setStep] = React3__namespace.useState("responsible");
|
|
783
|
+
const [error, setError] = React3__namespace.useState(null);
|
|
784
|
+
const [responsible, setResponsible] = React3__namespace.useState({
|
|
785
|
+
firstName: "",
|
|
786
|
+
lastName: "",
|
|
787
|
+
email: "",
|
|
788
|
+
phone: "",
|
|
789
|
+
phoneCountry: "BR",
|
|
790
|
+
country: "",
|
|
791
|
+
passport: "",
|
|
792
|
+
notes: ""
|
|
793
|
+
});
|
|
794
|
+
const totalAdults = adventures.reduce((s, a) => {
|
|
795
|
+
var _a, _b;
|
|
796
|
+
return s + ((_b = (_a = a.slots) == null ? void 0 : _a.adults) != null ? _b : 1);
|
|
797
|
+
}, 0);
|
|
798
|
+
const totalChildren = adventures.reduce((s, a) => {
|
|
799
|
+
var _a, _b;
|
|
800
|
+
return s + ((_b = (_a = a.slots) == null ? void 0 : _a.children) != null ? _b : 0);
|
|
801
|
+
}, 0);
|
|
802
|
+
const totalPax = totalAdults + totalChildren;
|
|
803
|
+
const [travellers, setTravellers] = React3__namespace.useState(
|
|
804
|
+
Array.from({ length: Math.max(totalPax, 1) }, () => ({
|
|
805
|
+
firstName: "",
|
|
806
|
+
lastName: "",
|
|
807
|
+
dateOfBirth: "",
|
|
808
|
+
email: ""
|
|
809
|
+
}))
|
|
810
|
+
);
|
|
811
|
+
const [payAmount, setPayAmount] = React3__namespace.useState("full");
|
|
812
|
+
const [termsAccepted, setTermsAccepted] = React3__namespace.useState(false);
|
|
813
|
+
const setR = (k, v) => setResponsible((p) => __spreadProps(__spreadValues({}, p), { [k]: v }));
|
|
814
|
+
const setT = (i, k, v) => setTravellers((prev) => prev.map((t, idx) => idx === i ? __spreadProps(__spreadValues({}, t), { [k]: v }) : t));
|
|
815
|
+
const stepIndex = WIZARD_STEPS.findIndex((s) => s.id === step);
|
|
816
|
+
const goNext = () => {
|
|
817
|
+
setError(null);
|
|
818
|
+
if (step === "responsible") {
|
|
819
|
+
if (!responsible.firstName || !responsible.lastName || !responsible.email) {
|
|
820
|
+
setError("Please fill in all required fields.");
|
|
821
|
+
return;
|
|
822
|
+
}
|
|
823
|
+
if (!responsible.passport) {
|
|
824
|
+
setError("Please enter the document (CPF or passport) according to country.");
|
|
825
|
+
return;
|
|
826
|
+
}
|
|
827
|
+
setStep("travellers");
|
|
828
|
+
} else if (step === "travellers") {
|
|
829
|
+
const missing = travellers.some((t) => !t.firstName || !t.lastName);
|
|
830
|
+
if (missing) {
|
|
831
|
+
setError("Please fill in first and last name for all passengers.");
|
|
832
|
+
return;
|
|
833
|
+
}
|
|
834
|
+
setStep("payment");
|
|
835
|
+
} else if (step === "payment") {
|
|
836
|
+
if (!termsAccepted) {
|
|
837
|
+
setError("You must accept the terms to complete.");
|
|
838
|
+
return;
|
|
839
|
+
}
|
|
840
|
+
setStep("confirmed");
|
|
841
|
+
}
|
|
842
|
+
};
|
|
843
|
+
const goPrev = () => {
|
|
844
|
+
setError(null);
|
|
845
|
+
if (step === "travellers") setStep("responsible");
|
|
846
|
+
else if (step === "payment") setStep("travellers");
|
|
847
|
+
};
|
|
848
|
+
const depositLabel = depositInfo ? `Pay deposit (${depositInfo.depositPercent}%) \u2014 ${depositInfo.depositAmount}` : "Pay deposit";
|
|
849
|
+
const fullLabel = `Pay full amount \u2014 ${total}`;
|
|
850
|
+
if (step === "confirmed") {
|
|
851
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card p-8 flex flex-col items-center gap-6 text-center", children: [
|
|
852
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex h-20 w-20 items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle2Icon, { className: "w-10 h-10 text-primary" }) }),
|
|
853
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
854
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-2xl font-black text-foreground font-heading", children: "Booking confirmed!" }),
|
|
855
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mt-2 text-sm text-muted-foreground font-sans max-w-sm mx-auto leading-relaxed", children: [
|
|
856
|
+
"A confirmation email has been sent to",
|
|
857
|
+
" ",
|
|
858
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-foreground", children: responsible.email || "your email" }),
|
|
859
|
+
". Our team will be in touch shortly."
|
|
860
|
+
] })
|
|
861
|
+
] }),
|
|
862
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border bg-muted/30 px-6 py-4 w-full max-w-xs", children: [
|
|
863
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-xs text-muted-foreground font-sans uppercase tracking-wider", children: "Booking reference" }),
|
|
864
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-lg font-black text-primary font-heading mt-1", children: [
|
|
865
|
+
"PEX-",
|
|
866
|
+
Math.random().toString(36).slice(2, 8).toUpperCase()
|
|
867
|
+
] })
|
|
868
|
+
] }),
|
|
869
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
870
|
+
"button",
|
|
871
|
+
{
|
|
872
|
+
type: "button",
|
|
873
|
+
onClick: onCancel,
|
|
874
|
+
className: "rounded-full border border-primary px-6 py-2.5 text-sm font-bold text-primary font-heading hover:bg-primary/10 transition-colors",
|
|
875
|
+
children: "Back to offer"
|
|
876
|
+
}
|
|
877
|
+
)
|
|
878
|
+
] });
|
|
879
|
+
}
|
|
880
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-2xl border border-border bg-card overflow-hidden", children: [
|
|
881
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-b border-border px-5 py-4 bg-muted/20", children: [
|
|
882
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-base font-bold text-foreground font-heading mb-2", children: "Booking details" }),
|
|
883
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center gap-1.5 flex-wrap", children: WIZARD_STEPS.map((s, i) => /* @__PURE__ */ jsxRuntime.jsxs(React3__namespace.Fragment, { children: [
|
|
884
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
885
|
+
"span",
|
|
886
|
+
{
|
|
887
|
+
className: cn(
|
|
888
|
+
"text-xs font-sans",
|
|
889
|
+
s.id === step ? "text-primary font-semibold" : i < stepIndex ? "text-foreground" : "text-muted-foreground"
|
|
890
|
+
),
|
|
891
|
+
children: s.label
|
|
892
|
+
}
|
|
893
|
+
),
|
|
894
|
+
i < WIZARD_STEPS.length - 1 && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "w-3 h-3 text-muted-foreground shrink-0" })
|
|
895
|
+
] }, s.id)) })
|
|
896
|
+
] }),
|
|
897
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-5 flex flex-col gap-5", children: [
|
|
898
|
+
step === "responsible" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
899
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground font-sans", children: "Enter the responsible person's details. This person will receive booking confirmations and is accountable for all travellers." }),
|
|
900
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
901
|
+
/* @__PURE__ */ jsxRuntime.jsx(FloatingInput, { label: "First name", required: true, value: responsible.firstName, onChange: (e) => setR("firstName", e.target.value) }),
|
|
902
|
+
/* @__PURE__ */ jsxRuntime.jsx(FloatingInput, { label: "Last name", required: true, value: responsible.lastName, onChange: (e) => setR("lastName", e.target.value) })
|
|
903
|
+
] }),
|
|
904
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
905
|
+
/* @__PURE__ */ jsxRuntime.jsx(FloatingInput, { label: "Email", type: "email", required: true, value: responsible.email, onChange: (e) => setR("email", e.target.value) }),
|
|
906
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex w-full min-w-0", children: [
|
|
907
|
+
/* @__PURE__ */ jsxRuntime.jsx(PhoneCountrySelect, { value: responsible.phoneCountry, onChange: (c) => setR("phoneCountry", c), className: "shrink-0" }),
|
|
908
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative min-w-0 flex-1", children: [
|
|
909
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
910
|
+
"input",
|
|
911
|
+
{
|
|
912
|
+
id: "wiz-phone",
|
|
913
|
+
type: "tel",
|
|
914
|
+
placeholder: " ",
|
|
915
|
+
value: responsible.phone,
|
|
916
|
+
onChange: (e) => setR("phone", e.target.value),
|
|
917
|
+
className: "peer block h-14 w-full rounded-r-lg border border-border bg-background px-3 pt-5 pb-2 text-base text-foreground font-sans transition-colors placeholder-transparent focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary"
|
|
918
|
+
}
|
|
919
|
+
),
|
|
920
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "wiz-phone", className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-base text-muted-foreground font-sans transition-all duration-150 peer-focus:top-3 peer-focus:translate-y-0 peer-focus:text-xs peer-focus:text-primary peer-not-placeholder-shown:top-3 peer-not-placeholder-shown:translate-y-0 peer-not-placeholder-shown:text-xs", children: "Phone" })
|
|
921
|
+
] })
|
|
922
|
+
] })
|
|
923
|
+
] }),
|
|
924
|
+
/* @__PURE__ */ jsxRuntime.jsxs(FloatingSelect, { label: "Country", required: true, value: responsible.country, onChange: (e) => setR("country", e.target.value), children: [
|
|
925
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", disabled: true, hidden: true }),
|
|
926
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "BR", children: "Brazil" }),
|
|
927
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "FR", children: "France" }),
|
|
928
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "US", children: "United States" }),
|
|
929
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "UK", children: "United Kingdom" }),
|
|
930
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "AR", children: "Argentina" }),
|
|
931
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "PT", children: "Portugal" })
|
|
932
|
+
] }),
|
|
933
|
+
/* @__PURE__ */ jsxRuntime.jsx(FloatingInput, { label: "Passport / CPF", required: true, value: responsible.passport, onChange: (e) => setR("passport", e.target.value) }),
|
|
934
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
935
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
936
|
+
"textarea",
|
|
937
|
+
{
|
|
938
|
+
id: "wiz-notes",
|
|
939
|
+
placeholder: " ",
|
|
940
|
+
rows: 3,
|
|
941
|
+
value: responsible.notes,
|
|
942
|
+
onChange: (e) => setR("notes", e.target.value),
|
|
943
|
+
className: "peer block w-full resize-none rounded-lg border border-border bg-background px-3 pt-6 pb-3 text-base text-foreground font-sans transition-colors placeholder-transparent focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary"
|
|
944
|
+
}
|
|
945
|
+
),
|
|
946
|
+
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "wiz-notes", className: "pointer-events-none absolute left-3 top-4 text-base text-muted-foreground font-sans transition-all duration-150 peer-focus:top-2 peer-focus:text-xs peer-focus:text-primary peer-not-placeholder-shown:top-2 peer-not-placeholder-shown:text-xs", children: "Notes (optional)" })
|
|
947
|
+
] })
|
|
948
|
+
] }),
|
|
949
|
+
step === "travellers" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-5", children: [
|
|
950
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
951
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.UsersIcon, { className: "w-5 h-5 text-primary shrink-0" }),
|
|
952
|
+
/* @__PURE__ */ jsxRuntime.jsx("h4", { className: "font-bold text-foreground font-heading text-base", children: "Traveller details" })
|
|
953
|
+
] }),
|
|
954
|
+
travellers.map((t, i) => {
|
|
955
|
+
const isChild = i >= totalAdults;
|
|
956
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border p-4 flex flex-col gap-3", children: [
|
|
957
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
958
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-sm font-bold text-foreground font-heading", children: [
|
|
959
|
+
"Traveller ",
|
|
960
|
+
i + 1
|
|
961
|
+
] }),
|
|
962
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn(
|
|
963
|
+
"text-xs font-semibold font-heading rounded-full px-2.5 py-0.5",
|
|
964
|
+
isChild ? "bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400" : "bg-primary/10 text-primary"
|
|
965
|
+
), children: isChild ? "Crian\xE7a" : "Adulto" })
|
|
966
|
+
] }),
|
|
967
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
|
|
968
|
+
/* @__PURE__ */ jsxRuntime.jsx(FloatingInput, { label: "First name", required: true, value: t.firstName, onChange: (e) => setT(i, "firstName", e.target.value) }),
|
|
969
|
+
/* @__PURE__ */ jsxRuntime.jsx(FloatingInput, { label: "Last name", required: true, value: t.lastName, onChange: (e) => setT(i, "lastName", e.target.value) })
|
|
970
|
+
] }),
|
|
971
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
|
|
972
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
973
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
974
|
+
"input",
|
|
975
|
+
{
|
|
976
|
+
id: `dob-${i}`,
|
|
977
|
+
type: "date",
|
|
978
|
+
required: isChild,
|
|
979
|
+
value: t.dateOfBirth,
|
|
980
|
+
onChange: (e) => setT(i, "dateOfBirth", e.target.value),
|
|
981
|
+
className: "peer block h-14 w-full rounded-lg border border-border bg-background px-3 pt-5 pb-2 text-base text-foreground font-sans transition-colors focus:outline-none focus:border-primary focus:ring-1 focus:ring-primary"
|
|
982
|
+
}
|
|
983
|
+
),
|
|
984
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: `dob-${i}`, className: "pointer-events-none absolute left-3 top-3 text-xs text-muted-foreground font-sans", children: [
|
|
985
|
+
"Date of birth",
|
|
986
|
+
isChild && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary ml-0.5", children: "*" })
|
|
987
|
+
] })
|
|
988
|
+
] }),
|
|
989
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
990
|
+
FloatingInput,
|
|
991
|
+
{
|
|
992
|
+
label: "Email",
|
|
993
|
+
type: "email",
|
|
994
|
+
value: t.email,
|
|
995
|
+
onChange: (e) => setT(i, "email", e.target.value)
|
|
996
|
+
}
|
|
997
|
+
)
|
|
998
|
+
] })
|
|
999
|
+
] }, i);
|
|
1000
|
+
})
|
|
1001
|
+
] }),
|
|
1002
|
+
step === "payment" && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-5", children: [
|
|
1003
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground font-sans", children: "When you confirm, we will open secure online payment (Stripe). Choose deposit vs full amount below when applicable." }),
|
|
1004
|
+
depositInfo && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1005
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm font-bold text-foreground font-heading", children: "What do you want to pay now?" }),
|
|
1006
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-2", children: ["deposit", "full"].map((opt) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1007
|
+
"button",
|
|
1008
|
+
{
|
|
1009
|
+
type: "button",
|
|
1010
|
+
onClick: () => setPayAmount(opt),
|
|
1011
|
+
className: cn(
|
|
1012
|
+
"rounded-lg border-2 px-4 py-3 text-sm text-left font-sans transition-colors",
|
|
1013
|
+
payAmount === opt ? "border-primary bg-primary/5 text-foreground font-semibold" : "border-border bg-background text-muted-foreground hover:border-primary/40"
|
|
1014
|
+
),
|
|
1015
|
+
children: opt === "deposit" ? depositLabel : fullLabel
|
|
1016
|
+
},
|
|
1017
|
+
opt
|
|
1018
|
+
)) })
|
|
1019
|
+
] }),
|
|
1020
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border p-4 flex flex-col gap-3", children: [
|
|
1021
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest flex items-center gap-1.5", children: [
|
|
1022
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "$" }),
|
|
1023
|
+
" Payment method"
|
|
1024
|
+
] }),
|
|
1025
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1026
|
+
"button",
|
|
1027
|
+
{
|
|
1028
|
+
type: "button",
|
|
1029
|
+
className: "w-full rounded-lg border-2 border-primary bg-primary/5 px-4 py-3 text-sm text-center text-primary font-semibold font-sans",
|
|
1030
|
+
children: "Stripe (cart\xE3o)"
|
|
1031
|
+
}
|
|
1032
|
+
)
|
|
1033
|
+
] }),
|
|
1034
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-border p-4 flex flex-col gap-3", children: [
|
|
1035
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "text-xs font-bold text-muted-foreground font-heading uppercase tracking-widest flex items-center gap-1.5", children: [
|
|
1036
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CalendarIcon, { className: "w-3.5 h-3.5" }),
|
|
1037
|
+
" Terms and conditions"
|
|
1038
|
+
] }),
|
|
1039
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-start gap-2.5 cursor-pointer", children: [
|
|
1040
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1041
|
+
"input",
|
|
1042
|
+
{
|
|
1043
|
+
type: "checkbox",
|
|
1044
|
+
checked: termsAccepted,
|
|
1045
|
+
onChange: (e) => setTermsAccepted(e.target.checked),
|
|
1046
|
+
className: "h-4 w-4 shrink-0 mt-0.5 rounded border-border accent-primary cursor-pointer"
|
|
1047
|
+
}
|
|
1048
|
+
),
|
|
1049
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-sans text-foreground/80 leading-snug", children: "I have read and accept the terms and conditions of the reservation." })
|
|
1050
|
+
] })
|
|
1051
|
+
] })
|
|
1052
|
+
] }),
|
|
1053
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-destructive font-sans", children: error }),
|
|
1054
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
1055
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
1056
|
+
stepIndex > 0 && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1057
|
+
"button",
|
|
1058
|
+
{
|
|
1059
|
+
type: "button",
|
|
1060
|
+
onClick: goPrev,
|
|
1061
|
+
className: "flex items-center gap-1.5 rounded-full border border-border px-5 py-2.5 text-sm text-foreground font-sans hover:bg-muted/50 transition-colors",
|
|
1062
|
+
children: [
|
|
1063
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowLeftIcon, { className: "w-3.5 h-3.5" }),
|
|
1064
|
+
"Back"
|
|
1065
|
+
]
|
|
1066
|
+
}
|
|
1067
|
+
),
|
|
1068
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1069
|
+
"button",
|
|
1070
|
+
{
|
|
1071
|
+
type: "button",
|
|
1072
|
+
onClick: goNext,
|
|
1073
|
+
className: cn(
|
|
1074
|
+
"rounded-full bg-primary px-8 py-2.5 text-sm font-bold",
|
|
1075
|
+
"text-primary-foreground font-heading transition-colors hover:bg-primary/90",
|
|
1076
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
1077
|
+
),
|
|
1078
|
+
children: step === "payment" ? "Confirm booking" : "Next"
|
|
1079
|
+
}
|
|
1080
|
+
)
|
|
1081
|
+
] }),
|
|
1082
|
+
stepIndex === 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1083
|
+
"button",
|
|
1084
|
+
{
|
|
1085
|
+
type: "button",
|
|
1086
|
+
onClick: onCancel,
|
|
1087
|
+
className: "text-sm text-muted-foreground font-sans hover:text-foreground transition-colors self-start underline underline-offset-2",
|
|
1088
|
+
children: "Cancel"
|
|
1089
|
+
}
|
|
1090
|
+
)
|
|
1091
|
+
] })
|
|
1092
|
+
] })
|
|
1093
|
+
] });
|
|
1094
|
+
}
|
|
1095
|
+
function Offer({
|
|
1096
|
+
logo = "/logo-planetaexo.png",
|
|
1097
|
+
logoAlt = "Planeta EXO",
|
|
1098
|
+
title,
|
|
1099
|
+
adventures,
|
|
1100
|
+
subtotal,
|
|
1101
|
+
total,
|
|
1102
|
+
depositInfo,
|
|
1103
|
+
agent,
|
|
1104
|
+
onContinue,
|
|
1105
|
+
continueLabel = "Book now",
|
|
1106
|
+
className
|
|
1107
|
+
}) {
|
|
1108
|
+
const [showBooking, setShowBooking] = React3__namespace.useState(false);
|
|
1109
|
+
const handleBook = () => {
|
|
1110
|
+
setShowBooking(true);
|
|
1111
|
+
onContinue == null ? void 0 : onContinue();
|
|
1112
|
+
};
|
|
1113
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("w-full max-w-5xl mx-auto flex flex-col gap-6", className), children: [
|
|
1114
|
+
/* @__PURE__ */ jsxRuntime.jsx("img", { src: logo, alt: logoAlt, className: "w-[200px] h-auto object-contain" }),
|
|
1115
|
+
/* @__PURE__ */ jsxRuntime.jsx("h1", { className: "text-2xl font-black text-foreground font-heading leading-tight", children: title }),
|
|
1116
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-1 lg:grid-cols-[1fr_280px] gap-6 lg:gap-8 items-start", children: [
|
|
1117
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-6", children: [
|
|
1118
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "flex flex-col gap-5", children: [
|
|
1119
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1120
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MapIcon, { className: "w-5 h-5 text-primary shrink-0" }),
|
|
1121
|
+
/* @__PURE__ */ jsxRuntime.jsx("h2", { className: "font-bold text-foreground font-heading text-base", children: "Included Adventures" })
|
|
1122
|
+
] }),
|
|
1123
|
+
adventures.map((adventure) => /* @__PURE__ */ jsxRuntime.jsx(OfferAdventureCard, { adventure }, adventure.id))
|
|
1124
|
+
] }),
|
|
1125
|
+
!showBooking && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1126
|
+
OfferSummarySection,
|
|
1127
|
+
{
|
|
1128
|
+
adventures,
|
|
1129
|
+
subtotal,
|
|
1130
|
+
total,
|
|
1131
|
+
depositInfo,
|
|
1132
|
+
onContinue: handleBook,
|
|
1133
|
+
continueLabel
|
|
1134
|
+
}
|
|
1135
|
+
),
|
|
1136
|
+
showBooking && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1137
|
+
BookingWizard,
|
|
1138
|
+
{
|
|
1139
|
+
adventures,
|
|
1140
|
+
total,
|
|
1141
|
+
depositInfo,
|
|
1142
|
+
onCancel: () => setShowBooking(false)
|
|
1143
|
+
}
|
|
1144
|
+
)
|
|
1145
|
+
] }),
|
|
1146
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:sticky lg:top-8", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1147
|
+
OfferSidebar,
|
|
1148
|
+
{
|
|
1149
|
+
total,
|
|
1150
|
+
agent,
|
|
1151
|
+
onBook: handleBook,
|
|
1152
|
+
bookLabel: continueLabel
|
|
1153
|
+
}
|
|
1154
|
+
) })
|
|
1155
|
+
] })
|
|
1156
|
+
] });
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
exports.Offer = Offer;
|
|
1160
|
+
exports.OfferAdventureCard = OfferAdventureCard;
|
|
1161
|
+
exports.cn = cn;
|
|
1162
|
+
//# sourceMappingURL=index.cjs.map
|
|
1163
|
+
//# sourceMappingURL=index.cjs.map
|