@mediquo/elements 0.3.1

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 (187) hide show
  1. package/README.md +22 -0
  2. package/dist/chunks/api-chat-client-BTBtu01T.js +1 -0
  3. package/dist/chunks/apple-pay-outcomes-BlytM6W-.js +1 -0
  4. package/dist/chunks/appointment-details-DpzdYLjq.d.ts +24 -0
  5. package/dist/chunks/appointment.model.d-Dy50gMPg.d.ts +171 -0
  6. package/dist/chunks/ca_ES-nttMFJzr.js +1 -0
  7. package/dist/chunks/chunk-S5RWG6G2-oTcdgk2H.js +1 -0
  8. package/dist/chunks/chunk-YTQUGGS3-DN-JZpgG.js +1 -0
  9. package/dist/chunks/class-map-Co76I6aw.js +1 -0
  10. package/dist/chunks/context-provider-CiMFpvDA.js +1 -0
  11. package/dist/chunks/context-request-event-Dfydf1ub.js +1 -0
  12. package/dist/chunks/custom-element-DA9Fxvxd.js +1 -0
  13. package/dist/chunks/de_DE-CrwfSJnS.js +1 -0
  14. package/dist/chunks/default-IpEn36CA.d.ts +5 -0
  15. package/dist/chunks/directive-2EDmOukv.js +1 -0
  16. package/dist/chunks/en_US-BslWF9nj.js +1 -0
  17. package/dist/chunks/ensure-context-root-DbdqwnKB.js +1 -0
  18. package/dist/chunks/exports-XZaVrMLd.js +1 -0
  19. package/dist/chunks/external-zAbuzxDj.js +1 -0
  20. package/dist/chunks/format-Cm3B1GMy.js +1 -0
  21. package/dist/chunks/get-organization-setup-query-BMbuRi6v.js +1 -0
  22. package/dist/chunks/get-patient-profile-query-C8T8DJ7z.js +1 -0
  23. package/dist/chunks/if-defined-BYeVdwgd.js +1 -0
  24. package/dist/chunks/index-B9iWdvW3.js +1 -0
  25. package/dist/chunks/index-BYHKNPG2.js +1 -0
  26. package/dist/chunks/index-Bxh8Qfwr.js +1 -0
  27. package/dist/chunks/isBefore-Cof0D841.js +1 -0
  28. package/dist/chunks/isSameDay-DPfclwIL.js +1 -0
  29. package/dist/chunks/lit-element-DiWJYFwC.js +1 -0
  30. package/dist/chunks/login-token-task-BI-L2zSV.js +1 -0
  31. package/dist/chunks/mq-chat-room-DuG4RuIp.d.ts +503 -0
  32. package/dist/chunks/mq-layout-D8Mak16a.d.ts +21 -0
  33. package/dist/chunks/mq-layout-DpzeL9_i.js +1 -0
  34. package/dist/chunks/mutation-controller-OVT8NEt6.js +1 -0
  35. package/dist/chunks/parseISO-jT42c8Ob.js +1 -0
  36. package/dist/chunks/price-Dtdjx70D.js +1 -0
  37. package/dist/chunks/price.d-CwLosdAN.d.ts +10 -0
  38. package/dist/chunks/professional-overview-mO3tuMuH.d.ts +25 -0
  39. package/dist/chunks/property-scuRaFcM.js +1 -0
  40. package/dist/chunks/provide-CfT7g_Zi.js +1 -0
  41. package/dist/chunks/pt_PT-CFbbWowX.js +1 -0
  42. package/dist/chunks/query-CeeutdfT.js +1 -0
  43. package/dist/chunks/query-QJ1INUTG.js +1 -0
  44. package/dist/chunks/refund-cancel-policy-Bm5djPds.js +1 -0
  45. package/dist/chunks/runtime-Bg1WXVCx.js +1 -0
  46. package/dist/chunks/schemas.d-BEA8Pl6w.d.ts +44 -0
  47. package/dist/chunks/state-LQivXIgA.js +1 -0
  48. package/dist/chunks/style-map-CIdqdn7C.js +1 -0
  49. package/dist/chunks/task-Bj8p7kJX.js +1 -0
  50. package/dist/chunks/telemetry-client-CKCb9Gnf.js +1 -0
  51. package/dist/env.d.ts +21 -0
  52. package/dist/env.js +1 -0
  53. package/dist/events.d.ts +141 -0
  54. package/dist/events.js +1 -0
  55. package/dist/i18n.d.ts +11 -0
  56. package/dist/i18n.js +1 -0
  57. package/dist/index.d.ts +5 -0
  58. package/dist/index.js +1 -0
  59. package/dist/mq-apple-pay-checkout.d.ts +82 -0
  60. package/dist/mq-apple-pay-checkout.js +1 -0
  61. package/dist/mq-appointment-checkout.d.ts +55 -0
  62. package/dist/mq-appointment-checkout.js +1 -0
  63. package/dist/mq-chat-room.d.ts +20 -0
  64. package/dist/mq-chat-room.js +1 -0
  65. package/dist/mq-checkout.d.ts +108 -0
  66. package/dist/mq-checkout.js +1 -0
  67. package/dist/mq-google-pay-checkout.d.ts +117 -0
  68. package/dist/mq-google-pay-checkout.js +1 -0
  69. package/dist/mq-immediate-videocall-checkout.d.ts +47 -0
  70. package/dist/mq-immediate-videocall-checkout.js +1 -0
  71. package/dist/mq-my-appointments.d.ts +602 -0
  72. package/dist/mq-my-appointments.js +1 -0
  73. package/dist/mq-query-client-provider.d.ts +17 -0
  74. package/dist/mq-query-client-provider.js +1 -0
  75. package/dist/mq-schedule-success.d.ts +84 -0
  76. package/dist/mq-schedule-success.js +4 -0
  77. package/dist/mq-schedule.d.ts +1013 -0
  78. package/dist/mq-schedule.js +1 -0
  79. package/dist/mq-socket-provider.d.ts +103 -0
  80. package/dist/mq-socket-provider.js +1 -0
  81. package/dist/mq-support-chat.d.ts +86 -0
  82. package/dist/mq-support-chat.js +1 -0
  83. package/dist/mq-theme-provider.d.ts +34 -0
  84. package/dist/mq-theme-provider.js +1 -0
  85. package/dist/mq-videocall.d.ts +151 -0
  86. package/dist/mq-videocall.js +1 -0
  87. package/dist/theme.d.ts +200 -0
  88. package/dist/theme.js +1 -0
  89. package/dist/ui/back-link.d.ts +21 -0
  90. package/dist/ui/back-link.js +1 -0
  91. package/dist/ui/icons/alert-circle-icon.d.ts +6 -0
  92. package/dist/ui/icons/alert-circle-icon.js +1 -0
  93. package/dist/ui/icons/annotation-question-icon.d.ts +6 -0
  94. package/dist/ui/icons/annotation-question-icon.js +1 -0
  95. package/dist/ui/icons/briefcase-icon.d.ts +6 -0
  96. package/dist/ui/icons/briefcase-icon.js +1 -0
  97. package/dist/ui/icons/calendar-icon.d.ts +6 -0
  98. package/dist/ui/icons/calendar-icon.js +1 -0
  99. package/dist/ui/icons/chat-bubble-icon.d.ts +6 -0
  100. package/dist/ui/icons/chat-bubble-icon.js +1 -0
  101. package/dist/ui/icons/check-circle-icon.d.ts +5 -0
  102. package/dist/ui/icons/check-circle-icon.js +1 -0
  103. package/dist/ui/icons/check-double-icon.d.ts +6 -0
  104. package/dist/ui/icons/check-double-icon.js +1 -0
  105. package/dist/ui/icons/check-icon.d.ts +6 -0
  106. package/dist/ui/icons/check-icon.js +1 -0
  107. package/dist/ui/icons/chevron-down-icon.d.ts +6 -0
  108. package/dist/ui/icons/chevron-down-icon.js +1 -0
  109. package/dist/ui/icons/chevron-left-icon.d.ts +6 -0
  110. package/dist/ui/icons/chevron-left-icon.js +1 -0
  111. package/dist/ui/icons/chevron-right-icon.d.ts +6 -0
  112. package/dist/ui/icons/chevron-right-icon.js +1 -0
  113. package/dist/ui/icons/clock-icon.d.ts +6 -0
  114. package/dist/ui/icons/clock-icon.js +1 -0
  115. package/dist/ui/icons/download-icon.d.ts +6 -0
  116. package/dist/ui/icons/download-icon.js +1 -0
  117. package/dist/ui/icons/file-icon.d.ts +6 -0
  118. package/dist/ui/icons/file-icon.js +1 -0
  119. package/dist/ui/icons/heartbeat-icon.d.ts +5 -0
  120. package/dist/ui/icons/heartbeat-icon.js +1 -0
  121. package/dist/ui/icons/info-circle-outine-icon.d.ts +6 -0
  122. package/dist/ui/icons/info-circle-outine-icon.js +1 -0
  123. package/dist/ui/icons/message-bubble-icon.d.ts +6 -0
  124. package/dist/ui/icons/message-bubble-icon.js +1 -0
  125. package/dist/ui/icons/message-square-icon.d.ts +6 -0
  126. package/dist/ui/icons/message-square-icon.js +1 -0
  127. package/dist/ui/icons/mic-icon.d.ts +6 -0
  128. package/dist/ui/icons/mic-icon.js +1 -0
  129. package/dist/ui/icons/mic-off-icon.d.ts +6 -0
  130. package/dist/ui/icons/mic-off-icon.js +1 -0
  131. package/dist/ui/icons/phone-icon.d.ts +6 -0
  132. package/dist/ui/icons/phone-icon.js +1 -0
  133. package/dist/ui/icons/spinner-icon.d.ts +6 -0
  134. package/dist/ui/icons/spinner-icon.js +1 -0
  135. package/dist/ui/icons/tag-icon.d.ts +6 -0
  136. package/dist/ui/icons/tag-icon.js +1 -0
  137. package/dist/ui/icons/time-left-icon.d.ts +5 -0
  138. package/dist/ui/icons/time-left-icon.js +1 -0
  139. package/dist/ui/icons/types.d.ts +9 -0
  140. package/dist/ui/icons/types.js +1 -0
  141. package/dist/ui/icons/upload-icon.d.ts +6 -0
  142. package/dist/ui/icons/upload-icon.js +1 -0
  143. package/dist/ui/icons/video-icon.d.ts +6 -0
  144. package/dist/ui/icons/video-icon.js +1 -0
  145. package/dist/ui/icons/video-off-icon.d.ts +6 -0
  146. package/dist/ui/icons/video-off-icon.js +1 -0
  147. package/dist/ui/icons/x-icon.d.ts +6 -0
  148. package/dist/ui/icons/x-icon.js +1 -0
  149. package/dist/ui/mq-avatar.d.ts +37 -0
  150. package/dist/ui/mq-avatar.js +1 -0
  151. package/dist/ui/mq-button.d.ts +34 -0
  152. package/dist/ui/mq-button.js +1 -0
  153. package/dist/ui/mq-calendar.d.ts +66 -0
  154. package/dist/ui/mq-calendar.js +1 -0
  155. package/dist/ui/mq-callout.d.ts +23 -0
  156. package/dist/ui/mq-callout.js +1 -0
  157. package/dist/ui/mq-card.d.ts +18 -0
  158. package/dist/ui/mq-card.js +1 -0
  159. package/dist/ui/mq-checkbox.d.ts +41 -0
  160. package/dist/ui/mq-checkbox.js +1 -0
  161. package/dist/ui/mq-clamped-text.d.ts +46 -0
  162. package/dist/ui/mq-clamped-text.js +1 -0
  163. package/dist/ui/mq-dialog.d.ts +53 -0
  164. package/dist/ui/mq-dialog.js +1 -0
  165. package/dist/ui/mq-floating-bubble.d.ts +42 -0
  166. package/dist/ui/mq-floating-bubble.js +1 -0
  167. package/dist/ui/mq-input.d.ts +41 -0
  168. package/dist/ui/mq-input.js +1 -0
  169. package/dist/ui/mq-rating.d.ts +30 -0
  170. package/dist/ui/mq-rating.js +1 -0
  171. package/dist/ui/mq-select.d.ts +83 -0
  172. package/dist/ui/mq-select.js +1 -0
  173. package/dist/ui/mq-skeleton.d.ts +18 -0
  174. package/dist/ui/mq-skeleton.js +1 -0
  175. package/dist/ui/mq-tabs.d.ts +56 -0
  176. package/dist/ui/mq-tabs.js +1 -0
  177. package/dist/ui/mq-text-button.d.ts +39 -0
  178. package/dist/ui/mq-text-button.js +1 -0
  179. package/dist/ui/mq-textarea.d.ts +38 -0
  180. package/dist/ui/mq-textarea.js +1 -0
  181. package/dist/ui/mq-time-slot-picker.d.ts +84 -0
  182. package/dist/ui/mq-time-slot-picker.js +1 -0
  183. package/dist/ui/mq-toast.d.ts +111 -0
  184. package/dist/ui/mq-toast.js +1 -0
  185. package/dist/ui/mq-unread-badge.d.ts +15 -0
  186. package/dist/ui/mq-unread-badge.js +1 -0
  187. package/package.json +176 -0
@@ -0,0 +1,602 @@
1
+ export { A as AppointmentDetails } from './chunks/appointment-details-DpzdYLjq.js';
2
+ import * as lit_html from 'lit-html';
3
+ import * as lit from 'lit';
4
+ import { LitElement } from 'lit';
5
+ import z, { z as z$1 } from 'zod';
6
+ import { MqTabsSelectEvent } from './ui/mq-tabs.js';
7
+ import './ui/mq-card.js';
8
+ export { P as ProfessionalOverview } from './chunks/professional-overview-mO3tuMuH.js';
9
+ import './chunks/mq-chat-room-DuG4RuIp.js';
10
+ import './ui/mq-floating-bubble.js';
11
+ import { P as PriceInCents } from './chunks/price.d-CwLosdAN.js';
12
+ import './ui/mq-button.js';
13
+ import './ui/mq-dialog.js';
14
+ import { QueryClient } from '@tanstack/query-core';
15
+ import './ui/mq-unread-badge.js';
16
+ import './ui/back-link.js';
17
+ import './chunks/appointment.model.d-Dy50gMPg.js';
18
+ import './ui/mq-text-button.js';
19
+ import './ui/mq-avatar.js';
20
+ import './ui/mq-skeleton.js';
21
+
22
+ declare const LoginTokenResponseSchema: z.ZodObject<{
23
+ access_token: z.ZodString;
24
+ patient: z.ZodObject<{
25
+ hash: z.ZodString;
26
+ country_code: z.ZodString;
27
+ timezone: z.ZodString;
28
+ first_name: z.ZodString;
29
+ last_name: z.ZodString;
30
+ name: z.ZodString;
31
+ birth_date: z.ZodString;
32
+ email: z.ZodString;
33
+ language_code: z.ZodString;
34
+ phone: z.ZodString;
35
+ phone_prefix: z.ZodString;
36
+ tax_id: z.ZodString;
37
+ legal_consent: z.ZodObject<{
38
+ accepted_at: z.ZodNullable<z.ZodString>;
39
+ last_version_at: z.ZodNullable<z.ZodString>;
40
+ terms_url: z.ZodString;
41
+ privacy_url: z.ZodString;
42
+ has_commercial_communications: z.ZodBoolean;
43
+ organization_name: z.ZodString;
44
+ }, "strip", z.ZodTypeAny, {
45
+ accepted_at: string | null;
46
+ last_version_at: string | null;
47
+ terms_url: string;
48
+ privacy_url: string;
49
+ has_commercial_communications: boolean;
50
+ organization_name: string;
51
+ }, {
52
+ accepted_at: string | null;
53
+ last_version_at: string | null;
54
+ terms_url: string;
55
+ privacy_url: string;
56
+ has_commercial_communications: boolean;
57
+ organization_name: string;
58
+ }>;
59
+ }, "strip", z.ZodTypeAny, {
60
+ hash: string;
61
+ country_code: string;
62
+ timezone: string;
63
+ first_name: string;
64
+ last_name: string;
65
+ name: string;
66
+ birth_date: string;
67
+ email: string;
68
+ language_code: string;
69
+ phone: string;
70
+ phone_prefix: string;
71
+ tax_id: string;
72
+ legal_consent: {
73
+ accepted_at: string | null;
74
+ last_version_at: string | null;
75
+ terms_url: string;
76
+ privacy_url: string;
77
+ has_commercial_communications: boolean;
78
+ organization_name: string;
79
+ };
80
+ }, {
81
+ hash: string;
82
+ country_code: string;
83
+ timezone: string;
84
+ first_name: string;
85
+ last_name: string;
86
+ name: string;
87
+ birth_date: string;
88
+ email: string;
89
+ language_code: string;
90
+ phone: string;
91
+ phone_prefix: string;
92
+ tax_id: string;
93
+ legal_consent: {
94
+ accepted_at: string | null;
95
+ last_version_at: string | null;
96
+ terms_url: string;
97
+ privacy_url: string;
98
+ has_commercial_communications: boolean;
99
+ organization_name: string;
100
+ };
101
+ }>;
102
+ }, "strip", z.ZodTypeAny, {
103
+ access_token: string;
104
+ patient: {
105
+ hash: string;
106
+ country_code: string;
107
+ timezone: string;
108
+ first_name: string;
109
+ last_name: string;
110
+ name: string;
111
+ birth_date: string;
112
+ email: string;
113
+ language_code: string;
114
+ phone: string;
115
+ phone_prefix: string;
116
+ tax_id: string;
117
+ legal_consent: {
118
+ accepted_at: string | null;
119
+ last_version_at: string | null;
120
+ terms_url: string;
121
+ privacy_url: string;
122
+ has_commercial_communications: boolean;
123
+ organization_name: string;
124
+ };
125
+ };
126
+ }, {
127
+ access_token: string;
128
+ patient: {
129
+ hash: string;
130
+ country_code: string;
131
+ timezone: string;
132
+ first_name: string;
133
+ last_name: string;
134
+ name: string;
135
+ birth_date: string;
136
+ email: string;
137
+ language_code: string;
138
+ phone: string;
139
+ phone_prefix: string;
140
+ tax_id: string;
141
+ legal_consent: {
142
+ accepted_at: string | null;
143
+ last_version_at: string | null;
144
+ terms_url: string;
145
+ privacy_url: string;
146
+ has_commercial_communications: boolean;
147
+ organization_name: string;
148
+ };
149
+ };
150
+ }>;
151
+ type LoginTokenResponse = z.infer<typeof LoginTokenResponseSchema>;
152
+
153
+ declare const MqMyAppointmentsTabsSchema: z$1.ZodEnum<["next", "history"]>;
154
+ type MqMyAppointmentsTabs = z$1.infer<typeof MqMyAppointmentsTabsSchema>;
155
+
156
+ declare const GetAppointmentsResponseSchema: z$1.ZodObject<{
157
+ data: z$1.ZodArray<z$1.ZodObject<{
158
+ appointment: z$1.ZodObject<{
159
+ id: z$1.ZodString;
160
+ url: z$1.ZodString;
161
+ starts_at: z$1.ZodString;
162
+ duration: z$1.ZodNumber;
163
+ status: z$1.ZodEnum<["pending", "expired", "accepted", "inCall", "declined", "cancelled", "finished", "free_of_charge", "owed", "unpaid", "reporting"]>;
164
+ channel: z$1.ZodEnum<["videocall", "chat", "phonecall"]>;
165
+ expires_at: z$1.ZodNullable<z$1.ZodString>;
166
+ service_id: z$1.ZodNullable<z$1.ZodString>;
167
+ }, "strip", z$1.ZodTypeAny, {
168
+ url: string;
169
+ status: "pending" | "expired" | "accepted" | "inCall" | "declined" | "cancelled" | "finished" | "free_of_charge" | "owed" | "unpaid" | "reporting";
170
+ id: string;
171
+ channel: "videocall" | "chat" | "phonecall";
172
+ duration: number;
173
+ expires_at: string | null;
174
+ service_id: string | null;
175
+ starts_at: string;
176
+ }, {
177
+ url: string;
178
+ status: "pending" | "expired" | "accepted" | "inCall" | "declined" | "cancelled" | "finished" | "free_of_charge" | "owed" | "unpaid" | "reporting";
179
+ id: string;
180
+ channel: "videocall" | "chat" | "phonecall";
181
+ duration: number;
182
+ expires_at: string | null;
183
+ service_id: string | null;
184
+ starts_at: string;
185
+ }>;
186
+ room: z$1.ZodObject<{
187
+ id: z$1.ZodNumber;
188
+ }, "strip", z$1.ZodTypeAny, {
189
+ id: number;
190
+ }, {
191
+ id: number;
192
+ }>;
193
+ price: z$1.ZodNullable<z$1.ZodObject<{
194
+ amount: z$1.ZodNumber;
195
+ currency: z$1.ZodString;
196
+ }, "strip", z$1.ZodTypeAny, {
197
+ currency: string;
198
+ amount: number;
199
+ }, {
200
+ currency: string;
201
+ amount: number;
202
+ }>>;
203
+ patient: z$1.ZodObject<{
204
+ hash: z$1.ZodString;
205
+ }, "strip", z$1.ZodTypeAny, {
206
+ hash: string;
207
+ }, {
208
+ hash: string;
209
+ }>;
210
+ slots: z$1.ZodArray<z$1.ZodAny, "many">;
211
+ professional: z$1.ZodObject<{
212
+ hash: z$1.ZodString;
213
+ name: z$1.ZodString;
214
+ avatar: z$1.ZodOptional<z$1.ZodString>;
215
+ description: z$1.ZodOptional<z$1.ZodString>;
216
+ languages: z$1.ZodArray<z$1.ZodString, "many">;
217
+ collegiate_number: z$1.ZodOptional<z$1.ZodString>;
218
+ }, "strip", z$1.ZodTypeAny, {
219
+ hash: string;
220
+ name: string;
221
+ languages: string[];
222
+ avatar?: string | undefined;
223
+ collegiate_number?: string | undefined;
224
+ description?: string | undefined;
225
+ }, {
226
+ hash: string;
227
+ name: string;
228
+ languages: string[];
229
+ avatar?: string | undefined;
230
+ collegiate_number?: string | undefined;
231
+ description?: string | undefined;
232
+ }>;
233
+ speciality: z$1.ZodObject<{
234
+ id: z$1.ZodNumber;
235
+ name: z$1.ZodString;
236
+ }, "strip", z$1.ZodTypeAny, {
237
+ id: number;
238
+ name: string;
239
+ }, {
240
+ id: number;
241
+ name: string;
242
+ }>;
243
+ }, "strip", z$1.ZodTypeAny, {
244
+ speciality: {
245
+ id: number;
246
+ name: string;
247
+ };
248
+ price: {
249
+ currency: string;
250
+ amount: number;
251
+ } | null;
252
+ appointment: {
253
+ url: string;
254
+ status: "pending" | "expired" | "accepted" | "inCall" | "declined" | "cancelled" | "finished" | "free_of_charge" | "owed" | "unpaid" | "reporting";
255
+ id: string;
256
+ channel: "videocall" | "chat" | "phonecall";
257
+ duration: number;
258
+ expires_at: string | null;
259
+ service_id: string | null;
260
+ starts_at: string;
261
+ };
262
+ room: {
263
+ id: number;
264
+ };
265
+ patient: {
266
+ hash: string;
267
+ };
268
+ slots: any[];
269
+ professional: {
270
+ hash: string;
271
+ name: string;
272
+ languages: string[];
273
+ avatar?: string | undefined;
274
+ collegiate_number?: string | undefined;
275
+ description?: string | undefined;
276
+ };
277
+ }, {
278
+ speciality: {
279
+ id: number;
280
+ name: string;
281
+ };
282
+ price: {
283
+ currency: string;
284
+ amount: number;
285
+ } | null;
286
+ appointment: {
287
+ url: string;
288
+ status: "pending" | "expired" | "accepted" | "inCall" | "declined" | "cancelled" | "finished" | "free_of_charge" | "owed" | "unpaid" | "reporting";
289
+ id: string;
290
+ channel: "videocall" | "chat" | "phonecall";
291
+ duration: number;
292
+ expires_at: string | null;
293
+ service_id: string | null;
294
+ starts_at: string;
295
+ };
296
+ room: {
297
+ id: number;
298
+ };
299
+ patient: {
300
+ hash: string;
301
+ };
302
+ slots: any[];
303
+ professional: {
304
+ hash: string;
305
+ name: string;
306
+ languages: string[];
307
+ avatar?: string | undefined;
308
+ collegiate_number?: string | undefined;
309
+ description?: string | undefined;
310
+ };
311
+ }>, "many">;
312
+ meta: z$1.ZodObject<{
313
+ current_page: z$1.ZodNumber;
314
+ last_page: z$1.ZodNumber;
315
+ per_page: z$1.ZodNumber;
316
+ total: z$1.ZodNumber;
317
+ }, "strip", z$1.ZodTypeAny, {
318
+ current_page: number;
319
+ last_page: number;
320
+ per_page: number;
321
+ total: number;
322
+ }, {
323
+ current_page: number;
324
+ last_page: number;
325
+ per_page: number;
326
+ total: number;
327
+ }>;
328
+ }, "strip", z$1.ZodTypeAny, {
329
+ data: {
330
+ speciality: {
331
+ id: number;
332
+ name: string;
333
+ };
334
+ price: {
335
+ currency: string;
336
+ amount: number;
337
+ } | null;
338
+ appointment: {
339
+ url: string;
340
+ status: "pending" | "expired" | "accepted" | "inCall" | "declined" | "cancelled" | "finished" | "free_of_charge" | "owed" | "unpaid" | "reporting";
341
+ id: string;
342
+ channel: "videocall" | "chat" | "phonecall";
343
+ duration: number;
344
+ expires_at: string | null;
345
+ service_id: string | null;
346
+ starts_at: string;
347
+ };
348
+ room: {
349
+ id: number;
350
+ };
351
+ patient: {
352
+ hash: string;
353
+ };
354
+ slots: any[];
355
+ professional: {
356
+ hash: string;
357
+ name: string;
358
+ languages: string[];
359
+ avatar?: string | undefined;
360
+ collegiate_number?: string | undefined;
361
+ description?: string | undefined;
362
+ };
363
+ }[];
364
+ meta: {
365
+ current_page: number;
366
+ last_page: number;
367
+ per_page: number;
368
+ total: number;
369
+ };
370
+ }, {
371
+ data: {
372
+ speciality: {
373
+ id: number;
374
+ name: string;
375
+ };
376
+ price: {
377
+ currency: string;
378
+ amount: number;
379
+ } | null;
380
+ appointment: {
381
+ url: string;
382
+ status: "pending" | "expired" | "accepted" | "inCall" | "declined" | "cancelled" | "finished" | "free_of_charge" | "owed" | "unpaid" | "reporting";
383
+ id: string;
384
+ channel: "videocall" | "chat" | "phonecall";
385
+ duration: number;
386
+ expires_at: string | null;
387
+ service_id: string | null;
388
+ starts_at: string;
389
+ };
390
+ room: {
391
+ id: number;
392
+ };
393
+ patient: {
394
+ hash: string;
395
+ };
396
+ slots: any[];
397
+ professional: {
398
+ hash: string;
399
+ name: string;
400
+ languages: string[];
401
+ avatar?: string | undefined;
402
+ collegiate_number?: string | undefined;
403
+ description?: string | undefined;
404
+ };
405
+ }[];
406
+ meta: {
407
+ current_page: number;
408
+ last_page: number;
409
+ per_page: number;
410
+ total: number;
411
+ };
412
+ }>;
413
+ type GetAppointmentsResponse = z$1.infer<typeof GetAppointmentsResponseSchema>;
414
+
415
+ declare class CancelAppointmentConfirmationDialog extends LitElement {
416
+ static styles: lit.CSSResult;
417
+ open: boolean;
418
+ queryClientContext: QueryClient | undefined;
419
+ appointmentId: string;
420
+ price?: PriceInCents;
421
+ private cancelAppointmentMutation;
422
+ private handleClose;
423
+ private handleDismissClick;
424
+ private handleConfirmClick;
425
+ render(): lit_html.TemplateResult<1>;
426
+ }
427
+ declare global {
428
+ interface HTMLElementTagNameMap {
429
+ "cancel-appointment-confirmation-dialog": CancelAppointmentConfirmationDialog;
430
+ }
431
+ }
432
+
433
+ /**
434
+ * Informational dialog shown when an appointment action (modify, cancel,
435
+ * repeat) is currently unavailable. Purely presentational: the parent owns
436
+ * the copy (already translated) and decides when to open it.
437
+ *
438
+ * Usage:
439
+ * <appointment-action-unavailable-dialog
440
+ * .open=${true}
441
+ * .heading=${"Anular cita"}
442
+ * .message=${"Lo sentimos, ..."}
443
+ * @close=${() => { ... }}
444
+ * ></appointment-action-unavailable-dialog>
445
+ */
446
+ declare class AppointmentActionUnavailableDialog extends LitElement {
447
+ static styles: lit.CSSResult;
448
+ open: boolean;
449
+ heading: string;
450
+ message: string;
451
+ private handleClose;
452
+ render(): lit_html.TemplateResult<1>;
453
+ }
454
+ declare global {
455
+ interface HTMLElementTagNameMap {
456
+ "appointment-action-unavailable-dialog": AppointmentActionUnavailableDialog;
457
+ }
458
+ }
459
+
460
+ type RepeatTarget = {
461
+ specialty: string;
462
+ service: string;
463
+ };
464
+ /**
465
+ * Action buttons block for an appointment card.
466
+ *
467
+ * The modify / cancel / repeat actions are ALWAYS rendered with a normal
468
+ * (enabled) appearance. When the corresponding action is currently
469
+ * unavailable, clicking it opens an informational dialog explaining why
470
+ * instead of executing the action — and no telemetry is tracked for that
471
+ * blocked click.
472
+ *
473
+ * Chat toggle and cancel-confirmation are owned by the parent card, so this
474
+ * element only emits `toggle-chat` and `request-cancel` for those.
475
+ */
476
+ declare class AppointmentCardActions extends LitElement {
477
+ static styles: lit.CSSResult;
478
+ loginToken: LoginTokenResponse;
479
+ variant: "next" | "history";
480
+ appointmentId: string;
481
+ isVideocall: boolean;
482
+ hasChatSupport: boolean;
483
+ unreadCount: number;
484
+ isModifyUnavailable: boolean;
485
+ isCancelUnavailable: boolean;
486
+ hasNoSlots: boolean;
487
+ modifyUnavailableMessage: string;
488
+ cancelUnavailableMessage: string;
489
+ repeatTarget: RepeatTarget | null;
490
+ professionalHash: string;
491
+ private openDialog;
492
+ private get patientHash();
493
+ private renderChatButton;
494
+ private handleModifyClick;
495
+ private handleCancelClick;
496
+ private handleRepeatClick;
497
+ private renderNextActions;
498
+ private renderHistoryActions;
499
+ private handleDialogClose;
500
+ render(): lit_html.TemplateResult<1>;
501
+ }
502
+ declare global {
503
+ interface HTMLElementTagNameMap {
504
+ "appointment-card-actions": AppointmentCardActions;
505
+ }
506
+ }
507
+
508
+ declare class AppointmentCard extends LitElement {
509
+ static styles: lit.CSSResult;
510
+ appointmentResource: GetAppointmentsResponse["data"][number];
511
+ specialtyId: number;
512
+ variant: "next" | "history";
513
+ detailsVariant: "default" | "wide";
514
+ loginToken: LoginTokenResponse;
515
+ private isChatOpen;
516
+ private isCancelDialogOpen;
517
+ private unreadQuery;
518
+ private getOrganizationSpecialtiesQuery;
519
+ private getOrganizationSetupQuery;
520
+ private getScheduleServicesQuery;
521
+ render(): lit_html.TemplateResult<1>;
522
+ }
523
+ declare global {
524
+ interface HTMLElementTagNameMap {
525
+ "appointment-card": AppointmentCard;
526
+ }
527
+ }
528
+
529
+ declare class AppointmentCardSkeleton extends LitElement {
530
+ static styles: lit.CSSResult;
531
+ render(): lit_html.TemplateResult<1>;
532
+ }
533
+ declare global {
534
+ interface HTMLElementTagNameMap {
535
+ "appointment-card-skeleton": AppointmentCardSkeleton;
536
+ }
537
+ }
538
+
539
+ /**
540
+ * @fires request-appointment - Emitted when the request appointment button is clicked
541
+ */
542
+ declare class NextAppointmentsTab extends LitElement {
543
+ static styles: lit.CSSResult;
544
+ private getAppointmentsQuery;
545
+ render(): lit_html.TemplateResult<1> | null;
546
+ }
547
+ declare global {
548
+ interface HTMLElementTagNameMap {
549
+ "next-appointments-tab": NextAppointmentsTab;
550
+ }
551
+ }
552
+
553
+ declare class AppointmentsHistoryTab extends LitElement {
554
+ private getAppointmentsQuery;
555
+ static styles: lit.CSSResult;
556
+ render(): lit_html.TemplateResult<1> | null;
557
+ }
558
+ declare global {
559
+ interface HTMLElementTagNameMap {
560
+ "appointments-history-tab": AppointmentsHistoryTab;
561
+ }
562
+ }
563
+
564
+ /**
565
+ * @fires ontabchange - Emitted when the tab is selected
566
+ * @fires mq-home - Emitted when the user clicks "back to home"
567
+ * @fires mq-appointment-view-documentation - Emitted when the documentation is clicked
568
+ * @fires request-appointment - Emitted when the request appointment button is clicked
569
+ */
570
+ declare class MqMyAppointments extends LitElement {
571
+ static styles: lit.CSSResult;
572
+ loginToken: LoginTokenResponse;
573
+ tab: MqMyAppointmentsTabs;
574
+ handleSelect(event: MqTabsSelectEvent): void;
575
+ render(): lit_html.TemplateResult<1>;
576
+ }
577
+
578
+ declare class RequestAppointmentEvent extends Event {
579
+ static eventName: string;
580
+ constructor();
581
+ }
582
+ /**
583
+ * @fires request-appointment - Emitted when the button is clicked
584
+ */
585
+ declare class RequestAppointmentCta extends LitElement {
586
+ static styles: lit.CSSResult;
587
+ private handleRequestAppointment;
588
+ render(): lit_html.TemplateResult<1>;
589
+ }
590
+ declare global {
591
+ interface HTMLElementTagNameMap {
592
+ "request-appointment-cta": RequestAppointmentCta;
593
+ }
594
+ }
595
+
596
+ declare class MqMyAppointmentsSelectEvent extends Event {
597
+ readonly value: MqMyAppointmentsTabs;
598
+ static eventName: string;
599
+ constructor(value: MqMyAppointmentsTabs);
600
+ }
601
+
602
+ export { MqMyAppointments, MqMyAppointmentsSelectEvent, RequestAppointmentCta, RequestAppointmentEvent };
@@ -0,0 +1 @@
1
+ import{h as t,f as e}from"./chunks/price-Dtdjx70D.js";export{A as AppointmentDetails}from"./chunks/price-Dtdjx70D.js";import{_ as i,t as n}from"./chunks/custom-element-DA9Fxvxd.js";import{M as a,c as o,Q as s}from"./chunks/mutation-controller-OVT8NEt6.js";import{m as r,s as p}from"./chunks/runtime-Bg1WXVCx.js";import{l}from"./chunks/parseISO-jT42c8Ob.js";import{l as c}from"./chunks/chunk-S5RWG6G2-oTcdgk2H.js";import{a as d,i as m,x as h,E as u}from"./chunks/lit-element-DiWJYFwC.js";import{n as v}from"./chunks/property-scuRaFcM.js";import{e as g}from"./chunks/external-zAbuzxDj.js";import{MqAppointmentRescheduleEvent as f,MqAppointmentBookEvent as b,MqAppointmentJoinVideocallEvent as y,MqAppointmentViewDocumentationEvent as x,MqHomeEvent as $}from"./events.js";import"./ui/mq-tabs.js";import{a as k,A as q,d as w,e as C}from"./chunks/api-chat-client-BTBtu01T.js";import{g as j}from"./chunks/get-organization-setup-query-BMbuRi6v.js";import{t as H,h as V,i as S,j as M,k as R,l as E,g as z,c as D,m as I}from"./chunks/telemetry-client-CKCb9Gnf.js";export{P as ProfessionalOverview}from"./chunks/telemetry-client-CKCb9Gnf.js";import{g as O,c as N}from"./chunks/refund-cancel-policy-Bm5djPds.js";import{a as _}from"./chunks/exports-XZaVrMLd.js";import{r as U}from"./chunks/state-LQivXIgA.js";import{getLocale as Q}from"./i18n.js";import"./ui/mq-card.js";import"./ui/mq-floating-bubble.js";import{Q as T}from"./chunks/query-QJ1INUTG.js";import"./ui/mq-button.js";import"./ui/mq-dialog.js";import{e as B}from"./chunks/class-map-Co76I6aw.js";import{messageBubbleIcon as Z}from"./ui/icons/message-bubble-icon.js";import{videoIcon as L}from"./ui/icons/video-icon.js";import"./ui/mq-unread-badge.js";import{toast as G}from"./ui/mq-toast.js";import"./ui/back-link.js";import"./ui/icons/briefcase-icon.js";import"./ui/icons/types.js";import"./ui/icons/calendar-icon.js";import"./ui/icons/clock-icon.js";import"./ui/icons/phone-icon.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/context-provider-CiMFpvDA.js";import"./chunks/format-Cm3B1GMy.js";import"./chunks/isBefore-Cof0D841.js";import"./env.js";import"./ui/icons/chevron-down-icon.js";import"./chunks/if-defined-BYeVdwgd.js";import"./ui/mq-text-button.js";import"./chunks/directive-2EDmOukv.js";import"./ui/mq-avatar.js";import"./chunks/provide-CfT7g_Zi.js";import"./theme.js";import"./ui/icons/x-icon.js";import"./ui/mq-skeleton.js";import"./chunks/style-map-CIdqdn7C.js";import"./ui/icons/chevron-left-icon.js";import"./chunks/query-CeeutdfT.js";import"./ui/icons/check-double-icon.js";import"./ui/icons/check-icon.js";import"./chunks/chunk-YTQUGGS3-DN-JZpgG.js";const F=g(["next","history"]).enum;class MqMyAppointmentsSelectEvent extends Event{static{this.eventName="ontabchange"}constructor(t){super(MqMyAppointmentsSelectEvent.eventName,{bubbles:!0,composed:!0}),this.value=t}}let W=class CancelAppointmentConfirmationDialog extends d{constructor(){super(...arguments),this.open=!1,this.cancelAppointmentMutation=new a(this,{mutationFn:async t=>k.appointments.cancelAppointment(t),onSuccess:()=>{this.queryClientContext?.invalidateQueries(),this.dispatchEvent(new CustomEvent("success",{bubbles:!0,composed:!0}))}}),this.handleClose=()=>{this.open=!1,this.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0}))},this.handleDismissClick=()=>{this.open=!1,this.dispatchEvent(new CustomEvent("cancel",{bubbles:!0,composed:!0}))},this.handleConfirmClick=()=>{this.cancelAppointmentMutation.run({id:this.appointmentId})}}static{this.styles=m`:host{display:contents}h2{font-family:var(--font-titles);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);margin:0}p{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);margin:0}.subheading-payable{font-size:var(--text-base);line-height:22px}.price-rows{display:flex;flex-direction:column;font-family:var(--font-body);font-size:var(--text-sm);font-weight:var(--font-weight-medium);line-height:var(--text-sm--line-height);color:var(--color-card-foreground);width:100%;margin-bottom:var(--sp-4)}.price-row{display:flex;align-items:center;justify-content:space-between;min-height:34px;gap:var(--sp-2)}.price-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.actions{display:flex;gap:var(--sp-3);margin-top:var(--sp-4);justify-content:flex-end;flex-wrap:wrap}`}render(){const i=Q(),n=this.price,a=t(n),o=this.cancelAppointmentMutation.isPending;if(a){const t=e(n,i),a=`-${t}`;return h`<mq-dialog .open="${this.open}" @mq-close="${this.handleClose}" dismissable><h2 slot="heading">${r("Confirmar cancelación")}</h2><p slot="subheading" class="subheading-payable">${r("¿Seguro que quieres cancelar esta cita? Se te devolverá el importe pagado en un plazo de 5-10 días hábiles.")}</p><div><div class="price-rows"><div class="price-row"><span>${r("Importe pagado")}</span> <span>${t}</span></div><div class="price-row"><span>${r("Importe a devolver")}</span> <span>${a}</span></div></div><div class="actions"><mq-button variant="outline" ?disabled="${o}" @click="${this.handleDismissClick}">${r("Volver")}</mq-button><mq-button variant="primary" ?disabled="${o}" @click="${this.handleConfirmClick}">${r("Confirmar")}</mq-button></div></div></mq-dialog>`}return h`<mq-dialog .open="${this.open}" @mq-close="${this.handleClose}" dismissable><h2 slot="heading">${r("Confirmar cancelación")}</h2><p slot="subheading">${r("¿Seguro que quieres cancelar esta cita?")}</p><div><div class="actions"><mq-button variant="outline" ?disabled="${o}" @click="${this.handleDismissClick}">${r("Cancelar")}</mq-button><mq-button variant="primary" ?disabled="${o}" @click="${this.handleConfirmClick}">${r("Confirmar")}</mq-button></div></div></mq-dialog>`}};i([v({type:Boolean,reflect:!0})],W.prototype,"open",void 0),i([o({context:T,subscribe:!0})],W.prototype,"queryClientContext",void 0),i([v({type:String})],W.prototype,"appointmentId",void 0),i([v({type:Object})],W.prototype,"price",void 0),W=i([l(),n("cancel-appointment-confirmation-dialog")],W);let K=class AppointmentActionUnavailableDialog extends d{constructor(){super(...arguments),this.open=!1,this.heading="",this.message="",this.handleClose=()=>{this.open=!1,this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}}static{this.styles=m`:host{display:contents}mq-dialog::part(dialog){max-width:343px;min-width:0}h2{font-family:var(--font-titles);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);margin:0}p{font-family:var(--font-body);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-normal);margin:0}.actions{display:flex;margin-top:var(--sp-4)}`}render(){return h`<mq-dialog .open="${this.open}" @mq-close="${this.handleClose}" dismissable><h2 slot="heading">${this.heading}</h2><p slot="subheading">${this.message}</p><div class="actions"><mq-button variant="primary" fullwidth @click="${this.handleClose}">${r("Volver")}</mq-button></div></mq-dialog>`}};i([v({type:Boolean,reflect:!0})],K.prototype,"open",void 0),i([v({type:String})],K.prototype,"heading",void 0),i([v({type:String})],K.prototype,"message",void 0),K=i([l(),n("appointment-action-unavailable-dialog")],K);let Y=class AppointmentCardActions extends d{constructor(){super(...arguments),this.variant="next",this.isVideocall=!1,this.hasChatSupport=!1,this.unreadCount=0,this.isModifyUnavailable=!1,this.isCancelUnavailable=!1,this.hasNoSlots=!1,this.modifyUnavailableMessage="",this.cancelUnavailableMessage="",this.repeatTarget=null,this.professionalHash="",this.openDialog=null,this.handleModifyClick=()=>{this.isModifyUnavailable?this.openDialog="modify":(H.track(V(this.patientHash,this.appointmentId)),this.dispatchEvent(new f({appointmentId:this.appointmentId})))},this.handleCancelClick=()=>{this.isCancelUnavailable?this.openDialog="cancel":(H.track(S(this.patientHash,this.appointmentId)),this.dispatchEvent(new CustomEvent("request-cancel",{bubbles:!0,composed:!0})))},this.handleRepeatClick=()=>{this.hasNoSlots?this.openDialog="repeat-no-slots":this.repeatTarget?(H.track(M(this.patientHash,this.appointmentId)),this.dispatchEvent(new b({specialty:this.repeatTarget.specialty,service:this.repeatTarget.service,professional:this.professionalHash}))):this.openDialog="repeat-error"},this.handleDialogClose=()=>{this.openDialog=null}}static{this.styles=m`:host{display:contents}.actions{display:flex;gap:var(--sp-3);margin-top:var(--sp-2)}.actions.next{flex-direction:column}.actions-secondary{display:flex;gap:var(--sp-3)}.actions mq-button{flex:1}`}get patientHash(){return this.loginToken.patient.hash}renderChatButton(){return h`<mq-button variant="primary" fullwidth noPadding @click="${()=>{this.dispatchEvent(new CustomEvent("toggle-chat",{bubbles:!0,composed:!0}))}}">${Z({size:24})} ${r("Chat")} ${this.unreadCount>0?h`<mq-unread-badge></mq-unread-badge>`:u}</mq-button>`}renderNextActions(){return h`${this.isVideocall?h`<mq-button variant="outline" fullwidth noPadding @click="${()=>{H.track(R(this.patientHash,this.appointmentId)),this.dispatchEvent(new y({appointmentId:this.appointmentId}))}}">${L({size:24})} ${r("Ir a videollamada")}</mq-button>`:u}<div class="actions-secondary">${this.hasChatSupport?this.renderChatButton():u}<mq-button variant="outline" fullwidth noPadding @click="${this.handleModifyClick}">${r("Modificar")}</mq-button><mq-button variant="outline-negative" fullwidth noPadding @click="${this.handleCancelClick}">${r("Cancelar")}</mq-button></div>`}renderHistoryActions(){return h`${this.hasChatSupport?this.renderChatButton():u}<mq-button variant="outline" fullwidth noPadding @click="${()=>{H.track(E(this.patientHash,this.appointmentId)),this.dispatchEvent(new x({appointmentId:this.appointmentId}))}}">${r("Documentos")}</mq-button><mq-button variant="outline" fullwidth noPadding @click="${this.handleRepeatClick}">${r("Repetir")}</mq-button>`}render(){return h`<div class="${B({actions:!0,next:"next"===this.variant})}">${"next"===this.variant?this.renderNextActions():this.renderHistoryActions()}</div><appointment-action-unavailable-dialog .open="${"modify"===this.openDialog}" .heading="${r("Modificar cita")}" .message="${this.modifyUnavailableMessage}" @close="${this.handleDialogClose}"></appointment-action-unavailable-dialog><appointment-action-unavailable-dialog .open="${"cancel"===this.openDialog}" .heading="${r("Anular cita")}" .message="${this.cancelUnavailableMessage}" @close="${this.handleDialogClose}"></appointment-action-unavailable-dialog><appointment-action-unavailable-dialog .open="${"repeat-no-slots"===this.openDialog}" .heading="${r("Repetir cita")}" .message="${r("Este profesional no tiene horarios disponibles")}" @close="${this.handleDialogClose}"></appointment-action-unavailable-dialog><appointment-action-unavailable-dialog .open="${"repeat-error"===this.openDialog}" .heading="${r("Repetir cita")}" .message="${r("Lo sentimos, no hemos podido repetir tu cita. Por favor, contacta con soporte.")}" @close="${this.handleDialogClose}"></appointment-action-unavailable-dialog>`}};function J(t){const{action:e,refundPolicySeconds:i}=t,n=null!=i&&i<3600,a=Math.ceil((i??0)/60),o=Math.ceil((i??0)/3600);return r(0===(n?a:o)?"modify"===e?"Esta cita ya ha pasado, por lo que no se puede modificar.":"Esta cita ya ha pasado, por lo que no se puede anular.":"modify"===e?n?p`Lo sentimos, como faltan menos de ${a} minutos para tu cita no podemos modificarla.`:p`Lo sentimos, como faltan menos de ${o} horas para tu cita no podemos modificarla.`:n?p`Lo sentimos, como faltan menos de ${a} minutos para tu cita no podemos anularla.`:p`Lo sentimos, como faltan menos de ${o} horas para tu cita no podemos anularla.`)}i([o({context:c})],Y.prototype,"loginToken",void 0),i([v({type:String})],Y.prototype,"variant",void 0),i([v({type:String})],Y.prototype,"appointmentId",void 0),i([v({type:Boolean})],Y.prototype,"isVideocall",void 0),i([v({type:Boolean})],Y.prototype,"hasChatSupport",void 0),i([v({type:Number})],Y.prototype,"unreadCount",void 0),i([v({type:Boolean})],Y.prototype,"isModifyUnavailable",void 0),i([v({type:Boolean})],Y.prototype,"isCancelUnavailable",void 0),i([v({type:Boolean})],Y.prototype,"hasNoSlots",void 0),i([v({type:String})],Y.prototype,"modifyUnavailableMessage",void 0),i([v({type:String})],Y.prototype,"cancelUnavailableMessage",void 0),i([v({type:Object})],Y.prototype,"repeatTarget",void 0),i([v({type:String})],Y.prototype,"professionalHash",void 0),i([U()],Y.prototype,"openDialog",void 0),Y=i([l(),n("appointment-card-actions")],Y);let X=class AppointmentCard extends d{constructor(){super(...arguments),this.variant="next",this.detailsVariant="wide",this.isChatOpen=!1,this.isCancelDialogOpen=!1,this.unreadQuery=new s(this,()=>_(k,{roomId:this.appointmentResource?.room?.id})),this.getOrganizationSpecialtiesQuery=new s(this,()=>z(k,{enabled:!!this.appointmentResource?.speciality?.id})),this.getOrganizationSetupQuery=new s(this,()=>j(k)),this.getScheduleServicesQuery=new s(this,()=>O(k))}static{this.styles=m`:host{display:flex}.card{width:100%;padding:var(--sp-6);display:flex;flex-direction:column;gap:var(--sp-4);justify-content:space-between}.card-top-content{display:flex;flex-direction:column;gap:var(--sp-6)}.see-details{color:var(--color-primary-link-default);font-size:var(--text-sm);line-height:var(--text-sm--line-height);font-weight:var(--font-weight-bold)}.see-details:hover{text-decoration:underline}.chevron-down{width:16px;height:16px;transition:transform .2s ease}.appointment-details{display:flex;flex-direction:column;gap:12px}.clock-icon-wrapper{width:24px;height:24px;display:flex;align-items:center;justify-content:center;flex-shrink:0}.clock-icon-wrapper svg{width:100%;height:100%}.appointment-type{display:flex;align-items:center;gap:12px;font-size:18px;color:#2c3e50}.actions{display:flex;gap:var(--sp-3);margin-top:var(--sp-2)}.actions.next{flex-direction:column}.actions-secondary{display:flex;gap:var(--sp-3)}.actions mq-button{flex:1}`}render(){const t=this.appointmentResource.appointment.channel===q.videocall,e=this.appointmentResource.appointment.channel===q.phonecall,i=!0===this.getOrganizationSetupQuery.result?.data?.appointments?.has_chat_in_appointment,n=(t||e)&&i,a=Q(),o=w(this.appointmentResource.appointment.expires_at),s=0===this.appointmentResource.slots.length,p=this.getOrganizationSetupQuery.result?.data?.appointments?.seconds_before_start_to_refund_on_cancel,l=N({startsAtIso:this.appointmentResource.appointment.starts_at,refundPolicySeconds:p}),c=o||s||!l,d=o||!l,m=J({action:"modify",refundPolicySeconds:p}),v=J({action:"cancel",refundPolicySeconds:p}),g=this.getOrganizationSpecialtiesQuery.result?.data?.find(t=>Number(t.id)===Number(this.appointmentResource.speciality.id)),f=D(g?.code??"",a,g?.name??this.appointmentResource.speciality.name),b=this.getScheduleServicesQuery.result?.data?.find(t=>t.id===this.appointmentResource.appointment.service_id)?.code,y=g?.code&&b?{specialty:g.code,service:b}:null;return h`<mq-card class="card" roundness="md"><div class="card-top-content"><professional-overview .specialtyName="${f??""}" .collegiateNumber="${this.appointmentResource.professional.collegiate_number??void 0}" .description="${this.appointmentResource.professional.description??""}" .languages="${this.appointmentResource.professional.languages}" .avatar="${this.appointmentResource.professional.avatar??""}" .name="${this.appointmentResource.professional.name}"></professional-overview><appointment-details .startsAt="${this.appointmentResource.appointment.starts_at}" .duration="${this.appointmentResource.appointment.duration}" .channel="${this.appointmentResource.appointment.channel}" .timezone="${this.loginToken?.patient?.timezone}" variant="${this.detailsVariant}"></appointment-details></div><appointment-card-actions .variant="${this.variant}" .appointmentId="${this.appointmentResource.appointment.id??""}" .isVideocall="${t}" .hasChatSupport="${n}" .unreadCount="${this.unreadQuery.result?.data?.unread_count??0}" .isModifyUnavailable="${c}" .isCancelUnavailable="${d}" .hasNoSlots="${s}" .modifyUnavailableMessage="${m}" .cancelUnavailableMessage="${v}" .repeatTarget="${y}" .professionalHash="${this.appointmentResource.professional.hash}" @toggle-chat="${()=>{this.isChatOpen=!this.isChatOpen,this.isChatOpen&&H.track(I(this.loginToken.patient.hash,this.appointmentResource.appointment.id??""))}}" @request-cancel="${()=>{this.isCancelDialogOpen=!0}}"></appointment-card-actions><mq-floating-bubble ?dismissable="${!1}" .open="${this.isChatOpen}" @mq-close="${()=>{this.isChatOpen=!1}}" hideCloseButton>${this.isChatOpen?h`<mq-chat-room slot="content" .consultationId="${this.appointmentResource.appointment.id}" consultation-type="appointment" token="${this.loginToken.access_token}" .roomId="${this.appointmentResource.room.id}" .professionalHash="${this.appointmentResource.professional.hash}" @mq-chat-room-close="${()=>{this.isChatOpen=!1}}" ?readonly="${o}"></mq-chat-room>`:u}</mq-floating-bubble><cancel-appointment-confirmation-dialog .appointmentId="${this.appointmentResource.appointment.id}" .price="${this.appointmentResource.price??void 0}" .open="${this.isCancelDialogOpen}" @cancel="${()=>{this.isCancelDialogOpen=!1}}" @success="${()=>{this.isCancelDialogOpen=!1,G.success(r("Consulta anulada correctamente")),this.dispatchEvent(new CustomEvent("appointment-cancel-confirmed",{bubbles:!0,composed:!0,detail:{id:this.appointmentResource.appointment.id}}))}}"></cancel-appointment-confirmation-dialog></mq-card>`}};i([v({type:Object})],X.prototype,"appointmentResource",void 0),i([v({type:Number})],X.prototype,"specialtyId",void 0),i([v({type:String})],X.prototype,"variant",void 0),i([v({type:String})],X.prototype,"detailsVariant",void 0),i([o({context:c})],X.prototype,"loginToken",void 0),i([U()],X.prototype,"isChatOpen",void 0),i([U()],X.prototype,"isCancelDialogOpen",void 0),X=i([l(),n("appointment-card")],X);let tt=class AppointmentCardSkeleton extends d{static{this.styles=m`div{border-radius:var(--border-radius-md);background:color-mix(in srgb,var(--color-neutrals-background-disabled) 50%,#fff 50%);height:337px;width:100%}`}render(){return h`<div></div>`}};tt=i([n("appointment-card-skeleton")],tt);let et=class EmptyState extends d{static{this.styles=m`.container{border-radius:var(--border-radius-md);background-color:var(--color-neutrals-background-weak);padding:var(--sp-10) var(--sp-6)}.card{border-radius:var(--border-radius-md);max-width:512px;margin:0 auto;background-color:var(--color-neutrals-background-extraWeak);padding:var(--sp-6);display:flex;flex-direction:column;align-items:center;gap:var(--sp-3)}.card>*{max-width:323px;margin:0 auto}.title{font-family:var(--font-body);font-size:var(--text-lg);line-height:var(--text-lg--line-height);font-weight:var(--font-weight-bold);color:var(--color-neutrals-text-default);margin:0}.description{font-family:var(--font-body);font-size:var(--text-xs);line-height:var(--text-xs--line-height);font-weight:var(--font-weight-normal);text-align:center;color:var(--color-neutrals-text-default);margin:0}@media (min-width:768px){.container{padding:var(--sp-6)}mq-button{max-width:323px}}`}handleRequestAppointment(){this.dispatchEvent(new CustomEvent("request-appointment",{bubbles:!0,composed:!0}))}render(){return h`<div class="container"><div class="card">${function({color:t="currentColor"}){return h`<svg width="31" height="32" viewBox="0 0 31 32" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M29.6 2.4H23.2V0H21.6V2.4H18.4V0H16.8V2.4H13.6V0H12V2.4H8.8V0H7.2V2.4H0.8C0.587827 2.4 0.384344 2.48429 0.234315 2.63431C0.0842855 2.78434 0 2.98783 0 3.2V31.2C0 31.4122 0.0842855 31.6157 0.234315 31.7657C0.384344 31.9157 0.587827 32 0.8 32H29.6C29.8122 32 30.0157 31.9157 30.1657 31.7657C30.3157 31.6157 30.4 31.4122 30.4 31.2V3.2C30.4 2.98783 30.3157 2.78434 30.1657 2.63431C30.0157 2.48429 29.8122 2.4 29.6 2.4ZM28.8 30.4H1.6V10.4H27.2V8.8H1.6V4H7.2V7.2H8.8V4H12V7.2H13.6V4H16.8V7.2H18.4V4H21.6V7.2H23.2V4H28.8V30.4ZM3.2 19.2H9.6V12.8H3.2V19.2ZM4.8 14.4H8V17.6H4.8V14.4ZM20.8 19.2H27.2V12.8H20.8V19.2ZM22.4 14.4H25.6V17.6H22.4V14.4ZM12 19.2H18.4V12.8H12V19.2ZM13.6 14.4H16.8V17.6H13.6V14.4ZM3.2 28H9.6V21.6H3.2V28ZM4.8 23.2H8V26.4H4.8V23.2ZM20.8 28H27.2V21.6H20.8V28ZM22.4 23.2H25.6V26.4H22.4V23.2ZM12 28H18.4V21.6H12V28ZM13.6 23.2H16.8V26.4H13.6V23.2Z" fill="${t}"/></svg>`}({color:"var(--color-primary)"})}<p class="title">${this.title}</p><p class="description">${this.description}</p><mq-button variant="primary" size="md" fullwidth @click="${this.handleRequestAppointment}">${r("Pedir cita")}</mq-button></div></div>`}};function it(t,e){return{queryKey:["appointments",e],queryFn:()=>t.appointments.getAppointments(e)}}i([v({type:String})],et.prototype,"title",void 0),i([v({type:String})],et.prototype,"description",void 0),et=i([n("empty-state")],et);const nt=[C.pending,C.accepted],at=m`.appointments-list{display:grid;grid-template-columns:1fr;gap:var(--sp-6);margin-bottom:var(--sp-6)}@media (min-width:768px){.appointments-list{grid-template-columns:repeat(2,1fr)}}`;let ot=class NextAppointmentsTab extends d{constructor(){super(...arguments),this.getAppointmentsQuery=new s(this,()=>it(k,{status:nt,order:{field:"starts_at",direction:"asc"}}))}static{this.styles=at}render(){return this.getAppointmentsQuery.render({complete:t=>h`${t.data.length>0?h`<div class="appointments-list">${t.data.map(t=>h`<appointment-card .appointmentResource="${t}" .specialtyId="${t.speciality?.id}"></appointment-card>`)}</div>`:h`<empty-state title="${r("No tienes próximas citas")}" description="${r("Agenda una consulta médica cuando la necesites. Aquí verás todos los detalles y podrás gestionar tus próximas citas.")}"></empty-state>`}`,pending:()=>h`<div class="appointments-list"><appointment-card-skeleton></appointment-card-skeleton><appointment-card-skeleton></appointment-card-skeleton><appointment-card-skeleton></appointment-card-skeleton></div>`})}};ot=i([l(),n("next-appointments-tab")],ot);const st=[C.finished,C.reporting];let rt=class AppointmentsHistoryTab extends d{constructor(){super(...arguments),this.getAppointmentsQuery=new s(this,()=>it(k,{status:st,order:{field:"starts_at",direction:"desc"}}))}static{this.styles=m`.appointments-list{display:grid;grid-template-columns:1fr;gap:var(--sp-6);margin-bottom:var(--sp-6)}@media (min-width:768px){.appointments-list{grid-template-columns:repeat(2,1fr)}}`}render(){return this.getAppointmentsQuery.render({complete:t=>h`${t.data.length>0?h`<div class="appointments-list">${t.data.map(t=>h`<appointment-card .appointmentResource="${t}" .specialtyId="${t.speciality?.id}" variant="history"></appointment-card>`)}</div>`:h`<empty-state title="${r("No tienes citas en el historial")}" description="${r("Aquí verás todas las citas que has tenido. Puedes acceder a los documentos de cada consulta y reagendar una cita si es necesario.")}"></empty-state>`}`,pending:()=>h`<div class="appointments-list"><appointment-card-skeleton></appointment-card-skeleton><appointment-card-skeleton></appointment-card-skeleton><appointment-card-skeleton></appointment-card-skeleton></div>`})}};rt=i([l(),n("appointments-history-tab")],rt);const pt=m`.container{display:flex;flex-direction:column;gap:var(--size-3)}h1{font-family:var(--font-titles);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);color:var(--color-neutral-link-dark);margin:0}p{font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutral-link-dark);margin:0}.user-info{display:flex;align-items:center;justify-content:space-between}@media (min-width:768px){h1{font-size:var(--text-3xl);line-height:var(--text-3xl--line-height)}mq-tabs-list{max-width:435px}}`;let lt=class MqMyAppointments extends d{constructor(){super(...arguments),this.tab=F.next}static{this.styles=pt}handleSelect(t){this.dispatchEvent(new MqMyAppointmentsSelectEvent(t.value))}render(){return h`<div class="container"><back-link @mq-back="${t=>{t.stopPropagation(),this.dispatchEvent(new $)}}">${r("Volver al inicio")}</back-link><h1>${r("Mis citas")}</h1><div class="user-info"><p>${r(p`Para: ${this.loginToken.patient.name}`)}</p></div><mq-tabs .value="${this.tab}" @onvaluechange="${this.handleSelect}"><mq-tabs-list><mq-tabs-trigger value="${F.next}">${r("Próximas citas")}</mq-tabs-trigger><mq-tabs-trigger value="${F.history}">${r("Histórico")}</mq-tabs-trigger></mq-tabs-list><mq-tabs-content value="${F.next}"><next-appointments-tab></next-appointments-tab></mq-tabs-content><mq-tabs-content value="${F.history}"><appointments-history-tab></appointments-history-tab></mq-tabs-content></mq-tabs></div>`}};i([o({context:c})],lt.prototype,"loginToken",void 0),i([v({type:String,reflect:!0})],lt.prototype,"tab",void 0),lt=i([l(),n("mq-my-appointments")],lt);const ct=m`:host{display:block}.request-appointment-cta{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:var(--sp-12) var(--sp-4);background:var(--color-card);gap:var(--sp-4)}.title-body{display:flex;flex-direction:column;gap:var(--sp-2);flex:1}.title{font-family:var(--font-titles);font-size:var(--text-2xl);line-height:var(--text-2xl--line-height);font-weight:var(--font-weight-bold);color:var(--color-neutrals-text-default);margin:0;text-align:center}.subtitle{font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);font-weight:var(--font-weight-normal);color:var(--color-neutrals-text-default);margin:0;display:none}mq-button{width:100%}.button-text-desktop{display:none}.button-text-mobile{display:inline}@media (min-width:768px){.request-appointment-cta{flex-direction:row;padding:var(--sp-12) var(--sp-20);gap:var(--sp-2)}.title-body{align-items:flex-start;flex:1;max-width:843px}.title{font-size:var(--text-3xl);line-height:var(--text-3xl--line-height);font-weight:var(--font-weight-extrabold);text-align:left}.subtitle{display:block}mq-button{width:auto;flex-shrink:0;--button-height-md:var(--button-height-lg);--text-sm:var(--text-base);--text-sm--line-height:var(--text-base--line-height)}.button-text-desktop{display:inline}.button-text-mobile{display:none}}`;class RequestAppointmentEvent extends Event{static{this.eventName="request-appointment"}constructor(){super(RequestAppointmentEvent.eventName,{bubbles:!0,composed:!0})}}let dt=class RequestAppointmentCta extends d{static{this.styles=ct}handleRequestAppointment(){this.dispatchEvent(new RequestAppointmentEvent)}render(){return h`<div class="request-appointment-cta"><div class="title-body"><h2 class="title">${r("Nueva cita de especialidades digitales")}</h2><p class="subtitle">${r("Realiza la búsqueda en tu cuadro médico digital")}</p></div><mq-button variant="primary" size="md" fullwidth @click="${this.handleRequestAppointment}"><span class="button-text-mobile">${r("Pedir cita")}</span> <span class="button-text-desktop">${r("Pedir una nueva cita")}</span></mq-button></div>`}};dt=i([l(),n("request-appointment-cta")],dt);export{lt as MqMyAppointments,MqMyAppointmentsSelectEvent,dt as RequestAppointmentCta,RequestAppointmentEvent};
@@ -0,0 +1,17 @@
1
+ import * as lit_html from 'lit-html';
2
+ import { LitElement } from 'lit';
3
+
4
+ /** Variadic constructor signature used by Lit/TS mixins (`TS2545`). */
5
+ type Constructor<T = object> = new (...args: any[]) => T;
6
+
7
+ declare const QueryClientProvider_base: Constructor<{}> & typeof LitElement;
8
+ declare class QueryClientProvider extends QueryClientProvider_base {
9
+ render(): lit_html.TemplateResult<1>;
10
+ }
11
+ declare global {
12
+ interface HTMLElementTagNameMap {
13
+ "mq-query-client-provider": QueryClientProvider;
14
+ }
15
+ }
16
+
17
+ export { QueryClientProvider };