medos-sdk 1.1.10 → 1.1.12

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 (265) hide show
  1. package/dist/client/MedosClient.d.ts +1 -0
  2. package/dist/client/MedosClient.js +8 -1
  3. package/dist/components/AppointmentCalender.js +19 -22
  4. package/dist/components/AppointmentConfirmationStep.d.ts +1 -0
  5. package/dist/components/AppointmentConfirmationStep.js +34 -42
  6. package/dist/components/AppointmentDateTimeModal.d.ts +1 -0
  7. package/dist/components/AppointmentDateTimeModal.js +201 -168
  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 +10 -4
  13. package/dist/components/ContactPreferenceStep.js +10 -1
  14. package/dist/components/DoctorSelectModal.js +105 -59
  15. package/dist/components/EnquiryForm.js +81 -69
  16. package/dist/components/Icons/CloseIcon.d.ts +9 -0
  17. package/dist/components/Icons/CloseIcon.js +5 -0
  18. package/dist/components/InquiryDetailsStep.js +5 -1
  19. package/dist/components/PatientDetailsStep.js +17 -12
  20. package/dist/components/PatientSelectionStep.d.ts +12 -0
  21. package/dist/components/PatientSelectionStep.js +254 -0
  22. package/dist/components/PhoneVerificationStep.js +1 -1
  23. package/dist/components/SuccessStep.js +1 -1
  24. package/dist/components/appointment-booking/AppointmentCalender.js +145 -67
  25. package/dist/components/appointment-booking/appointment-modal-styles.d.ts +272 -0
  26. package/dist/components/appointment-booking/appointment-modal-styles.js +419 -0
  27. package/dist/components/appointment-booking/components/AppointmentConfirmationStep.d.ts +28 -0
  28. package/dist/components/appointment-booking/components/AppointmentConfirmationStep.js +107 -0
  29. package/dist/components/appointment-booking/components/AppointmentDateTimeModal.d.ts +18 -0
  30. package/dist/components/appointment-booking/components/AppointmentDateTimeModal.js +306 -0
  31. package/dist/components/appointment-booking/components/AppointmentSummaryStep.d.ts +12 -0
  32. package/dist/components/appointment-booking/components/AppointmentSummaryStep.js +194 -0
  33. package/dist/components/appointment-booking/components/BookingOptionStep.d.ts +14 -0
  34. package/dist/components/appointment-booking/components/BookingOptionStep.js +350 -0
  35. package/dist/components/appointment-booking/components/DoctorSelectModal.d.ts +14 -0
  36. package/dist/components/appointment-booking/components/DoctorSelectModal.js +213 -0
  37. package/dist/components/appointment-booking/components/PatientDetailsStep.d.ts +3 -0
  38. package/dist/components/appointment-booking/components/PatientDetailsStep.js +96 -0
  39. package/dist/components/appointment-booking/components/PatientSelectionStep.d.ts +12 -0
  40. package/dist/components/appointment-booking/components/PatientSelectionStep.js +254 -0
  41. package/dist/components/appointment-booking/components/PhoneVerificationStep.d.ts +3 -0
  42. package/dist/components/appointment-booking/components/PhoneVerificationStep.js +49 -0
  43. package/dist/components/appointment-booking/components/SuccessStep.d.ts +5 -0
  44. package/dist/components/appointment-booking/components/SuccessStep.js +9 -0
  45. package/dist/components/appointment-booking/components/index.d.ts +9 -0
  46. package/dist/components/appointment-booking/components/index.js +9 -0
  47. package/dist/components/appointment-booking/hooks/useAppointmentFlow.d.ts +0 -1
  48. package/dist/components/appointment-booking/hooks/useAppointmentFlow.js +111 -25
  49. package/dist/components/appointment-booking/hooks/useAppointmentState.js +32 -0
  50. package/dist/components/appointment-booking/hooks/useInitializeAddresses.js +0 -1
  51. package/dist/components/appointment-booking/index.d.ts +2 -4
  52. package/dist/components/appointment-booking/index.js +2 -2
  53. package/dist/components/appointment-booking/types.d.ts +167 -0
  54. package/dist/components/appointment-booking/types.js +16 -0
  55. package/dist/components/appointment-modal-styles.d.ts +259 -0
  56. package/dist/components/appointment-modal-styles.js +395 -0
  57. package/dist/components/constant.d.ts +2 -0
  58. package/dist/components/constant.js +15 -0
  59. package/dist/components/constants/constant.d.ts +2 -0
  60. package/dist/components/constants/constant.js +15 -0
  61. package/dist/components/constants/index.d.ts +3 -0
  62. package/dist/components/constants/index.js +24 -0
  63. package/dist/components/constants/options.d.ts +13 -0
  64. package/dist/components/constants/options.js +35 -0
  65. package/dist/components/constants/validation.d.ts +6 -0
  66. package/dist/components/constants/validation.js +16 -0
  67. package/dist/components/custom-calendar.js +20 -11
  68. package/dist/components/enquiry-form/EnquiryForm.d.ts +7 -0
  69. package/dist/components/enquiry-form/EnquiryForm.js +238 -0
  70. package/dist/components/enquiry-form/components/ContactInformationStep.d.ts +13 -0
  71. package/dist/components/enquiry-form/components/ContactInformationStep.js +21 -0
  72. package/dist/components/enquiry-form/components/ContactPreferenceStep.d.ts +9 -0
  73. package/dist/components/enquiry-form/components/ContactPreferenceStep.js +20 -0
  74. package/dist/components/enquiry-form/components/InquiryDetailsStep.d.ts +10 -0
  75. package/dist/components/enquiry-form/components/InquiryDetailsStep.js +20 -0
  76. package/dist/components/enquiry-form/components/index.d.ts +3 -0
  77. package/dist/components/enquiry-form/components/index.js +3 -0
  78. package/dist/components/enquiry-form/index.d.ts +2 -0
  79. package/dist/components/enquiry-form/index.js +2 -0
  80. package/dist/components/index.d.ts +7 -0
  81. package/dist/components/index.js +7 -0
  82. package/dist/components/shared/icons/Check.d.ts +6 -0
  83. package/dist/components/shared/icons/Check.js +2 -0
  84. package/dist/components/shared/icons/ChevronDownIcon.d.ts +4 -0
  85. package/dist/components/shared/icons/ChevronDownIcon.js +2 -0
  86. package/dist/components/shared/icons/ChevronLeft.d.ts +3 -0
  87. package/dist/components/shared/icons/ChevronLeft.js +3 -0
  88. package/dist/components/shared/icons/ChevronRight.d.ts +3 -0
  89. package/dist/components/shared/icons/ChevronRight.js +3 -0
  90. package/dist/components/shared/icons/CloseIcon.d.ts +9 -0
  91. package/dist/components/shared/icons/CloseIcon.js +5 -0
  92. package/dist/components/shared/icons/ConfirmationCheck.d.ts +1 -0
  93. package/dist/components/shared/icons/ConfirmationCheck.js +9 -0
  94. package/dist/components/shared/icons/ConsultationType.d.ts +1 -0
  95. package/dist/components/shared/icons/ConsultationType.js +2 -0
  96. package/dist/components/shared/icons/Date&TimeIcon.d.ts +1 -0
  97. package/dist/components/shared/icons/Date&TimeIcon.js +2 -0
  98. package/dist/components/shared/icons/MapIcon.d.ts +1 -0
  99. package/dist/components/shared/icons/MapIcon.js +2 -0
  100. package/dist/components/shared/icons/MedosLogo.d.ts +3 -0
  101. package/dist/components/shared/icons/MedosLogo.js +3 -0
  102. package/dist/components/shared/icons/PaymentMethodIcon.d.ts +1 -0
  103. package/dist/components/shared/icons/PaymentMethodIcon.js +2 -0
  104. package/dist/components/shared/icons/SuccessIcon.d.ts +8 -0
  105. package/dist/components/shared/icons/SuccessIcon.js +14 -0
  106. package/dist/components/shared/icons/UserIcon.d.ts +1 -0
  107. package/dist/components/shared/icons/UserIcon.js +2 -0
  108. package/dist/components/shared/icons/index.d.ts +13 -0
  109. package/dist/components/shared/icons/index.js +13 -0
  110. package/dist/components/shared/index.d.ts +2 -0
  111. package/dist/components/shared/index.js +2 -0
  112. package/dist/components/shared/ui/Calendar.d.ts +5 -0
  113. package/dist/components/shared/ui/Calendar.js +167 -0
  114. package/dist/components/shared/ui/SelectDropdown.d.ts +41 -0
  115. package/dist/components/shared/ui/SelectDropdown.js +301 -0
  116. package/dist/components/shared/ui/index.d.ts +2 -0
  117. package/dist/components/shared/ui/index.js +2 -0
  118. package/dist/components/styles/appointment.d.ts +4 -0
  119. package/dist/components/styles/appointment.js +220 -0
  120. package/dist/components/styles/enquiry.d.ts +2 -0
  121. package/dist/components/styles/enquiry.js +3 -0
  122. package/dist/components/styles/index.d.ts +2 -0
  123. package/dist/components/styles/index.js +2 -0
  124. package/dist/components/styles/shared.d.ts +3 -0
  125. package/dist/components/styles/shared.js +78 -0
  126. package/dist/components/styles.d.ts +1 -6
  127. package/dist/components/styles.js +1 -257
  128. package/dist/components/theme-styles.d.ts +5 -4
  129. package/dist/components/theme-styles.js +239 -125
  130. package/dist/components/types/appointment.d.ts +42 -0
  131. package/dist/components/types/appointment.js +1 -0
  132. package/dist/components/types/common.d.ts +24 -0
  133. package/dist/components/types/common.js +1 -0
  134. package/dist/components/types/enquiry.d.ts +59 -0
  135. package/dist/components/types/enquiry.js +1 -0
  136. package/dist/components/types/index.d.ts +4 -0
  137. package/dist/components/types/index.js +4 -0
  138. package/dist/components/types.d.ts +1 -52
  139. package/dist/components/types.js +1 -23
  140. package/dist/components/utils/date.d.ts +4 -0
  141. package/dist/components/utils/date.js +65 -0
  142. package/dist/components/utils/formatting.d.ts +4 -0
  143. package/dist/components/utils/formatting.js +9 -0
  144. package/dist/components/utils/index.d.ts +3 -0
  145. package/dist/components/utils/index.js +3 -0
  146. package/dist/components/utils/validation.d.ts +4 -0
  147. package/dist/components/utils/validation.js +37 -0
  148. package/dist/components/utils.d.ts +1 -5
  149. package/dist/components/utils.js +1 -15
  150. package/dist/components/validation.d.ts +1 -2
  151. package/dist/components/validation.js +1 -7
  152. package/dist/constants/index.d.ts +1 -1
  153. package/dist/constants/index.js +1 -1
  154. package/dist/core/theme/index.d.ts +1 -0
  155. package/dist/core/theme/index.js +1 -0
  156. package/dist/core/theme/responsive.d.ts +15 -0
  157. package/dist/core/theme/responsive.js +113 -0
  158. package/dist/core/theme/themes.js +16 -4
  159. package/dist/core/theme/types.d.ts +8 -0
  160. package/dist/index.d.ts +4 -2
  161. package/dist/index.js +2 -1
  162. package/dist/react/ThemeProvider.d.ts +2 -1
  163. package/dist/react/ThemeProvider.js +49 -10
  164. package/dist/react/index.d.ts +3 -3
  165. package/dist/react/index.js +1 -1
  166. package/dist/services/AppointmentService.d.ts +80 -2
  167. package/dist/services/AppointmentService.js +131 -5
  168. package/dist/services/AuthService.js +1 -1
  169. package/dist/services/WorkspaceService.d.ts +58 -3
  170. package/dist/services/WorkspaceService.js +10 -1
  171. package/dist/vanilla/AppointmentCalendarWidget.d.ts +17 -7
  172. package/dist/vanilla/AppointmentCalendarWidget.js +1401 -380
  173. package/dist/vanilla/EnquiryFormWidget.d.ts +1 -0
  174. package/dist/vanilla/EnquiryFormWidget.js +25 -43
  175. package/dist/vanilla/client/MedosClient.d.ts +1 -0
  176. package/dist/vanilla/components/AppointmentConfirmationStep.d.ts +1 -0
  177. package/dist/vanilla/components/AppointmentDateTimeModal.d.ts +1 -0
  178. package/dist/vanilla/components/AppointmentSummaryStep.d.ts +12 -0
  179. package/dist/vanilla/components/BookingOptionStep.d.ts +14 -0
  180. package/dist/vanilla/components/Icons/CloseIcon.d.ts +9 -0
  181. package/dist/vanilla/components/PatientSelectionStep.d.ts +12 -0
  182. package/dist/vanilla/components/VanillaCalendar.js +33 -18
  183. package/dist/vanilla/components/VanillaIcons.d.ts +5 -0
  184. package/dist/vanilla/components/VanillaIcons.js +92 -0
  185. package/dist/vanilla/components/VanillaSelect.d.ts +3 -0
  186. package/dist/vanilla/components/VanillaSelect.js +93 -5
  187. package/dist/vanilla/components/appointment-booking/appointment-modal-styles.d.ts +272 -0
  188. package/dist/vanilla/components/appointment-booking/components/AppointmentConfirmationStep.d.ts +28 -0
  189. package/dist/vanilla/components/appointment-booking/components/AppointmentDateTimeModal.d.ts +18 -0
  190. package/dist/vanilla/components/appointment-booking/components/AppointmentSummaryStep.d.ts +12 -0
  191. package/dist/vanilla/components/appointment-booking/components/BookingOptionStep.d.ts +14 -0
  192. package/dist/vanilla/components/appointment-booking/components/DoctorSelectModal.d.ts +14 -0
  193. package/dist/vanilla/components/appointment-booking/components/PatientDetailsStep.d.ts +3 -0
  194. package/dist/vanilla/components/appointment-booking/components/PatientSelectionStep.d.ts +12 -0
  195. package/dist/vanilla/components/appointment-booking/components/PhoneVerificationStep.d.ts +3 -0
  196. package/dist/vanilla/components/appointment-booking/components/SuccessStep.d.ts +5 -0
  197. package/dist/vanilla/components/appointment-booking/components/index.d.ts +9 -0
  198. package/dist/vanilla/components/appointment-booking/hooks/useAppointmentFlow.d.ts +0 -1
  199. package/dist/vanilla/components/appointment-booking/index.d.ts +2 -4
  200. package/dist/vanilla/components/appointment-booking/types.d.ts +167 -0
  201. package/dist/vanilla/components/appointment-modal-styles.d.ts +259 -0
  202. package/dist/vanilla/components/constant.d.ts +2 -0
  203. package/dist/vanilla/components/constants/constant.d.ts +2 -0
  204. package/dist/vanilla/components/constants/index.d.ts +3 -0
  205. package/dist/vanilla/components/constants/options.d.ts +13 -0
  206. package/dist/vanilla/components/constants/validation.d.ts +6 -0
  207. package/dist/vanilla/components/enquiry-form/EnquiryForm.d.ts +7 -0
  208. package/dist/vanilla/components/enquiry-form/components/ContactInformationStep.d.ts +13 -0
  209. package/dist/vanilla/components/enquiry-form/components/ContactPreferenceStep.d.ts +9 -0
  210. package/dist/vanilla/components/enquiry-form/components/InquiryDetailsStep.d.ts +10 -0
  211. package/dist/vanilla/components/enquiry-form/components/index.d.ts +3 -0
  212. package/dist/vanilla/components/enquiry-form/index.d.ts +2 -0
  213. package/dist/vanilla/components/index.d.ts +7 -3
  214. package/dist/vanilla/components/shared/icons/Check.d.ts +6 -0
  215. package/dist/vanilla/components/shared/icons/ChevronDownIcon.d.ts +4 -0
  216. package/dist/vanilla/components/shared/icons/ChevronLeft.d.ts +3 -0
  217. package/dist/vanilla/components/shared/icons/ChevronRight.d.ts +3 -0
  218. package/dist/vanilla/components/shared/icons/CloseIcon.d.ts +9 -0
  219. package/dist/vanilla/components/shared/icons/ConfirmationCheck.d.ts +1 -0
  220. package/dist/vanilla/components/shared/icons/ConsultationType.d.ts +1 -0
  221. package/dist/vanilla/components/shared/icons/Date&TimeIcon.d.ts +1 -0
  222. package/dist/vanilla/components/shared/icons/MapIcon.d.ts +1 -0
  223. package/dist/vanilla/components/shared/icons/MedosLogo.d.ts +3 -0
  224. package/dist/vanilla/components/shared/icons/PaymentMethodIcon.d.ts +1 -0
  225. package/dist/vanilla/components/shared/icons/SuccessIcon.d.ts +8 -0
  226. package/dist/vanilla/components/shared/icons/UserIcon.d.ts +1 -0
  227. package/dist/vanilla/components/shared/icons/index.d.ts +13 -0
  228. package/dist/vanilla/components/shared/index.d.ts +2 -0
  229. package/dist/vanilla/components/shared/ui/Calendar.d.ts +5 -0
  230. package/dist/vanilla/components/shared/ui/SelectDropdown.d.ts +41 -0
  231. package/dist/vanilla/components/shared/ui/index.d.ts +2 -0
  232. package/dist/vanilla/components/styles/appointment.d.ts +4 -0
  233. package/dist/vanilla/components/styles/enquiry.d.ts +2 -0
  234. package/dist/vanilla/components/styles/index.d.ts +2 -0
  235. package/dist/vanilla/components/styles/shared.d.ts +3 -0
  236. package/dist/vanilla/components/styles.d.ts +1 -6
  237. package/dist/vanilla/components/theme-styles.d.ts +5 -4
  238. package/dist/vanilla/components/types/appointment.d.ts +42 -0
  239. package/dist/vanilla/components/types/common.d.ts +24 -0
  240. package/dist/vanilla/components/types/enquiry.d.ts +59 -0
  241. package/dist/vanilla/components/types/index.d.ts +4 -0
  242. package/dist/vanilla/components/types.d.ts +1 -52
  243. package/dist/vanilla/components/utils/date.d.ts +4 -0
  244. package/dist/vanilla/components/utils/formatting.d.ts +4 -0
  245. package/dist/vanilla/components/utils/index.d.ts +3 -0
  246. package/dist/vanilla/components/utils/validation.d.ts +4 -0
  247. package/dist/vanilla/components/utils.d.ts +1 -5
  248. package/dist/vanilla/components/validation.d.ts +1 -2
  249. package/dist/vanilla/constants/index.d.ts +1 -1
  250. package/dist/vanilla/core/theme/index.d.ts +1 -0
  251. package/dist/vanilla/core/theme/responsive.d.ts +15 -0
  252. package/dist/vanilla/core/theme/types.d.ts +8 -0
  253. package/dist/vanilla/enquiry-widget.js +3632 -90
  254. package/dist/vanilla/index.d.ts +4 -2
  255. package/dist/vanilla/react/ThemeProvider.d.ts +2 -1
  256. package/dist/vanilla/react/index.d.ts +3 -3
  257. package/dist/vanilla/services/AppointmentService.d.ts +80 -2
  258. package/dist/vanilla/services/WorkspaceService.d.ts +58 -3
  259. package/dist/vanilla/vanilla/AppointmentCalendarWidget.d.ts +17 -7
  260. package/dist/vanilla/vanilla/EnquiryFormWidget.d.ts +1 -0
  261. package/dist/vanilla/vanilla/components/VanillaIcons.d.ts +5 -0
  262. package/dist/vanilla/vanilla/components/VanillaSelect.d.ts +3 -0
  263. package/dist/vanilla/widget.css +1045 -205
  264. package/dist/vanilla/widget.js +10365 -5737
  265. package/package.json +2 -2
@@ -0,0 +1,346 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import React from "react";
3
+ import { useTheme } from "../react/hooks/useTheme";
4
+ import { useBreakpoint } from "../core/theme/responsive";
5
+ export const BookingOptionStep = ({ userSessionPacks, availablePackages, showPackageExplorer, selectedNewPackage, onSelectOption, onSelectPackage, onBack, }) => {
6
+ const theme = useTheme();
7
+ const breakpoint = useBreakpoint(theme);
8
+ const styles = getStyles(theme, breakpoint);
9
+ const [tempSelectedOption, setTempSelectedOption] = React.useState(null);
10
+ const [tempSelectedPackage, setTempSelectedPackage] = React.useState(null);
11
+ const activePack = userSessionPacks.find((pack) => pack.remainingSessions > 0);
12
+ const hasAvailablePackages = availablePackages.length > 0;
13
+ const handleOptionClick = (optionType, sessionPack) => {
14
+ setTempSelectedOption({ type: optionType, sessionPack });
15
+ };
16
+ const handlePackageSelect = (pkg) => {
17
+ setTempSelectedPackage(pkg);
18
+ };
19
+ const handlePackageNext = () => {
20
+ if (tempSelectedPackage) {
21
+ onSelectPackage(tempSelectedPackage);
22
+ }
23
+ };
24
+ const handleNext = () => {
25
+ if (tempSelectedOption) {
26
+ onSelectOption(tempSelectedOption.type, tempSelectedOption.sessionPack, undefined);
27
+ }
28
+ };
29
+ if (showPackageExplorer) {
30
+ return (_jsxs("div", { style: styles.container, children: [_jsx("div", { style: styles.header, children: _jsx("h3", { style: styles.title, children: "Explore Packages" }) }), _jsx("p", { style: styles.subtitle, children: "Choose a package that suits your needs" }), hasAvailablePackages ? (_jsx("div", { style: styles.packagesGrid, children: availablePackages.map((pkg) => (_jsxs("div", { style: {
31
+ ...styles.packageCard,
32
+ ...(tempSelectedPackage?.id === pkg.id
33
+ ? styles.packageCardSelected
34
+ : {}),
35
+ }, onClick: () => handlePackageSelect(pkg), children: [_jsx("h4", { style: styles.packageName, children: pkg.name }), _jsx("p", { style: styles.packageDescription, children: pkg.description }), pkg.allowedDoctors && pkg.allowedDoctors.length > 0 && (_jsx("div", { style: styles.packageDoctors, children: pkg.allowedDoctors.map((doc) => (_jsx("span", { style: styles.doctorBadge, children: doc.fullName }, doc.id))) })), pkg.allowedConsultationModes &&
36
+ pkg.allowedConsultationModes.length > 0 && (_jsx("div", { style: styles.consultationModes, children: pkg.allowedConsultationModes.map((mode) => (_jsx("span", { style: styles.modeBadge, children: mode === "ONLINE" ? "🌐 Online" : "🏥 In-Person" }, mode))) })), _jsxs("div", { style: styles.packageDetails, children: [_jsxs("span", { style: styles.packageSessions, children: [pkg.totalSessions || pkg.sessions, " session", (pkg.totalSessions || pkg.sessions || 1) > 1 ? "s" : ""] }), _jsx("div", { style: styles.priceContainer, children: pkg.discountedPrice && pkg.discountedPrice < pkg.price ? (_jsxs(_Fragment, { children: [_jsxs("span", { style: styles.originalPrice, children: ["\u20B9", pkg.price.toLocaleString()] }), _jsxs("span", { style: styles.packagePrice, children: ["\u20B9", pkg.discountedPrice.toLocaleString()] }), pkg.discount && (_jsx("span", { style: styles.discountBadge, children: pkg.discountType === "PERCENTAGE"
37
+ ? `${pkg.discount}% OFF`
38
+ : `₹${pkg.discount} OFF` }))] })) : (_jsxs("span", { style: styles.packagePrice, children: ["\u20B9", pkg.price.toLocaleString()] })) })] }), _jsxs("div", { style: styles.packageValidity, children: ["Valid for ", pkg.validityDays, " days"] })] }, pkg.id))) })) : (_jsx("div", { style: styles.emptyState, children: _jsx("p", { children: "No packages available at the moment." }) })), _jsxs("div", { style: styles.actions, children: [_jsx("button", { style: styles.backBtn, onClick: onBack, children: "Back" }), _jsx("button", { style: {
39
+ ...styles.nextBtn,
40
+ ...(tempSelectedPackage ? {} : styles.nextBtnDisabled),
41
+ }, onClick: handlePackageNext, disabled: !tempSelectedPackage, children: "Next" })] })] }));
42
+ }
43
+ return (_jsxs("div", { style: styles.container, children: [_jsx("h3", { style: styles.title, children: "Choose Booking Option" }), _jsx("p", { style: styles.subtitle, children: "How would you like to book your appointment?" }), userSessionPacks.filter((p) => p.remainingSessions > 0).length > 1 && (_jsxs("div", { style: styles.sessionPacksSection, children: [_jsx("h4", { style: styles.sectionTitle, children: "Your Active Session Packs" }), _jsx("div", { style: styles.sessionPacksList, children: userSessionPacks
44
+ .filter((pack) => pack.remainingSessions > 0)
45
+ .map((pack) => (_jsxs("div", { style: {
46
+ ...styles.sessionPackCard,
47
+ ...(tempSelectedOption?.type === "session-pack" &&
48
+ tempSelectedOption?.sessionPack?.id === pack.id
49
+ ? styles.sessionPackCardSelected
50
+ : {}),
51
+ }, onClick: () => handleOptionClick("session-pack", pack), children: [_jsxs("div", { style: styles.sessionPackInfo, children: [_jsx("span", { style: styles.sessionPackName, children: pack.name }), _jsxs("span", { style: styles.sessionPackRemaining, children: [pack.remainingSessions, "/", pack.totalSessions, " sessions"] }), pack.doctorName && (_jsx("span", { style: styles.sessionPackDoctor, children: pack.doctorName }))] }), _jsxs("div", { style: styles.sessionPackExpiry, children: ["Expires: ", new Date(pack.expiryDate).toLocaleDateString()] })] }, pack.id))) })] })), userSessionPacks.length > 0 && _jsx("hr", { style: { margin: "6px 0 6px 0" } }), _jsxs("div", { style: styles.optionsGrid, children: [activePack && (_jsxs("div", { style: {
52
+ ...styles.optionCard,
53
+ ...(tempSelectedOption?.type === "session-pack" &&
54
+ tempSelectedOption?.sessionPack?.id === activePack.id
55
+ ? styles.optionCardSelected
56
+ : {}),
57
+ }, onClick: () => handleOptionClick("session-pack", activePack), children: [_jsx("div", { style: styles.optionIcon, children: "\uD83D\uDCCB" }), _jsx("h4", { style: styles.optionTitle, children: "Use Session Pack" }), _jsxs("p", { style: styles.optionDescription, children: ["You have ", activePack.remainingSessions, " session", activePack.remainingSessions > 1 ? "s" : "", " remaining"] }), _jsx("div", { style: styles.sessionPackBadge, children: activePack.name })] })), _jsxs("div", { style: {
58
+ ...styles.optionCard,
59
+ ...(tempSelectedOption?.type === "new-appointment"
60
+ ? styles.optionCardSelected
61
+ : {}),
62
+ }, onClick: () => handleOptionClick("new-appointment"), children: [_jsx("div", { style: styles.optionIcon, children: "\uD83D\uDCC5" }), _jsx("h4", { style: styles.optionTitle, children: "Book New Appointment" }), _jsx("p", { style: styles.optionDescription, children: "Schedule a single consultation visit" })] }), hasAvailablePackages && (_jsxs("div", { style: {
63
+ ...styles.optionCard,
64
+ ...(tempSelectedOption?.type === "explore-packages"
65
+ ? styles.optionCardSelected
66
+ : {}),
67
+ }, onClick: () => handleOptionClick("explore-packages"), children: [_jsx("div", { style: styles.optionIcon, children: "\uD83C\uDF81" }), _jsx("h4", { style: styles.optionTitle, children: "Explore Packages" }), _jsx("p", { style: styles.optionDescription, children: "View and purchase consultation packages" })] }))] }), _jsxs("div", { style: styles.actions, children: [_jsx("button", { style: styles.backBtn, onClick: onBack, children: "Back" }), _jsx("button", { style: {
68
+ ...styles.nextBtn,
69
+ ...(tempSelectedOption ? {} : styles.nextBtnDisabled),
70
+ }, onClick: handleNext, disabled: !tempSelectedOption, children: "Next" })] })] }));
71
+ };
72
+ const getStyles = (theme, breakpoint) => {
73
+ const isMobile = breakpoint === "mobile";
74
+ const borderRadius = "12px";
75
+ const buttonRadius = "8px";
76
+ const cardBorder = `1px solid ${theme.colors.border}`;
77
+ return {
78
+ container: {
79
+ display: "flex",
80
+ flexDirection: "column",
81
+ gap: 20,
82
+ },
83
+ header: {
84
+ marginBottom: 4,
85
+ },
86
+ title: {
87
+ margin: 0,
88
+ fontSize: isMobile ? 18 : 20,
89
+ fontWeight: 600,
90
+ color: theme.colors.text,
91
+ },
92
+ subtitle: {
93
+ margin: 0,
94
+ fontSize: 14,
95
+ color: theme.colors.textSecondary,
96
+ lineHeight: 1.5,
97
+ },
98
+ optionsGrid: {
99
+ display: "grid",
100
+ gridTemplateColumns: isMobile
101
+ ? "1fr"
102
+ : "repeat(auto-fit, minmax(200px, 1fr))",
103
+ gap: 16,
104
+ },
105
+ optionCard: {
106
+ display: "flex",
107
+ flexDirection: "column",
108
+ alignItems: "center",
109
+ padding: 24,
110
+ border: cardBorder,
111
+ borderRadius,
112
+ cursor: "pointer",
113
+ transition: "all 0.2s ease",
114
+ textAlign: "center",
115
+ backgroundColor: theme.colors.surface,
116
+ boxShadow: "0 1px 3px rgba(0, 0, 0, 0.04)",
117
+ },
118
+ optionCardSelected: {
119
+ borderColor: theme.colors.primary,
120
+ backgroundColor: `${theme.colors.primary}08`,
121
+ boxShadow: `0 0 0 1px ${theme.colors.primary}`,
122
+ },
123
+ optionIcon: {
124
+ fontSize: 32,
125
+ marginBottom: 12,
126
+ },
127
+ optionTitle: {
128
+ margin: "0 0 8px 0",
129
+ fontSize: 16,
130
+ fontWeight: 600,
131
+ color: theme.colors.text,
132
+ },
133
+ optionDescription: {
134
+ margin: 0,
135
+ fontSize: 14,
136
+ color: theme.colors.textSecondary,
137
+ lineHeight: 1.5,
138
+ },
139
+ sessionPackBadge: {
140
+ marginTop: 12,
141
+ padding: "6px 14px",
142
+ backgroundColor: theme.colors.successBackground || "#dcfce7",
143
+ color: theme.colors.success || "#166534",
144
+ borderRadius: 999,
145
+ fontSize: 12,
146
+ fontWeight: 500,
147
+ },
148
+ sessionPacksSection: {
149
+ marginBottom: 8,
150
+ },
151
+ sectionTitle: {
152
+ margin: "0 0 16px 0",
153
+ fontSize: 15,
154
+ fontWeight: 600,
155
+ color: theme.colors.text,
156
+ },
157
+ sessionPacksList: {
158
+ display: "flex",
159
+ flexDirection: "column",
160
+ gap: 12,
161
+ },
162
+ sessionPackCard: {
163
+ display: "flex",
164
+ justifyContent: "space-between",
165
+ alignItems: "center",
166
+ padding: 16,
167
+ border: cardBorder,
168
+ borderRadius,
169
+ cursor: "pointer",
170
+ transition: "all 0.2s ease",
171
+ backgroundColor: theme.colors.surface,
172
+ },
173
+ sessionPackCardSelected: {
174
+ borderColor: theme.colors.primary,
175
+ backgroundColor: `${theme.colors.primary}08`,
176
+ },
177
+ sessionPackInfo: {
178
+ display: "flex",
179
+ flexDirection: "column",
180
+ gap: 4,
181
+ },
182
+ sessionPackName: {
183
+ fontSize: 14,
184
+ fontWeight: 600,
185
+ color: theme.colors.text,
186
+ },
187
+ sessionPackRemaining: {
188
+ fontSize: 13,
189
+ color: theme.colors.textSecondary,
190
+ },
191
+ sessionPackDoctor: {
192
+ fontSize: 13,
193
+ color: theme.colors.textSecondary,
194
+ },
195
+ sessionPackExpiry: {
196
+ fontSize: 12,
197
+ color: theme.colors.error || "#dc2626",
198
+ fontWeight: 500,
199
+ },
200
+ packagesGrid: {
201
+ display: "grid",
202
+ gridTemplateColumns: isMobile
203
+ ? "1fr"
204
+ : "repeat(auto-fit, minmax(250px, 1fr))",
205
+ gap: 16,
206
+ },
207
+ packageCard: {
208
+ display: "flex",
209
+ flexDirection: "column",
210
+ padding: 20,
211
+ border: cardBorder,
212
+ borderRadius,
213
+ cursor: "pointer",
214
+ transition: "all 0.2s ease",
215
+ backgroundColor: theme.colors.surface,
216
+ boxShadow: "0 1px 3px rgba(0, 0, 0, 0.04)",
217
+ },
218
+ packageCardSelected: {
219
+ borderColor: theme.colors.primary,
220
+ backgroundColor: `${theme.colors.primary}08`,
221
+ boxShadow: `0 0 0 1px ${theme.colors.primary}`,
222
+ },
223
+ packageName: {
224
+ margin: "0 0 8px 0",
225
+ fontSize: 16,
226
+ fontWeight: 600,
227
+ color: theme.colors.text,
228
+ },
229
+ packageDescription: {
230
+ margin: "0 0 16px 0",
231
+ fontSize: 14,
232
+ color: theme.colors.textSecondary,
233
+ lineHeight: 1.5,
234
+ flex: 1,
235
+ },
236
+ packageDetails: {
237
+ display: "flex",
238
+ justifyContent: "space-between",
239
+ alignItems: "center",
240
+ paddingTop: 16,
241
+ borderTop: cardBorder,
242
+ },
243
+ packageSessions: {
244
+ fontSize: 13,
245
+ color: theme.colors.textSecondary,
246
+ },
247
+ priceContainer: {
248
+ display: "flex",
249
+ flexDirection: "column",
250
+ alignItems: "flex-end",
251
+ gap: 4,
252
+ },
253
+ originalPrice: {
254
+ fontSize: 14,
255
+ color: theme.colors.textSecondary,
256
+ textDecoration: "line-through",
257
+ },
258
+ packagePrice: {
259
+ fontSize: 18,
260
+ fontWeight: 600,
261
+ color: theme.colors.primary,
262
+ },
263
+ discountBadge: {
264
+ fontSize: 11,
265
+ fontWeight: 600,
266
+ color: "#fff",
267
+ backgroundColor: theme.colors.success || "#16a34a",
268
+ padding: "2px 8px",
269
+ borderRadius: 999,
270
+ },
271
+ packageValidity: {
272
+ marginTop: 8,
273
+ fontSize: 12,
274
+ color: theme.colors.textSecondary,
275
+ },
276
+ packageDoctors: {
277
+ display: "flex",
278
+ flexWrap: "wrap",
279
+ gap: 6,
280
+ marginBottom: 12,
281
+ },
282
+ doctorBadge: {
283
+ fontSize: 12,
284
+ color: theme.colors.text,
285
+ backgroundColor: theme.colors.backgroundSecondary || "#f1f5f9",
286
+ padding: "4px 10px",
287
+ borderRadius: 999,
288
+ },
289
+ consultationModes: {
290
+ display: "flex",
291
+ gap: 8,
292
+ marginBottom: 12,
293
+ },
294
+ modeBadge: {
295
+ fontSize: 11,
296
+ color: theme.colors.textSecondary,
297
+ backgroundColor: theme.colors.backgroundSecondary || "#f1f5f9",
298
+ padding: "4px 8px",
299
+ borderRadius: 6,
300
+ },
301
+ emptyState: {
302
+ textAlign: "center",
303
+ padding: "40px 20px",
304
+ color: theme.colors.textSecondary,
305
+ fontSize: 14,
306
+ },
307
+ actions: {
308
+ display: "flex",
309
+ gap: 12,
310
+ marginTop: 24,
311
+ paddingTop: 20,
312
+ borderTop: cardBorder,
313
+ justifyContent: "flex-end",
314
+ },
315
+ backBtn: {
316
+ padding: "10px 20px",
317
+ border: cardBorder,
318
+ borderRadius: buttonRadius,
319
+ backgroundColor: theme.colors.surface,
320
+ color: theme.colors.text,
321
+ cursor: "pointer",
322
+ fontSize: 14,
323
+ fontWeight: 600,
324
+ transition: "all 0.2s ease",
325
+ minHeight: 40,
326
+ },
327
+ nextBtn: {
328
+ padding: "10px 24px",
329
+ border: "none",
330
+ borderRadius: buttonRadius,
331
+ backgroundColor: theme.colors.primary,
332
+ color: "#fff",
333
+ cursor: "pointer",
334
+ fontSize: 14,
335
+ fontWeight: 600,
336
+ transition: "all 0.2s ease",
337
+ minHeight: 40,
338
+ },
339
+ nextBtnDisabled: {
340
+ backgroundColor: theme.colors.textSecondary || "#9ca3af",
341
+ cursor: "not-allowed",
342
+ opacity: 0.6,
343
+ },
344
+ };
345
+ };
346
+ export default BookingOptionStep;
@@ -1,15 +1,21 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { useTheme } from "../react/hooks/useTheme";
4
+ import { useBreakpoint } from "../core/theme/responsive";
4
5
  import { getContainerStyles, getPhoneVerifyStyles, getButtonStyles, } from "./theme-styles";
5
6
  export const ContactInformationStep = React.memo(({ patientName, patientEmail, countryCode, patientPhone, onNameChange, onEmailChange, onCountryCodeChange, onPhoneChange, onNext, }) => {
6
7
  const theme = useTheme();
7
- const PHONE_VERIFY_STYLES = React.useMemo(() => getPhoneVerifyStyles(theme), [theme]);
8
- const BUTTON_STYLES = React.useMemo(() => getButtonStyles(theme), [theme]);
9
- const CONTAINER_STYLES = React.useMemo(() => getContainerStyles(theme), [theme]);
10
- return (_jsxs("div", { children: [_jsxs("div", { style: { marginBottom: "16px" }, children: [_jsx("label", { style: PHONE_VERIFY_STYLES.label, children: "Name" }), _jsx("input", { type: "text", value: patientName, onChange: (e) => onNameChange(e.target.value), placeholder: "Enter your full name", style: PHONE_VERIFY_STYLES.phoneInput })] }), _jsxs("div", { style: { marginBottom: "16px" }, children: [_jsx("label", { style: PHONE_VERIFY_STYLES.label, children: "Email" }), _jsx("input", { type: "email", value: patientEmail, onChange: (e) => onEmailChange(e.target.value), placeholder: "Enter your email", style: PHONE_VERIFY_STYLES.phoneInput })] }), _jsxs("div", { style: { marginBottom: "16px" }, children: [_jsx("label", { style: PHONE_VERIFY_STYLES.label, children: "Phone Number" }), _jsxs("div", { style: PHONE_VERIFY_STYLES.phoneInputContainer, children: [_jsx("input", { type: "text", value: countryCode, onChange: (e) => onCountryCodeChange(e.target.value), placeholder: "+91", style: {
8
+ const breakpoint = useBreakpoint(theme);
9
+ const PHONE_VERIFY_STYLES = React.useMemo(() => getPhoneVerifyStyles(theme, "medos", breakpoint), [theme, breakpoint]);
10
+ const BUTTON_STYLES = React.useMemo(() => getButtonStyles(theme, "medos", breakpoint), [theme, breakpoint]);
11
+ const CONTAINER_STYLES = React.useMemo(() => getContainerStyles(theme, "medos", breakpoint), [theme, breakpoint]);
12
+ const styles = getStyles(theme);
13
+ return (_jsxs("div", { children: [_jsxs("div", { style: { marginBottom: "16px" }, children: [_jsxs("label", { style: PHONE_VERIFY_STYLES.label, children: ["Name", _jsx("span", { style: styles.mandatory, children: "*" })] }), _jsx("input", { type: "text", value: patientName, onChange: (e) => onNameChange(e.target.value), placeholder: "Enter your full name", style: PHONE_VERIFY_STYLES.phoneInput })] }), _jsxs("div", { style: { marginBottom: "16px" }, children: [_jsx("label", { style: PHONE_VERIFY_STYLES.label, children: "Email" }), _jsx("input", { type: "email", value: patientEmail, onChange: (e) => onEmailChange(e.target.value), placeholder: "Enter your email", style: PHONE_VERIFY_STYLES.phoneInput })] }), _jsxs("div", { style: { marginBottom: "16px" }, children: [_jsxs("label", { style: PHONE_VERIFY_STYLES.label, children: ["Phone Number", _jsx("span", { style: styles.mandatory, children: "*" })] }), _jsxs("div", { style: PHONE_VERIFY_STYLES.phoneInputContainer, children: [_jsx("input", { type: "text", value: countryCode, onChange: (e) => onCountryCodeChange(e.target.value), placeholder: "+91", style: {
11
14
  ...PHONE_VERIFY_STYLES.phoneInput,
12
15
  width: "80px",
13
16
  flex: "none",
14
17
  } }), _jsx("input", { type: "tel", value: patientPhone, onChange: (e) => onPhoneChange(e.target.value), placeholder: "Enter phone number", style: PHONE_VERIFY_STYLES.phoneInput })] })] }), _jsx("div", { style: CONTAINER_STYLES.actions, children: _jsx("button", { onClick: onNext, style: BUTTON_STYLES.primary, children: "Next" }) })] }));
15
18
  });
19
+ const getStyles = (theme) => ({
20
+ mandatory: { color: theme.colors.error, marginLeft: 4 },
21
+ });
@@ -2,10 +2,19 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from "react";
3
3
  import { useTheme } from "../react/hooks/useTheme";
4
4
  import { getPhoneVerifyStyles, getButtonStyles, getContainerStyles, } from "./theme-styles";
5
+ import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem, } from "./uiComponents/SelectDropdown";
5
6
  export const ContactPreferenceStep = React.memo(({ preferredContactMethod, onContactMethodChange, onBack, onSubmit, isLoading = false, }) => {
6
7
  const theme = useTheme();
7
8
  const PHONE_VERIFY_STYLES = React.useMemo(() => getPhoneVerifyStyles(theme), [theme]);
8
9
  const BUTTON_STYLES = React.useMemo(() => getButtonStyles(theme), [theme]);
9
10
  const CONTAINER_STYLES = React.useMemo(() => getContainerStyles(theme), [theme]);
10
- return (_jsxs("div", { children: [_jsxs("div", { style: { marginBottom: "16px" }, children: [_jsx("label", { style: PHONE_VERIFY_STYLES.label, children: "Preferred Contact Method" }), _jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "8px" }, children: [_jsxs("label", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [_jsx("input", { type: "radio", name: "contactMethod", value: "PHONE", checked: preferredContactMethod === "PHONE", onChange: (e) => onContactMethodChange(e.target.value) }), "Phone"] }), _jsxs("label", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [_jsx("input", { type: "radio", name: "contactMethod", value: "EMAIL", checked: preferredContactMethod === "EMAIL", onChange: (e) => onContactMethodChange(e.target.value) }), "Email"] }), _jsxs("label", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [_jsx("input", { type: "radio", name: "contactMethod", value: "BOTH", checked: preferredContactMethod === "BOTH", onChange: (e) => onContactMethodChange(e.target.value) }), "Both"] })] })] }), _jsxs("div", { style: CONTAINER_STYLES.actions, children: [_jsx("button", { onClick: onBack, style: BUTTON_STYLES.secondary, children: "Back" }), _jsx("button", { onClick: onSubmit, style: BUTTON_STYLES.primary, children: isLoading ? "Submitting..." : "Submit" })] })] }));
11
+ const contactOptions = [
12
+ { value: "PHONE", label: "Phone" },
13
+ { value: "EMAIL", label: "Email" },
14
+ { value: "BOTH", label: "Both" },
15
+ ];
16
+ const handleContactMethodSelect = (value) => {
17
+ onContactMethodChange(value);
18
+ };
19
+ return (_jsxs("div", { children: [_jsxs("div", { style: { marginBottom: "16px" }, children: [_jsx("label", { style: PHONE_VERIFY_STYLES.label, children: "Preferred Contact Method" }), _jsx("div", { style: { marginTop: "8px" }, children: _jsxs(Select, { value: preferredContactMethod, onValueChange: handleContactMethodSelect, children: [_jsx(SelectTrigger, { style: { width: "100%" }, children: _jsx(SelectValue, { placeholder: "Select contact method" }) }), _jsx(SelectContent, { children: contactOptions.map((option) => (_jsx(SelectItem, { value: option.value, children: option.label }, option.value))) })] }) })] }), _jsxs("div", { style: CONTAINER_STYLES.actions, children: [_jsx("button", { onClick: onBack, style: BUTTON_STYLES.secondary, children: "Back" }), _jsx("button", { onClick: onSubmit, style: BUTTON_STYLES.primary, children: isLoading ? "Submitting..." : "Submit" })] })] }));
11
20
  });
@@ -3,8 +3,10 @@ import { useState, useEffect } from "react";
3
3
  import { AppointmentService, } from "../services/AppointmentService";
4
4
  import { Select, SelectTrigger, SelectContent, SelectItem, } from "./uiComponents/SelectDropdown";
5
5
  import { useTheme } from "../react/hooks/useTheme";
6
+ import { useBreakpoint } from "../core/theme/responsive";
6
7
  export const DoctorSelectModal = ({ addresses: initialAddresses, addressDoctorsMap: initialAddressDoctorsMap, selectedAddressId: initialSelectedAddressId, selectedDoctorId: initialSelectedDoctorId, onCancel, onContinue, }) => {
7
8
  const theme = useTheme();
9
+ const breakpoint = useBreakpoint(theme);
8
10
  const [addresses, setAddresses] = useState(initialAddresses || []);
9
11
  const [addressDoctorsMap, setAddressDoctorsMap] = useState(initialAddressDoctorsMap || {});
10
12
  const [selectedAddressId, setSelectedAddressId] = useState(initialSelectedAddressId ? String(initialSelectedAddressId) : "");
@@ -62,7 +64,7 @@ export const DoctorSelectModal = ({ addresses: initialAddresses, addressDoctorsM
62
64
  const selectedDoctorLabel = doctorsForAddress.find((d) => String(d.id) === selectedDoctorId)?.name ||
63
65
  "";
64
66
  const canContinue = !!selectedAddressId && !!selectedDoctorId;
65
- const styles = getStyles(theme);
67
+ const styles = getStyles(theme, breakpoint);
66
68
  return (_jsx("div", { style: {
67
69
  border: `1px solid ${theme.colors.border}`,
68
70
  borderRadius: "2px",
@@ -81,62 +83,106 @@ export const DoctorSelectModal = ({ addresses: initialAddresses, addressDoctorsM
81
83
  textOverflow: "ellipsis",
82
84
  whiteSpace: "nowrap",
83
85
  flex: 1,
84
- }, children: selectedDoctorLabel || "Select Doctor" }) }), _jsx(SelectContent, { children: doctorsForAddress.length > 0 ? (doctorsForAddress.map((d) => (_jsxs(SelectItem, { value: String(d.id), children: [d.name, " ", d.specialty ? `- ${d.specialty}` : ""] }, d.id)))) : (_jsx(SelectItem, { value: "no-doctors", disabled: true, children: "No doctors available" })) })] })] }), _jsxs("div", { style: styles.fieldGroup, children: [_jsxs("label", { style: styles.label, children: ["Chief Complaint ", _jsx("span", { style: styles.optional, children: "(optional)" })] }), _jsx("textarea", { style: styles.textarea, placeholder: "Enter Chief Complaint or Appointment Notes", value: appointmentNotes, onChange: (e) => setAppointmentNotes(e.target.value) })] }), _jsx("div", { style: styles.footer, children: _jsx("button", { style: {
85
- ...styles.continueBtn,
86
- opacity: canContinue ? 1 : 0.6,
87
- }, disabled: !canContinue, onClick: () => onContinue(Number(selectedAddressId), Number(selectedDoctorId), appointmentNotes), children: "Next" }) })] })] }) }));
86
+ }, children: selectedDoctorLabel || "Select Doctor" }) }), _jsx(SelectContent, { children: doctorsForAddress.length > 0 ? (doctorsForAddress.map((d) => (_jsxs(SelectItem, { value: String(d.id), children: [d.name, " ", d.specialty ? `- ${d.specialty}` : ""] }, d.id)))) : (_jsx(SelectItem, { value: "no-doctors", disabled: true, children: "No doctors available" })) })] })] }), _jsxs("div", { style: styles.fieldGroup, children: [_jsxs("label", { style: styles.label, children: ["Chief Complaint ", _jsx("span", { style: styles.optional, children: "(optional)" })] }), _jsx("textarea", { style: styles.textarea, placeholder: "Enter Chief Complaint or Appointment Notes", value: appointmentNotes, onChange: (e) => setAppointmentNotes(e.target.value) })] }), _jsxs("div", { style: styles.footer, children: [_jsx("button", { style: styles.backBtn, onClick: onCancel, children: "Back" }), _jsx("button", { style: {
87
+ ...styles.continueBtn,
88
+ opacity: canContinue ? 1 : 0.6,
89
+ }, disabled: !canContinue, onClick: () => onContinue(Number(selectedAddressId), Number(selectedDoctorId), appointmentNotes), children: "Next" })] })] })] }) }));
90
+ };
91
+ const getStyles = (theme, breakpoint) => {
92
+ const isMobile = breakpoint === "mobile";
93
+ const isTablet = breakpoint === "tablet";
94
+ const borderRadius = "12px";
95
+ const buttonRadius = "8px";
96
+ const cardBorder = `1px solid ${theme.colors.border}`;
97
+ return {
98
+ modalWrapper: {
99
+ backgroundColor: theme.colors.background,
100
+ borderRadius,
101
+ maxWidth: isMobile || isTablet ? "100%" : 840,
102
+ margin: "0 auto",
103
+ fontFamily: theme.typography.fontFamily,
104
+ color: theme.colors.text,
105
+ },
106
+ headerWrapper: {
107
+ padding: isMobile ? "16px 20px" : "18px 24px",
108
+ backgroundColor: theme.colors.primary,
109
+ color: theme.colors.textOnPrimary,
110
+ },
111
+ contentWrapper: {
112
+ padding: isMobile ? "20px" : "24px",
113
+ },
114
+ title: {
115
+ fontSize: isMobile ? 16 : 18,
116
+ fontWeight: 600,
117
+ margin: 0,
118
+ color: theme.colors.textOnPrimary,
119
+ },
120
+ fieldGroup: { marginBottom: isMobile ? 18 : 20 },
121
+ label: {
122
+ fontSize: 14,
123
+ fontWeight: 500,
124
+ marginBottom: 8,
125
+ display: "block",
126
+ color: theme.colors.text,
127
+ },
128
+ mandatory: { color: theme.colors.error, marginLeft: 4 },
129
+ optional: {
130
+ color: theme.colors.textSecondary,
131
+ fontWeight: 400,
132
+ marginLeft: 4,
133
+ fontSize: 13,
134
+ },
135
+ textarea: {
136
+ width: "100%",
137
+ border: cardBorder,
138
+ borderRadius: buttonRadius,
139
+ minHeight: 100,
140
+ padding: "12px 14px",
141
+ fontSize: 14,
142
+ resize: "vertical",
143
+ boxSizing: "border-box",
144
+ transition: "border-color 0.2s ease, box-shadow 0.2s ease",
145
+ outline: "none",
146
+ backgroundColor: theme.colors.surface,
147
+ color: theme.colors.text,
148
+ },
149
+ footer: {
150
+ marginTop: isMobile ? 20 : 24,
151
+ paddingTop: 20,
152
+ borderTop: cardBorder,
153
+ display: "flex",
154
+ justifyContent: isMobile ? "stretch" : "flex-end",
155
+ alignItems: "center",
156
+ gap: 12,
157
+ flexDirection: isMobile ? "column" : "row",
158
+ },
159
+ brand: { color: theme.colors.primary, fontWeight: 600 },
160
+ backBtn: {
161
+ background: theme.colors.surface,
162
+ color: theme.colors.text,
163
+ border: cardBorder,
164
+ borderRadius: buttonRadius,
165
+ fontWeight: 600,
166
+ padding: isMobile ? "12px 20px" : "10px 20px",
167
+ cursor: "pointer",
168
+ width: isMobile ? "100%" : "auto",
169
+ minHeight: isMobile ? "44px" : "40px",
170
+ fontSize: 14,
171
+ transition: "all 0.2s ease",
172
+ },
173
+ continueBtn: {
174
+ background: theme.colors.secondary,
175
+ color: theme.colors.textOnSecondary,
176
+ border: "none",
177
+ borderRadius: buttonRadius,
178
+ fontWeight: 600,
179
+ padding: isMobile ? "12px 20px" : "10px 20px",
180
+ cursor: "pointer",
181
+ width: isMobile ? "100%" : "auto",
182
+ minHeight: isMobile ? "44px" : "40px",
183
+ fontSize: 14,
184
+ transition: "all 0.2s ease",
185
+ boxShadow: "0 1px 2px rgba(0, 0, 0, 0.05)",
186
+ },
187
+ };
88
188
  };
89
- const getStyles = (theme) => ({
90
- modalWrapper: {
91
- backgroundColor: theme.colors.background,
92
- borderRadius: 12,
93
- maxWidth: 840,
94
- margin: "0 auto",
95
- fontFamily: theme.typography.fontFamily,
96
- color: theme.colors.text,
97
- },
98
- headerWrapper: {
99
- padding: "20px 24px 10px 24px",
100
- },
101
- contentWrapper: {
102
- padding: "20px 24px 10px 24px",
103
- },
104
- title: { fontSize: 20, fontWeight: 600, margin: 0 },
105
- fieldGroup: { marginBottom: 18 },
106
- label: { fontSize: 15, fontWeight: 500, marginBottom: 6, display: "block" },
107
- mandatory: { color: theme.colors.error, marginLeft: 4 },
108
- optional: {
109
- color: theme.colors.textSecondary,
110
- fontWeight: 400,
111
- marginLeft: 4,
112
- fontSize: 13,
113
- },
114
- textarea: {
115
- width: "100%",
116
- border: `1px solid ${theme.colors.border}`,
117
- borderRadius: theme.radii.md,
118
- minHeight: 80,
119
- padding: "10px",
120
- fontSize: 14,
121
- resize: "vertical",
122
- boxSizing: "border-box",
123
- },
124
- footer: {
125
- marginTop: 24,
126
- marginBottom: 10,
127
- display: "flex",
128
- justifyContent: "flex-end",
129
- alignItems: "center",
130
- gap: 10,
131
- },
132
- brand: { color: theme.colors.primary, fontWeight: 600 },
133
- continueBtn: {
134
- background: theme.colors.secondary,
135
- color: theme.colors.textOnSecondary,
136
- border: "none",
137
- borderRadius: theme.radii.md,
138
- fontWeight: 600,
139
- padding: "8px 22px",
140
- cursor: "pointer",
141
- },
142
- });