medos-sdk 1.1.9 → 1.1.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/dist/client/MedosClient.d.ts +1 -0
  2. package/dist/client/MedosClient.js +7 -0
  3. package/dist/components/AppointmentCalender.js +22 -8
  4. package/dist/components/AppointmentConfirmationStep.d.ts +4 -0
  5. package/dist/components/AppointmentConfirmationStep.js +50 -52
  6. package/dist/components/AppointmentDateTimeModal.d.ts +4 -0
  7. package/dist/components/AppointmentDateTimeModal.js +216 -165
  8. package/dist/components/AppointmentSummaryStep.d.ts +12 -0
  9. package/dist/components/AppointmentSummaryStep.js +168 -0
  10. package/dist/components/BookingOptionStep.d.ts +14 -0
  11. package/dist/components/BookingOptionStep.js +346 -0
  12. package/dist/components/ContactInformationStep.js +13 -6
  13. package/dist/components/ContactPreferenceStep.js +16 -6
  14. package/dist/components/DoctorSelectModal.d.ts +5 -0
  15. package/dist/components/DoctorSelectModal.js +169 -74
  16. package/dist/components/EnquiryForm.js +84 -72
  17. package/dist/components/Icons/CloseIcon.d.ts +9 -0
  18. package/dist/components/Icons/CloseIcon.js +5 -0
  19. package/dist/components/InquiryDetailsStep.js +11 -6
  20. package/dist/components/PatientDetailsStep.js +17 -12
  21. package/dist/components/PatientSelectionStep.d.ts +12 -0
  22. package/dist/components/PatientSelectionStep.js +254 -0
  23. package/dist/components/PhoneVerificationStep.js +1 -1
  24. package/dist/components/SuccessStep.js +1 -1
  25. package/dist/components/appointment-booking/AppointmentCalender.d.ts +5 -0
  26. package/dist/components/appointment-booking/AppointmentCalender.js +247 -0
  27. package/dist/components/appointment-booking/hooks/index.d.ts +3 -0
  28. package/dist/components/appointment-booking/hooks/index.js +3 -0
  29. package/dist/components/appointment-booking/hooks/useAppointmentFlow.d.ts +8 -0
  30. package/dist/components/appointment-booking/hooks/useAppointmentFlow.js +318 -0
  31. package/dist/components/appointment-booking/hooks/useAppointmentState.d.ts +9 -0
  32. package/dist/components/appointment-booking/hooks/useAppointmentState.js +125 -0
  33. package/dist/components/appointment-booking/hooks/useInitializeAddresses.d.ts +1 -0
  34. package/dist/components/appointment-booking/hooks/useInitializeAddresses.js +55 -0
  35. package/dist/components/appointment-booking/index.d.ts +5 -0
  36. package/dist/components/appointment-booking/index.js +3 -0
  37. package/dist/components/appointment-booking/types.d.ts +291 -0
  38. package/dist/components/appointment-booking/types.js +49 -0
  39. package/dist/components/appointment-modal-styles.d.ts +259 -0
  40. package/dist/components/appointment-modal-styles.js +395 -0
  41. package/dist/components/constant.d.ts +2 -0
  42. package/dist/components/constant.js +15 -0
  43. package/dist/components/custom-calendar.js +20 -11
  44. package/dist/components/styles.js +93 -52
  45. package/dist/components/theme-styles.d.ts +5 -4
  46. package/dist/components/theme-styles.js +221 -125
  47. package/dist/components/types.d.ts +12 -139
  48. package/dist/components/types.js +15 -32
  49. package/dist/components/uiComponents/SelectDropdown.d.ts +1 -1
  50. package/dist/components/uiComponents/SelectDropdown.js +24 -24
  51. package/dist/components/utils.d.ts +3 -0
  52. package/dist/components/utils.js +59 -0
  53. package/dist/components/validation.d.ts +2 -0
  54. package/dist/components/validation.js +41 -0
  55. package/dist/core/theme/index.d.ts +1 -0
  56. package/dist/core/theme/index.js +1 -0
  57. package/dist/core/theme/responsive.d.ts +15 -0
  58. package/dist/core/theme/responsive.js +113 -0
  59. package/dist/core/theme/themes.js +16 -4
  60. package/dist/core/theme/types.d.ts +8 -0
  61. package/dist/enquiry-form/validation.js +1 -1
  62. package/dist/index.d.ts +3 -1
  63. package/dist/index.js +2 -1
  64. package/dist/react/ThemeProvider.d.ts +2 -1
  65. package/dist/react/ThemeProvider.js +49 -10
  66. package/dist/react/index.d.ts +2 -1
  67. package/dist/react/index.js +1 -1
  68. package/dist/services/AppointmentService.d.ts +80 -2
  69. package/dist/services/AppointmentService.js +114 -5
  70. package/dist/services/WorkspaceService.d.ts +58 -3
  71. package/dist/services/WorkspaceService.js +10 -1
  72. package/dist/vanilla/AppointmentCalendarWidget.d.ts +9 -7
  73. package/dist/vanilla/AppointmentCalendarWidget.js +834 -384
  74. package/dist/vanilla/EnquiryFormWidget.d.ts +1 -0
  75. package/dist/vanilla/EnquiryFormWidget.js +25 -43
  76. package/dist/vanilla/client/MedosClient.d.ts +1 -0
  77. package/dist/vanilla/components/AppointmentConfirmationStep.d.ts +4 -0
  78. package/dist/vanilla/components/AppointmentDateTimeModal.d.ts +4 -0
  79. package/dist/vanilla/components/AppointmentSummaryStep.d.ts +12 -0
  80. package/dist/vanilla/components/BookingOptionStep.d.ts +14 -0
  81. package/dist/vanilla/components/DoctorSelectModal.d.ts +5 -0
  82. package/dist/vanilla/components/Icons/CloseIcon.d.ts +9 -0
  83. package/dist/vanilla/components/PatientSelectionStep.d.ts +12 -0
  84. package/dist/vanilla/components/VanillaCalendar.js +33 -18
  85. package/dist/vanilla/components/VanillaIcons.d.ts +5 -0
  86. package/dist/vanilla/components/VanillaIcons.js +92 -0
  87. package/dist/vanilla/components/VanillaSelect.d.ts +3 -0
  88. package/dist/vanilla/components/VanillaSelect.js +93 -5
  89. package/dist/vanilla/components/appointment-booking/AppointmentCalender.d.ts +5 -0
  90. package/dist/vanilla/components/appointment-booking/hooks/index.d.ts +3 -0
  91. package/dist/vanilla/components/appointment-booking/hooks/useAppointmentFlow.d.ts +8 -0
  92. package/dist/vanilla/components/appointment-booking/hooks/useAppointmentState.d.ts +9 -0
  93. package/dist/vanilla/components/appointment-booking/hooks/useInitializeAddresses.d.ts +1 -0
  94. package/dist/vanilla/components/appointment-booking/index.d.ts +5 -0
  95. package/dist/vanilla/components/appointment-booking/types.d.ts +291 -0
  96. package/dist/vanilla/components/appointment-modal-styles.d.ts +259 -0
  97. package/dist/vanilla/components/constant.d.ts +2 -0
  98. package/dist/vanilla/components/theme-styles.d.ts +5 -4
  99. package/dist/vanilla/components/types.d.ts +12 -139
  100. package/dist/vanilla/components/uiComponents/SelectDropdown.d.ts +1 -1
  101. package/dist/vanilla/components/utils.d.ts +3 -0
  102. package/dist/vanilla/components/validation.d.ts +2 -0
  103. package/dist/vanilla/core/theme/index.d.ts +1 -0
  104. package/dist/vanilla/core/theme/responsive.d.ts +15 -0
  105. package/dist/vanilla/core/theme/types.d.ts +8 -0
  106. package/dist/vanilla/enquiry-widget.js +374 -53
  107. package/dist/vanilla/index.d.ts +3 -1
  108. package/dist/vanilla/react/ThemeProvider.d.ts +2 -1
  109. package/dist/vanilla/react/index.d.ts +2 -1
  110. package/dist/vanilla/services/AppointmentService.d.ts +80 -2
  111. package/dist/vanilla/services/WorkspaceService.d.ts +58 -3
  112. package/dist/vanilla/vanilla/AppointmentCalendarWidget.d.ts +9 -7
  113. package/dist/vanilla/vanilla/EnquiryFormWidget.d.ts +1 -0
  114. package/dist/vanilla/vanilla/components/VanillaIcons.d.ts +5 -0
  115. package/dist/vanilla/vanilla/components/VanillaSelect.d.ts +3 -0
  116. package/dist/vanilla/widget.css +833 -207
  117. package/dist/vanilla/widget.js +6463 -5687
  118. package/package.json +1 -1
@@ -21,6 +21,7 @@ declare class MedosClient {
21
21
  static fetchAppointments(workspaceId: number, addressId: number, doctorId: number, appointmentDate: string): Promise<any[]>;
22
22
  static sendPhoneVerificationOtp(payload: SendPhoneVerificationOtpPayload): Promise<any>;
23
23
  static verifyPhoneVerificationOtp(payload: VerifyPhoneVerificationOtpPayload): Promise<any>;
24
+ static fetchTheme(): Promise<string | undefined>;
24
25
  static get client(): AxiosInstance;
25
26
  static ensureInitialized(): Promise<AxiosInstance>;
26
27
  static isInitialized(): boolean;
@@ -134,6 +134,13 @@ class MedosClient {
134
134
  }
135
135
  return PatientService.verifyPhoneVerificationOtp(payload);
136
136
  }
137
+ static async fetchTheme() {
138
+ if (!this.instance) {
139
+ throw new Error("MedosClient not initialized. Call MedosClient.init() first.");
140
+ }
141
+ const { WorkspaceService } = await import("../services/WorkspaceService");
142
+ return WorkspaceService.fetchTheme();
143
+ }
137
144
  static get client() {
138
145
  if (!this.instance && !this.initPromise) {
139
146
  throw new Error("MedosClient not initialized. Call MedosClient.init() or MedosClient.initWithSession() first.");
@@ -180,8 +180,14 @@ export const AppointmentCalender = ({ onError, }) => {
180
180
  dispatch({ type: "SET_OTP_SENT", payload: false });
181
181
  dispatch({ type: "SET_OTP_CODE", payload: "" });
182
182
  dispatch({ type: "SET_OTP_VERIFIED", payload: false });
183
+ dispatch({ type: "SET_STEP", payload: 1 });
184
+ }
185
+ else if (state.step === 4) {
186
+ dispatch({ type: "SET_STEP", payload: 3 });
187
+ }
188
+ else {
189
+ dispatch({ type: "SET_STEP", payload: Math.max(0, state.step - 1) });
183
190
  }
184
- dispatch({ type: "SET_STEP", payload: Math.max(0, state.step - 1) });
185
191
  }, [state.step]);
186
192
  const goToNext = useCallback(() => {
187
193
  dispatch({ type: "SET_STEP", payload: Math.min(5, state.step + 1) });
@@ -365,17 +371,25 @@ export const AppointmentCalender = ({ onError, }) => {
365
371
  }, []);
366
372
  const theme = useTheme();
367
373
  const styles = getStyles(theme);
368
- return (_jsx("div", { style: styles.container, children: _jsxs("div", { style: styles.card, children: [_jsx("div", { style: styles.header, children: _jsx("h2", { style: styles.title, children: "Book Appointment" }) }), _jsx("hr", {}), _jsxs("div", { style: styles.content, children: [state.loading && _jsx("div", { style: { marginBottom: 12 }, children: "Loading..." }), state.error && _jsx("div", { style: styles.errorMessage, children: state.error }), state.step === 0 && (_jsx(DoctorSelectModal, { onCancel: () => dispatch({ type: "SET_STEP", payload: 0 }), onContinue: handleDoctorSelect })), state.step === 1 && (_jsx(AppointmentDateTimeModal, { onlineFee: 500, offlineFee: 300, slots: state.slots, onCancel: goBack, onDateChange: handleDateChange, onContinue: handleDateTimeModalContinue })), state.step === 3 && (_jsx(PhoneVerificationStep, { state: state, dispatch: dispatch, onSendOtp: sendOtp, onVerifyOtp: verifyOtp, onBack: goBack, onContinue: goToNext })), state.step === 4 && (_jsx(PatientDetailsStep, { state: state, dispatch: dispatch, onBack: goBack, onSubmit: submitAppointment })), state.step === 5 && (_jsx(AppointmentConfirmationStep, { appointment: {
374
+ return (_jsx("div", { style: styles.container, children: _jsxs("div", { style: styles.card, children: [_jsx("div", { style: styles.header, children: _jsx("h2", { style: styles.title, children: "Book Appointment" }) }), _jsx("hr", {}), _jsxs("div", { style: styles.content, children: [state.loading && _jsx("div", { style: { marginBottom: 12 }, children: "Loading..." }), state.error && _jsx("div", { style: styles.errorMessage, children: state.error }), state.step === 0 && (_jsx(DoctorSelectModal, { addresses: state.addresses, addressDoctorsMap: state.addressDoctorsMap, selectedAddressId: state.selectedAddress, selectedDoctorId: state.selectedDoctor, onCancel: () => dispatch({ type: "SET_STEP", payload: 0 }), onContinue: handleDoctorSelect })), state.step === 1 && (_jsx(AppointmentDateTimeModal, { onlineFee: 500, offlineFee: 300, slots: state.slots, selectedDate: state.selectedDate, selectedSlot: state.selectedSlot, consultationMode: state.consultationMode, onCancel: goBack, onDateChange: handleDateChange, onContinue: handleDateTimeModalContinue })), state.step === 3 && (_jsx(PhoneVerificationStep, { state: state, dispatch: dispatch, onSendOtp: sendOtp, onVerifyOtp: verifyOtp, onBack: goBack, onContinue: goToNext })), state.step === 4 && (_jsx(PatientDetailsStep, { state: state, dispatch: dispatch, onBack: goBack, onSubmit: submitAppointment })), state.step === 5 && (_jsx(AppointmentConfirmationStep, { appointment: {
369
375
  patientName: state.patientName,
370
- visitationType: state.consultationMode === "ONLINE" ? "Online Consultation" : "In-Person Visit",
376
+ visitationType: state.consultationMode === "ONLINE"
377
+ ? "Online Consultation"
378
+ : "In-Person Visit",
371
379
  appointmentDate: formatDateToISO(state.selectedDate),
372
- fromTime: state.selectedSlot?.start ? new Date(state.selectedSlot.start).toTimeString().slice(0, 5) : "",
373
- toTime: state.selectedSlot?.end ? new Date(state.selectedSlot.end).toTimeString().slice(0, 5) : "",
374
- location: state.addresses.find(addr => addr.id === state.selectedAddress)?.label || "Clinic",
380
+ fromTime: state.selectedSlot?.start
381
+ ? new Date(state.selectedSlot.start)
382
+ .toTimeString()
383
+ .slice(0, 5)
384
+ : "",
385
+ toTime: state.selectedSlot?.end
386
+ ? new Date(state.selectedSlot.end).toTimeString().slice(0, 5)
387
+ : "",
388
+ location: state.addresses.find((addr) => addr.id === state.selectedAddress)?.label || "Clinic",
375
389
  mode: state.consultationMode,
376
- paymentMode: "Cash"
390
+ paymentMode: "Cash",
377
391
  }, patient: {
378
- patientName: state.patientName
392
+ patientName: state.patientName,
379
393
  }, onClose: resetForm })), _jsxs("div", { style: styles.branding, children: [_jsx("span", { style: styles.poweredBy, children: "Powered by" }), _jsx("a", { href: "https://medos.one", target: "_blank", rel: "noopener noreferrer", children: _jsx(MedosLogo, { style: { height: 50, width: "auto" } }) })] })] })] }) }));
380
394
  };
381
395
  const getStyles = (theme) => ({
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import { Doctor, AddressItem } from "../services/AppointmentService";
2
3
  interface AppointmentDetails {
3
4
  patientName?: string;
4
5
  visitationType?: string;
@@ -18,7 +19,10 @@ interface AppointmentConfirmationStepProps {
18
19
  lastName?: string;
19
20
  patientName?: string;
20
21
  };
22
+ selectedDoctor?: Doctor | null;
23
+ selectedAddress?: AddressItem | null;
21
24
  onClose: () => void;
25
+ onGoBackToSlots?: () => void;
22
26
  }
23
27
  declare const AppointmentConfirmationStep: React.FC<AppointmentConfirmationStepProps>;
24
28
  export default AppointmentConfirmationStep;
@@ -1,17 +1,15 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useTheme } from "../react/hooks/useTheme";
3
3
  import { SuccessIcon } from "./Icons/SuccessIcon";
4
- const AppointmentConfirmationStep = ({ appointment, patient, onClose, }) => {
4
+ import { CloseIcon } from "./Icons/CloseIcon";
5
+ import { formatDate, formatTime, calculateDuration } from "./utils";
6
+ const AppointmentConfirmationStep = ({ appointment, patient, selectedDoctor, selectedAddress, onClose, onGoBackToSlots, }) => {
5
7
  const theme = useTheme();
6
- const calculateDuration = () => {
8
+ const getDuration = () => {
7
9
  if (appointment.duration)
8
10
  return appointment.duration;
9
11
  if (appointment.fromTime && appointment.toTime) {
10
- const start = new Date(`2000-01-01T${appointment.fromTime}`);
11
- const end = new Date(`2000-01-01T${appointment.toTime}`);
12
- const diffMs = end.getTime() - start.getTime();
13
- const diffMinutes = Math.round(diffMs / (1000 * 60));
14
- return diffMinutes;
12
+ return calculateDuration(`2000-01-01T${appointment.fromTime}`, `2000-01-01T${appointment.toTime}`);
15
13
  }
16
14
  return 60;
17
15
  };
@@ -20,37 +18,14 @@ const AppointmentConfirmationStep = ({ appointment, patient, onClose, }) => {
20
18
  return appointment.patientName;
21
19
  if (patient.patientName)
22
20
  return patient.patientName;
23
- const parts = [patient.firstName, patient.middleName, patient.lastName].filter(Boolean);
21
+ const parts = [
22
+ patient.firstName,
23
+ patient.middleName,
24
+ patient.lastName,
25
+ ].filter(Boolean);
24
26
  return parts.join(" ") || "Patient";
25
27
  };
26
- const formatDate = (dateStr) => {
27
- try {
28
- const date = new Date(dateStr);
29
- return date.toLocaleDateString('en-US', {
30
- weekday: 'long',
31
- year: 'numeric',
32
- month: 'long',
33
- day: 'numeric'
34
- });
35
- }
36
- catch {
37
- return dateStr;
38
- }
39
- };
40
- const formatTime = (timeStr) => {
41
- try {
42
- const time = new Date(`2000-01-01T${timeStr}`);
43
- return time.toLocaleTimeString('en-US', {
44
- hour: 'numeric',
45
- minute: '2-digit',
46
- hour12: true
47
- });
48
- }
49
- catch {
50
- return timeStr;
51
- }
52
- };
53
- const duration = calculateDuration();
28
+ const duration = getDuration();
54
29
  const patientName = getPatientName();
55
30
  return (_jsxs("div", { style: {
56
31
  display: "flex",
@@ -58,15 +33,36 @@ const AppointmentConfirmationStep = ({ appointment, patient, onClose, }) => {
58
33
  padding: "0",
59
34
  fontFamily: theme.typography.fontFamily,
60
35
  background: theme.colors.background,
61
- minHeight: "500px"
62
- }, children: [_jsx("div", { style: {
36
+ minHeight: "500px",
37
+ position: "relative",
38
+ }, children: [_jsxs("div", { style: {
39
+ display: "flex",
40
+ justifyContent: "space-between",
41
+ alignItems: "center",
63
42
  padding: "20px 24px",
64
- fontSize: 24,
65
- fontWeight: "bold",
66
- color: theme.colors.primary,
67
43
  borderBottom: `2px solid ${theme.colors.border}`,
68
- background: theme.colors.surface
69
- }, children: "Appointment Confirmed" }), _jsxs("div", { style: {
44
+ background: theme.colors.surface,
45
+ }, children: [_jsx("h2", { style: {
46
+ fontSize: 24,
47
+ fontWeight: "bold",
48
+ color: theme.colors.text,
49
+ margin: 0,
50
+ }, children: "Appointment Confirmed" }), _jsx("button", { onClick: onGoBackToSlots || onClose, style: {
51
+ background: "none",
52
+ border: "none",
53
+ cursor: "pointer",
54
+ padding: "8px",
55
+ borderRadius: "6px",
56
+ display: "flex",
57
+ alignItems: "center",
58
+ justifyContent: "center",
59
+ transition: "background-color 0.2s ease",
60
+ backgroundColor: "transparent",
61
+ }, onMouseEnter: (e) => {
62
+ e.currentTarget.style.backgroundColor = theme.colors.border;
63
+ }, onMouseLeave: (e) => {
64
+ e.currentTarget.style.backgroundColor = "transparent";
65
+ }, title: "Close and select new slot", children: _jsx(CloseIcon, { size: 16, color: theme.colors.text }) })] }), _jsxs("div", { style: {
70
66
  flex: 1,
71
67
  display: "flex",
72
68
  flexDirection: "column",
@@ -76,35 +72,37 @@ const AppointmentConfirmationStep = ({ appointment, patient, onClose, }) => {
76
72
  border: `2px solid ${theme.colors.border}`,
77
73
  borderTop: "none",
78
74
  background: theme.colors.surface,
79
- textAlign: "center"
80
- }, children: [_jsx("h2", { style: {
75
+ textAlign: "center",
76
+ }, children: [_jsx("h3", { style: {
81
77
  fontSize: 20,
82
78
  fontWeight: "600",
83
79
  color: theme.colors.success,
84
- margin: "0 0 24px 0"
80
+ margin: "0 0 24px 0",
85
81
  }, children: "Appointment Confirmed" }), _jsx("div", { style: { marginBottom: 32 }, children: _jsx(SuccessIcon, { size: 64, checkColor: "white", shapeColor: theme.colors.success }) }), _jsxs("div", { style: {
86
82
  width: "100%",
87
83
  maxWidth: 500,
88
- marginBottom: 32
89
- }, children: [_jsx("h3", { style: {
84
+ marginBottom: 32,
85
+ }, children: [_jsx("h4", { style: {
90
86
  fontSize: 18,
91
87
  fontWeight: "600",
92
88
  color: theme.colors.success,
93
- marginBottom: 24
89
+ marginBottom: 24,
94
90
  }, children: "Appointment Details" }), _jsxs("div", { style: {
95
91
  display: "flex",
96
92
  flexDirection: "column",
97
93
  gap: 12,
98
94
  fontSize: 16,
99
95
  lineHeight: 1.6,
100
- color: theme.colors.text
101
- }, children: [_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Patient:" }), " ", patientName] }), appointment.visitationType && (_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Visitation Type:" }), " ", appointment.visitationType] })), appointment.appointmentDate && (_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Date:" }), " ", formatDate(appointment.appointmentDate)] })), appointment.fromTime && (_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Time:" }), " ", formatTime(appointment.fromTime)] })), _jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Duration:" }), " ~", duration, " minutes"] }), appointment.location && (_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Location:" }), " ", appointment.location] }))] })] }), _jsx("div", { style: {
96
+ color: theme.colors.text,
97
+ }, children: [_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Patient:" }), " ", patientName] }), selectedDoctor && (_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Doctor:" }), " ", selectedDoctor.name] })), appointment.visitationType && (_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Visitation Type:" }), " ", appointment.visitationType] })), appointment.appointmentDate && (_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Date:" }), " ", formatDate(appointment.appointmentDate)] })), appointment.fromTime && (_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Time:" }), " ", formatTime(appointment.fromTime)] })), _jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Duration:" }), " ", "~", duration, " minutes"] }), selectedAddress && (_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Location:" }), " ", selectedAddress.completeAddress ||
98
+ selectedAddress.address ||
99
+ "Address not available"] })), appointment.location && !selectedAddress && (_jsxs("div", { children: [_jsx("strong", { style: { color: theme.colors.success }, children: "Location:" }), " ", appointment.location] }))] })] }), _jsx("div", { style: {
102
100
  fontSize: 16,
103
101
  fontStyle: "italic",
104
102
  color: theme.colors.textSecondary,
105
103
  textAlign: "center",
106
104
  maxWidth: 600,
107
- lineHeight: 1.5
105
+ lineHeight: 1.5,
108
106
  }, children: "A confirmation email has been sent to the Patient's Email address." })] })] }));
109
107
  };
110
108
  export default AppointmentConfirmationStep;
@@ -6,9 +6,13 @@ type AppointmentModalProps = {
6
6
  onlineFee?: number | null;
7
7
  offlineFee?: number | null;
8
8
  slots: Slot[];
9
+ selectedDate?: Date;
10
+ selectedSlot?: Slot | null;
11
+ consultationMode?: AppointmentMode;
9
12
  onCancel: () => void;
10
13
  onContinue: (mode: AppointmentMode, date: Date, slot: Slot, charge: string, paymentMode: PaymentMode) => void;
11
14
  onDateChange?: (date: Date) => void;
15
+ initialStep?: "consultation" | "datetime";
12
16
  };
13
17
  export declare const AppointmentDateTimeModal: React.FC<AppointmentModalProps>;
14
18
  export {};