@anker-in/ui 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1028,6 +1028,66 @@ function useCreateBooking(client) {
1028
1028
  createBooking
1029
1029
  };
1030
1030
  }
1031
+ function useBooking(client, token, locale, options) {
1032
+ const [state, setState] = useState({
1033
+ data: null,
1034
+ loading: true,
1035
+ error: null
1036
+ });
1037
+ const enabled = options?.enabled !== false;
1038
+ useEffect(() => {
1039
+ if (!enabled || !token) return;
1040
+ let cancelled = false;
1041
+ const fetchData = async () => {
1042
+ setState((prev) => ({ ...prev, loading: true, error: null }));
1043
+ try {
1044
+ const data = await client.getBooking(token, locale);
1045
+ if (!cancelled) {
1046
+ setState({ data, loading: false, error: null });
1047
+ }
1048
+ } catch (error) {
1049
+ if (!cancelled) {
1050
+ setState({
1051
+ data: null,
1052
+ loading: false,
1053
+ error: error instanceof ApiError ? error : new ApiError(1006, "Unknown error")
1054
+ });
1055
+ }
1056
+ }
1057
+ };
1058
+ fetchData();
1059
+ return () => {
1060
+ cancelled = true;
1061
+ };
1062
+ }, [client, token, locale, enabled]);
1063
+ return state;
1064
+ }
1065
+ function useCancelBooking(client) {
1066
+ const [state, setState] = useState({
1067
+ data: null,
1068
+ loading: false,
1069
+ error: null
1070
+ });
1071
+ const cancelBooking = useCallback(
1072
+ async (token, locale) => {
1073
+ setState({ data: null, loading: true, error: null });
1074
+ try {
1075
+ const result = await client.cancelBooking(token, locale);
1076
+ setState({ data: result, loading: false, error: null });
1077
+ return result;
1078
+ } catch (error) {
1079
+ const apiError = error instanceof ApiError ? error : new ApiError(1006, "Unknown error");
1080
+ setState({ data: null, loading: false, error: apiError });
1081
+ throw apiError;
1082
+ }
1083
+ },
1084
+ [client]
1085
+ );
1086
+ return {
1087
+ ...state,
1088
+ cancelBooking
1089
+ };
1090
+ }
1031
1091
  var AntdMobileIsolated = ({
1032
1092
  children,
1033
1093
  className,
@@ -1799,11 +1859,39 @@ var DemoRoomApiClient = class {
1799
1859
  });
1800
1860
  }
1801
1861
  /**
1802
- * 根据 token 获取预约信息
1803
- * @param token 预约 token
1862
+ * 根据 token 获取预约详情(支持多语言)
1863
+ * @param token 预约凭证 (cancel_token)
1864
+ * @param locale 语言偏好(可选,也可以通过 Accept-Language Header)
1865
+ */
1866
+ async getBooking(token, locale) {
1867
+ const headers = {};
1868
+ if (locale) {
1869
+ headers["Accept-Language"] = locale;
1870
+ }
1871
+ const response = await this.request(
1872
+ `/api/v1/store/bookings/${token}`,
1873
+ { headers }
1874
+ );
1875
+ return response.booking;
1876
+ }
1877
+ /**
1878
+ * 取消预约(支持多语言邮件通知)
1879
+ * @param token 预约凭证 (cancel_token)
1880
+ * @param locale 语言偏好(可选,用于邮件通知)
1804
1881
  */
1805
- async getBooking(token) {
1806
- return this.request(`/api/v1/store/bookings/${token}`);
1882
+ async cancelBooking(token, locale) {
1883
+ const headers = {};
1884
+ if (locale) {
1885
+ headers["Accept-Language"] = locale;
1886
+ }
1887
+ const response = await this.request(
1888
+ `/api/v1/store/bookings/${token}/cancel`,
1889
+ {
1890
+ method: "POST",
1891
+ headers
1892
+ }
1893
+ );
1894
+ return response.booking;
1807
1895
  }
1808
1896
  };
1809
1897
  function createDemoRoomApi(config) {
@@ -2227,7 +2315,7 @@ var QuestionnaireForm = ({
2227
2315
  }
2228
2316
  );
2229
2317
  case "radio":
2230
- return /* @__PURE__ */ jsx("div", { className: "space-y-3", children: question.options?.map((option) => /* @__PURE__ */ jsxs(
2318
+ return /* @__PURE__ */ jsx("div", { className: "space-y-3", children: question?.options?.map((option) => /* @__PURE__ */ jsxs(
2231
2319
  "label",
2232
2320
  {
2233
2321
  className: "flex items-center gap-3 cursor-pointer group",
@@ -2249,7 +2337,7 @@ var QuestionnaireForm = ({
2249
2337
  option.value || option.label
2250
2338
  )) });
2251
2339
  case "checkbox":
2252
- return /* @__PURE__ */ jsx("div", { className: "space-y-3", children: question.options?.map((option) => {
2340
+ return /* @__PURE__ */ jsx("div", { className: "space-y-3", children: question?.options?.map((option) => {
2253
2341
  const optionValue = option.value || option.label;
2254
2342
  const isChecked = (responses[questionId] || []).includes(
2255
2343
  optionValue
@@ -2308,7 +2396,7 @@ var QuestionnaireForm = ({
2308
2396
  }
2309
2397
  };
2310
2398
  return /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className: cn("space-y-6", className), children: [
2311
- questions.map((question) => {
2399
+ questions?.map((question) => {
2312
2400
  const questionId = getQuestionId(question);
2313
2401
  return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2314
2402
  /* @__PURE__ */ jsxs("label", { className: "block", children: [
@@ -2794,12 +2882,13 @@ var BookingSuccess = ({
2794
2882
  bookingData: initialBookingData,
2795
2883
  token,
2796
2884
  apiConfig,
2797
- onBackToHome,
2885
+ onScheduleAgain,
2798
2886
  className
2799
2887
  }) => {
2800
2888
  const [bookingData, setBookingData] = useState(initialBookingData || null);
2801
2889
  const [loading, setLoading] = useState(false);
2802
2890
  const [error, setError] = useState(null);
2891
+ const [isCancelled, setIsCancelled] = useState(false);
2803
2892
  useEffect(() => {
2804
2893
  if (token && apiConfig && !initialBookingData) {
2805
2894
  const fetchBookingData = async () => {
@@ -2807,8 +2896,9 @@ var BookingSuccess = ({
2807
2896
  setError(null);
2808
2897
  try {
2809
2898
  const apiClient = createDemoRoomApi(apiConfig);
2810
- const booking = await apiClient.getBooking(token);
2899
+ const booking = await apiClient.getBooking(token, apiConfig.locale);
2811
2900
  setBookingData(booking);
2901
+ setIsCancelled(booking.status === "cancelled");
2812
2902
  } catch (err) {
2813
2903
  console.error("Failed to fetch booking data:", err);
2814
2904
  setError("Failed to load booking information");
@@ -2820,140 +2910,115 @@ var BookingSuccess = ({
2820
2910
  }
2821
2911
  }, [token, apiConfig, initialBookingData]);
2822
2912
  if (loading) {
2823
- return /* @__PURE__ */ jsx("div", { className: `min-h-screen bg-[#F5F5F5] py-12 px-6 ${className || ""}`, children: /* @__PURE__ */ jsxs("div", { className: "max-w-2xl mx-auto text-center", children: [
2824
- /* @__PURE__ */ jsx("div", { className: "animate-spin w-16 h-16 mx-auto mb-4 border-4 border-[#3ADB67] border-t-transparent rounded-full" }),
2825
- /* @__PURE__ */ jsx("p", { className: "text-xl text-gray-600", children: "Loading booking information..." })
2826
- ] }) });
2913
+ return /* @__PURE__ */ jsx("div", { className: `min-h-screen bg-white py-12 px-6 ${className || ""}`, children: /* @__PURE__ */ jsx("div", { className: "max-w-3xl mx-auto", children: /* @__PURE__ */ jsxs("div", { className: "animate-pulse space-y-6", children: [
2914
+ /* @__PURE__ */ jsx("div", { className: "h-8 bg-gray-200 rounded w-1/3" }),
2915
+ /* @__PURE__ */ jsx("div", { className: "h-24 bg-gray-200 rounded" }),
2916
+ /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
2917
+ /* @__PURE__ */ jsx("div", { className: "h-20 bg-gray-200 rounded" }),
2918
+ /* @__PURE__ */ jsx("div", { className: "h-20 bg-gray-200 rounded" }),
2919
+ /* @__PURE__ */ jsx("div", { className: "h-20 bg-gray-200 rounded" })
2920
+ ] })
2921
+ ] }) }) });
2827
2922
  }
2828
2923
  if (error || !bookingData) {
2829
- return /* @__PURE__ */ jsx("div", { className: `min-h-screen bg-[#F5F5F5] py-12 px-6 ${className || ""}`, children: /* @__PURE__ */ jsx("div", { className: "max-w-2xl mx-auto", children: /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-[12px] border border-red-200 p-8 text-center", children: [
2830
- /* @__PURE__ */ jsx("div", { className: "w-16 h-16 mx-auto mb-4 rounded-full bg-red-100 flex items-center justify-center", children: /* @__PURE__ */ jsx(
2831
- "svg",
2832
- {
2833
- width: "32",
2834
- height: "32",
2835
- viewBox: "0 0 24 24",
2836
- fill: "none",
2837
- xmlns: "http://www.w3.org/2000/svg",
2838
- children: /* @__PURE__ */ jsx(
2839
- "path",
2840
- {
2841
- d: "M12 8V12M12 16H12.01M21 12C21 16.9706 16.9706 21 12 21C7.02944 21 3 16.9706 3 12C3 7.02944 7.02944 3 12 3C16.9706 3 21 7.02944 21 12Z",
2842
- stroke: "#EF4444",
2843
- strokeWidth: "2",
2844
- strokeLinecap: "round",
2845
- strokeLinejoin: "round"
2846
- }
2847
- )
2848
- }
2849
- ) }),
2924
+ return /* @__PURE__ */ jsx("div", { className: `min-h-screen bg-white py-12 px-6 ${className || ""}`, children: /* @__PURE__ */ jsx("div", { className: "max-w-3xl mx-auto", children: /* @__PURE__ */ jsxs("div", { className: "text-center py-12", children: [
2925
+ /* @__PURE__ */ jsx("div", { className: "text-6xl mb-4", children: "\u274C" }),
2850
2926
  /* @__PURE__ */ jsx("h2", { className: "text-2xl font-bold text-gray-900 mb-2", children: error || "Booking Not Found" }),
2851
- /* @__PURE__ */ jsx("p", { className: "text-base text-gray-600 mb-6", children: "We couldn't find your booking information. Please check your booking confirmation email or contact support." }),
2852
- onBackToHome && /* @__PURE__ */ jsx(
2927
+ /* @__PURE__ */ jsx("p", { className: "text-base text-gray-600 mb-6", children: "We couldn't find your booking information." }),
2928
+ onScheduleAgain && /* @__PURE__ */ jsx(
2853
2929
  "button",
2854
2930
  {
2855
- onClick: onBackToHome,
2856
- className: "px-6 py-3 rounded-full bg-[#3ADB67] text-white font-medium text-base hover:bg-[#2FC257] transition-colors focus:outline-none focus:ring-2 focus:ring-[#3ADB67] focus:ring-offset-2",
2857
- children: "Back to Home"
2931
+ onClick: onScheduleAgain,
2932
+ className: "px-6 py-3 bg-black text-white rounded-full font-medium hover:bg-gray-800 transition-colors",
2933
+ children: "Schedule Again"
2858
2934
  }
2859
2935
  )
2860
2936
  ] }) }) });
2861
2937
  }
2862
- return /* @__PURE__ */ jsx("div", { className: `min-h-screen bg-[#F5F5F5] py-12 px-6 ${className || ""}`, children: /* @__PURE__ */ jsxs("div", { className: "max-w-2xl mx-auto", children: [
2863
- /* @__PURE__ */ jsxs("div", { className: "text-center mb-8", children: [
2864
- /* @__PURE__ */ jsx("div", { className: "w-20 h-20 mx-auto mb-6 rounded-full bg-[#3ADB67] flex items-center justify-center", children: /* @__PURE__ */ jsx(
2865
- "svg",
2938
+ return /* @__PURE__ */ jsx("div", { className: `min-h-screen bg-white py-12 px-6 ${className || ""}`, children: /* @__PURE__ */ jsxs("div", { className: "max-w-3xl mx-auto", children: [
2939
+ /* @__PURE__ */ jsx("h1", { className: "text-[40px] font-bold text-gray-900 mb-8", children: "Your Appointment" }),
2940
+ isCancelled ? /* @__PURE__ */ jsxs("div", { className: "bg-gray-50 rounded-lg p-6 mb-8 flex items-center justify-between", children: [
2941
+ /* @__PURE__ */ jsx("p", { className: "text-base text-gray-700", children: "This appointment has been canceled." }),
2942
+ onScheduleAgain && /* @__PURE__ */ jsx(
2943
+ "button",
2866
2944
  {
2867
- width: "48",
2868
- height: "48",
2869
- viewBox: "0 0 32 32",
2870
- fill: "none",
2871
- xmlns: "http://www.w3.org/2000/svg",
2872
- children: /* @__PURE__ */ jsx(
2873
- "path",
2874
- {
2875
- d: "M26.6667 8L12 22.6667L5.33334 16",
2876
- stroke: "white",
2877
- strokeWidth: "3",
2878
- strokeLinecap: "round",
2879
- strokeLinejoin: "round"
2880
- }
2881
- )
2945
+ onClick: onScheduleAgain,
2946
+ className: "px-6 py-3 bg-black text-white rounded-full font-medium hover:bg-gray-800 transition-colors whitespace-nowrap",
2947
+ children: "Schedule again"
2882
2948
  }
2883
- ) }),
2884
- /* @__PURE__ */ jsx("h1", { className: "text-[48px] font-bold text-gray-900 mb-4", children: "Booking Confirmed!" }),
2885
- /* @__PURE__ */ jsx("p", { className: "text-xl text-gray-600", children: "Your demo room booking has been successfully confirmed." })
2886
- ] }),
2887
- /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-[12px] border border-[#E4E5E6] p-8 mb-6", children: [
2888
- /* @__PURE__ */ jsx("h2", { className: "text-2xl font-bold text-gray-900 mb-6", children: "Booking Details" }),
2889
- /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
2890
- /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-start py-3 border-b border-gray-100", children: [
2891
- /* @__PURE__ */ jsx("span", { className: "text-base text-gray-600 font-medium", children: "Booking ID" }),
2892
- /* @__PURE__ */ jsx("span", { className: "text-base text-gray-900 font-semibold", children: bookingData.booking_id })
2893
- ] }),
2894
- /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-start py-3 border-b border-gray-100", children: [
2895
- /* @__PURE__ */ jsx("span", { className: "text-base text-gray-600 font-medium", children: "Date" }),
2896
- /* @__PURE__ */ jsx("span", { className: "text-base text-gray-900 font-semibold", children: bookingData.booking_date })
2897
- ] }),
2898
- /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-start py-3 border-b border-gray-100", children: [
2899
- /* @__PURE__ */ jsx("span", { className: "text-base text-gray-600 font-medium", children: "Time" }),
2900
- /* @__PURE__ */ jsx("span", { className: "text-base text-gray-900 font-semibold", children: bookingData.booking_time })
2901
- ] }),
2902
- /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-start py-3 border-b border-gray-100", children: [
2903
- /* @__PURE__ */ jsx("span", { className: "text-base text-gray-600 font-medium", children: "Status" }),
2904
- /* @__PURE__ */ jsx("span", { className: "inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-[#3ADB67] bg-opacity-10 text-[#3ADB67]", children: bookingData.status })
2905
- ] }),
2906
- /* @__PURE__ */ jsxs("div", { className: "flex justify-between items-start py-3", children: [
2907
- /* @__PURE__ */ jsx("span", { className: "text-base text-gray-600 font-medium", children: "Email" }),
2908
- /* @__PURE__ */ jsx("span", { className: "text-base text-gray-900 font-semibold", children: bookingData.customer_email })
2909
- ] })
2910
- ] })
2911
- ] }),
2912
- /* @__PURE__ */ jsx("div", { className: "bg-blue-50 border border-blue-200 rounded-[12px] p-6 mb-8", children: /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3", children: [
2913
- /* @__PURE__ */ jsx(
2914
- "svg",
2915
- {
2916
- className: "w-6 h-6 text-blue-600 flex-shrink-0 mt-0.5",
2917
- fill: "none",
2918
- viewBox: "0 0 24 24",
2919
- stroke: "currentColor",
2920
- children: /* @__PURE__ */ jsx(
2921
- "path",
2949
+ )
2950
+ ] }) : /* @__PURE__ */ jsx("div", { className: "bg-green-50 rounded-lg p-6 mb-8 flex items-center justify-between border border-green-200", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
2951
+ /* @__PURE__ */ jsx("svg", { className: "w-6 h-6 text-green-600", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 13l4 4L19 7" }) }),
2952
+ /* @__PURE__ */ jsx("p", { className: "text-base text-gray-700", children: "Your appointment has been confirmed." })
2953
+ ] }) }),
2954
+ /* @__PURE__ */ jsxs("div", { className: "space-y-8", children: [
2955
+ /* @__PURE__ */ jsxs("div", { children: [
2956
+ /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-gray-900 mb-3", children: "Location" }),
2957
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2958
+ bookingData.demoroom_name && /* @__PURE__ */ jsx("p", { className: "text-base font-medium text-gray-900", children: bookingData.demoroom_name }),
2959
+ bookingData.address && /* @__PURE__ */ jsx("p", { className: "text-base text-gray-600", children: bookingData.address }),
2960
+ bookingData.latitude && bookingData.longitude && /* @__PURE__ */ jsx(
2961
+ "a",
2922
2962
  {
2923
- strokeLinecap: "round",
2924
- strokeLinejoin: "round",
2925
- strokeWidth: 2,
2926
- d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
2963
+ href: `https://www.google.com/maps/search/?api=1&query=${bookingData.latitude},${bookingData.longitude}`,
2964
+ target: "_blank",
2965
+ rel: "noopener noreferrer",
2966
+ className: "inline-flex items-center gap-1 text-base text-blue-600 hover:text-blue-700 hover:underline",
2967
+ children: "Open in Google Maps \u2197"
2927
2968
  }
2928
2969
  )
2929
- }
2930
- ),
2970
+ ] })
2971
+ ] }),
2931
2972
  /* @__PURE__ */ jsxs("div", { children: [
2932
- /* @__PURE__ */ jsx("h3", { className: "text-base font-semibold text-blue-900 mb-1", children: "Confirmation Email Sent" }),
2933
- /* @__PURE__ */ jsxs("p", { className: "text-sm text-blue-800", children: [
2934
- "A confirmation email has been sent to ",
2935
- /* @__PURE__ */ jsx("strong", { children: bookingData.customer_email }),
2936
- " with all the booking details and instructions."
2973
+ /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-gray-900 mb-3", children: "Date and Time" }),
2974
+ /* @__PURE__ */ jsxs("p", { className: "text-base text-gray-900", children: [
2975
+ bookingData.booking_date,
2976
+ bookingData.time_slot && `, ${bookingData.time_slot}`,
2977
+ !bookingData.time_slot && bookingData.booking_time && `, ${bookingData.booking_time}`
2978
+ ] })
2979
+ ] }),
2980
+ bookingData.equipment && /* @__PURE__ */ jsxs("div", { children: [
2981
+ /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-gray-900 mb-3", children: "Event" }),
2982
+ /* @__PURE__ */ jsx("p", { className: "text-base text-gray-900", children: bookingData.equipment })
2983
+ ] }),
2984
+ /* @__PURE__ */ jsxs("div", { children: [
2985
+ /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-gray-900 mb-3", children: "Demo Room" }),
2986
+ /* @__PURE__ */ jsx("p", { className: "text-base text-gray-900", children: bookingData.demoroom_code })
2987
+ ] }),
2988
+ /* @__PURE__ */ jsxs("div", { children: [
2989
+ /* @__PURE__ */ jsx("h2", { className: "text-lg font-semibold text-gray-900 mb-3", children: "Visitor Info" }),
2990
+ /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
2991
+ /* @__PURE__ */ jsx("p", { className: "text-base text-gray-900", children: bookingData.customer_name }),
2992
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-base text-gray-600", children: [
2993
+ /* @__PURE__ */ jsx("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx(
2994
+ "path",
2995
+ {
2996
+ strokeLinecap: "round",
2997
+ strokeLinejoin: "round",
2998
+ strokeWidth: 2,
2999
+ d: "M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"
3000
+ }
3001
+ ) }),
3002
+ bookingData.phone_code && bookingData.phone_number ? /* @__PURE__ */ jsxs("span", { children: [
3003
+ bookingData.phone_code,
3004
+ " ",
3005
+ bookingData.phone_number
3006
+ ] }) : /* @__PURE__ */ jsx("span", { children: "No phone provided" })
3007
+ ] }),
3008
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-base text-gray-600", children: [
3009
+ /* @__PURE__ */ jsx("svg", { className: "w-5 h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx(
3010
+ "path",
3011
+ {
3012
+ strokeLinecap: "round",
3013
+ strokeLinejoin: "round",
3014
+ strokeWidth: 2,
3015
+ d: "M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
3016
+ }
3017
+ ) }),
3018
+ /* @__PURE__ */ jsx("span", { children: bookingData.customer_email })
3019
+ ] })
2937
3020
  ] })
2938
3021
  ] })
2939
- ] }) }),
2940
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col sm:flex-row gap-4", children: [
2941
- onBackToHome && /* @__PURE__ */ jsx(
2942
- "button",
2943
- {
2944
- onClick: onBackToHome,
2945
- className: "flex-1 px-6 py-4 rounded-full bg-[#3ADB67] text-white font-medium text-base hover:bg-[#2FC257] transition-colors focus:outline-none focus:ring-2 focus:ring-[#3ADB67] focus:ring-offset-2",
2946
- children: "Back to Home"
2947
- }
2948
- ),
2949
- /* @__PURE__ */ jsx(
2950
- "button",
2951
- {
2952
- onClick: () => window.print(),
2953
- className: "flex-1 px-6 py-4 rounded-full border-2 border-[#3ADB67] text-[#3ADB67] font-medium text-base hover:bg-[#3ADB67] hover:bg-opacity-5 transition-colors focus:outline-none focus:ring-2 focus:ring-[#3ADB67] focus:ring-offset-2",
2954
- children: "Print Confirmation"
2955
- }
2956
- )
2957
3022
  ] })
2958
3023
  ] }) });
2959
3024
  };
@@ -3096,6 +3161,6 @@ var ThemeProvider = ({
3096
3161
  return /* @__PURE__ */ jsx(ThemeContext.Provider, { value: { theme: theme2 }, children });
3097
3162
  };
3098
3163
 
3099
- export { BookingForm, BookingSuccess, DemoRoom, DemoRoomApiClient, DemoRoomDetail, ThemeProvider, cn, createDemoRoomApi, useCreateBooking, useDemoRoom, useDemoRooms, useQuestionnaire, useTheme, useTimeslots };
3164
+ export { BookingForm, BookingSuccess, DemoRoom, DemoRoomApiClient, DemoRoomDetail, ThemeProvider, cn, createDemoRoomApi, useBooking, useCancelBooking, useCreateBooking, useDemoRoom, useDemoRooms, useQuestionnaire, useTheme, useTimeslots };
3100
3165
  //# sourceMappingURL=index.mjs.map
3101
3166
  //# sourceMappingURL=index.mjs.map