@mediquo/elements 0.5.0 → 0.5.2

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 (87) hide show
  1. package/README.md +3 -1
  2. package/dist/chunks/api-chat-client-1Vz6ZOwp.js +1 -0
  3. package/dist/chunks/{apple-pay-outcomes-CjCnBYOD.js → apple-pay-outcomes-0ozxSHyb.js} +1 -1
  4. package/dist/chunks/appointment-card-skeleton-1c7552Ln.d.ts +398 -0
  5. package/dist/chunks/appointment-card-skeleton-hglMW7x6.js +1 -0
  6. package/dist/chunks/{documentation-view-fFbvjJqx.js → documentation-view-geQU8ttU.js} +1 -1
  7. package/dist/chunks/get-patient-documents-query-DIQH-TMM.js +1 -0
  8. package/dist/chunks/{index-CLdWVaEs.js → index-BBUiLb3Y.js} +1 -1
  9. package/dist/chunks/index-BJYWtEmT.js +1 -0
  10. package/dist/chunks/{index-Xcn-xs13.js → index-Bx8TWBsk.js} +1 -1
  11. package/dist/chunks/{price-BmA2Dl9f.js → price-DIhNpS8n.js} +1 -1
  12. package/dist/chunks/{refund-cancel-policy-D_tUYPyv.js → refund-cancel-policy-BQDnePq9.js} +1 -1
  13. package/dist/chunks/{schemas.d-BEA8Pl6w.d.ts → schemas.d-5CaMrfOq.d.ts} +6 -0
  14. package/dist/chunks/telemetry-client-BLJVs9me.js +1 -0
  15. package/dist/env.js +1 -1
  16. package/dist/events.d.ts +56 -1
  17. package/dist/events.js +1 -1
  18. package/dist/index.d.ts +1 -1
  19. package/dist/index.js +1 -1
  20. package/dist/mq-apple-pay-checkout.js +1 -1
  21. package/dist/mq-appointment-checkout.d.ts +1 -1
  22. package/dist/mq-appointment-checkout.js +1 -1
  23. package/dist/mq-appointment-documentation.js +1 -1
  24. package/dist/mq-chat-room.js +1 -1
  25. package/dist/mq-checkout.js +1 -1
  26. package/dist/mq-dashboard.d.ts +224 -0
  27. package/dist/mq-dashboard.js +1 -0
  28. package/dist/mq-documents.js +1 -1
  29. package/dist/mq-google-pay-checkout.js +1 -1
  30. package/dist/mq-immediate-videocall-checkout.js +1 -1
  31. package/dist/mq-my-appointments.d.ts +9 -391
  32. package/dist/mq-my-appointments.js +1 -1
  33. package/dist/mq-payment-poller.d.ts +61 -0
  34. package/dist/mq-payment-poller.js +1 -0
  35. package/dist/mq-professional-presence-sync.js +1 -1
  36. package/dist/mq-schedule-success.js +2 -2
  37. package/dist/mq-schedule.d.ts +8 -2
  38. package/dist/mq-schedule.js +1 -1
  39. package/dist/mq-support-chat.d.ts +1 -1
  40. package/dist/mq-support-chat.js +1 -1
  41. package/dist/mq-terms-and-conditions.js +1 -1
  42. package/dist/mq-unread-count-sync.js +1 -1
  43. package/dist/mq-videocall.js +1 -1
  44. package/dist/react/mq-apple-pay-checkout.d.ts +24 -7
  45. package/dist/react/mq-apple-pay-checkout.js +1 -1
  46. package/dist/react/mq-appointment-checkout.d.ts +21 -6
  47. package/dist/react/mq-appointment-checkout.js +1 -1
  48. package/dist/react/mq-appointment-documentation.d.ts +17 -6
  49. package/dist/react/mq-appointment-documentation.js +1 -1
  50. package/dist/react/mq-chat-room.d.ts +30 -7
  51. package/dist/react/mq-chat-room.js +1 -1
  52. package/dist/react/mq-checkout.d.ts +22 -8
  53. package/dist/react/mq-checkout.js +1 -1
  54. package/dist/react/mq-dashboard.d.ts +57 -0
  55. package/dist/react/mq-dashboard.js +2 -0
  56. package/dist/react/mq-documents.d.ts +16 -2
  57. package/dist/react/mq-documents.js +1 -1
  58. package/dist/react/mq-google-pay-checkout.d.ts +29 -7
  59. package/dist/react/mq-google-pay-checkout.js +1 -1
  60. package/dist/react/mq-immediate-videocall-checkout.d.ts +15 -5
  61. package/dist/react/mq-immediate-videocall-checkout.js +1 -1
  62. package/dist/react/mq-my-appointments.d.ts +26 -6
  63. package/dist/react/mq-my-appointments.js +1 -1
  64. package/dist/react/mq-payment-poller.d.ts +33 -0
  65. package/dist/react/mq-payment-poller.js +2 -0
  66. package/dist/react/mq-professional-presence-sync.d.ts +8 -2
  67. package/dist/react/mq-professional-presence-sync.js +1 -1
  68. package/dist/react/mq-query-client-provider.d.ts +9 -2
  69. package/dist/react/mq-schedule-success.d.ts +30 -7
  70. package/dist/react/mq-schedule-success.js +1 -1
  71. package/dist/react/mq-schedule.d.ts +47 -8
  72. package/dist/react/mq-schedule.js +1 -1
  73. package/dist/react/mq-session-provider.d.ts +11 -2
  74. package/dist/react/mq-socket-provider.d.ts +13 -2
  75. package/dist/react/mq-support-chat.d.ts +31 -2
  76. package/dist/react/mq-support-chat.js +1 -1
  77. package/dist/react/mq-terms-and-conditions.d.ts +21 -5
  78. package/dist/react/mq-terms-and-conditions.js +1 -1
  79. package/dist/react/mq-theme-provider.d.ts +13 -2
  80. package/dist/react/mq-toast-container.d.ts +10 -2
  81. package/dist/react/mq-unread-count-sync.d.ts +8 -2
  82. package/dist/react/mq-unread-count-sync.js +1 -1
  83. package/dist/react/mq-videocall.d.ts +30 -12
  84. package/dist/react/mq-videocall.js +1 -1
  85. package/package.json +9 -1
  86. package/dist/chunks/api-chat-client-CqMn2JEn.js +0 -1
  87. package/dist/chunks/telemetry-client-Ca71sobH.js +0 -1
@@ -0,0 +1,61 @@
1
+ import * as lit_html from 'lit-html';
2
+ import * as lit from 'lit';
3
+ import { LitElement, PropertyValues } from 'lit';
4
+ import { Env } from './env.js';
5
+ export { MqPaymentSucceededEvent } from './events.js';
6
+
7
+ /**
8
+ * Resolves a payment session started elsewhere, on a screen of its own.
9
+ *
10
+ * Gateways that take the user off-site (Stripe) come back to a URL the backend
11
+ * configured, at which point the booking is decided but nothing on the client
12
+ * knows it yet. This element is what that return URL renders: give it the
13
+ * session id and it polls `GET /payments/v1/session/{id}` until the session
14
+ * reaches a terminal state.
15
+ *
16
+ * It deliberately emits **only** `mq-payment-succeeded`. Rejected and
17
+ * unconfirmable payments stay here and are rendered in place — the host has no
18
+ * better screen for them and no decision to make — so the integrator wires one
19
+ * listener and, on success, navigates to `mq-schedule-success` with the
20
+ * appointment id it receives.
21
+ *
22
+ * @fires mq-payment-succeeded - The session reached `paid`. Carries the created
23
+ * appointment id, so the host can route straight to the confirmation screen.
24
+ */
25
+ declare class MqPaymentPoller extends LitElement {
26
+ static styles: lit.CSSResult;
27
+ /** Session to resolve, as returned when the payment was started. */
28
+ sessionId?: string;
29
+ /** Organization API key. Standalone hosts only. */
30
+ apiKey?: string;
31
+ /** Patient session token. Standalone hosts only. */
32
+ token?: string;
33
+ /** Locale override ("es_ES" | "en_GB" | …). Optional. */
34
+ locale?: string;
35
+ /** Environment override ("development" | "production"). Optional. */
36
+ env?: Env;
37
+ /** How long to keep polling before showing the timeout screen. */
38
+ timeoutMs: number;
39
+ private _view;
40
+ private _intervalId?;
41
+ private _deadline;
42
+ private _settled;
43
+ protected willUpdate(changed: PropertyValues<this>): void;
44
+ protected updated(changed: PropertyValues<this>): void;
45
+ disconnectedCallback(): void;
46
+ private _restart;
47
+ private _stop;
48
+ private _settle;
49
+ private _pollOnce;
50
+ private _renderVerifying;
51
+ private _renderDenied;
52
+ private _renderTimeout;
53
+ render(): lit_html.TemplateResult<1>;
54
+ }
55
+ declare global {
56
+ interface HTMLElementTagNameMap {
57
+ "mq-payment-poller": MqPaymentPoller;
58
+ }
59
+ }
60
+
61
+ export { MqPaymentPoller };
@@ -0,0 +1 @@
1
+ import{isValidLocale as t,setLocale as e,initLocalization as i}from"./i18n.js";import{_ as s,t as o}from"./chunks/custom-element-DA9Fxvxd.js";import{m as r}from"./chunks/runtime-Bg1WXVCx.js";import{l as a}from"./chunks/localized-decorator-BlOuLhym.js";import{a as n,P as l}from"./chunks/api-chat-client-1Vz6ZOwp.js";import{i as p,a as d,x as c}from"./chunks/lit-element-DiWJYFwC.js";import{n as h}from"./chunks/property-scuRaFcM.js";import{r as m}from"./chunks/state-LQivXIgA.js";import{setEnv as u}from"./env.js";import{MqPaymentSucceededEvent as v}from"./events.js";import{spinnerIcon as f}from"./ui/icons/spinner-icon.js";import"./chunks/chunk-4FFT6DC2-CVWibomC.js";import"./chunks/external-CJj32K_p.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";import"./ui/icons/types.js";const y=p`:host{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:320px;padding:var(--sp-8)}.panel{display:flex;flex-direction:column;align-items:center;gap:var(--sp-4);width:100%;max-width:480px;box-sizing:border-box;padding:var(--sp-8);text-align:center}.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}.message{font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);color:var(--color-neutrals-text-subtle);margin:0}`;let g=class MqPaymentPoller extends d{constructor(){super(...arguments),this.timeoutMs=9e4,this._view="verifying",this._deadline=0,this._settled=!1}static{this.styles=y}willUpdate(i){i.has("env")&&this.env&&u(this.env),i.has("apiKey")&&this.apiKey&&n.setApiKey(this.apiKey),i.has("token")&&this.token&&n.setAuthToken(this.token),i.has("locale")&&this.locale&&t(this.locale)&&(e(this.locale),n.setLanguage(this.locale))}updated(t){t.has("sessionId")&&this._restart()}disconnectedCallback(){this._stop(),super.disconnectedCallback()}_restart(){this._stop(),this._settled=!1,this._view="verifying",this.sessionId&&(this._deadline=Date.now()+this.timeoutMs,this._pollOnce(),this._intervalId=setInterval(()=>{this._pollOnce()},2e3))}_stop(){void 0!==this._intervalId&&(clearInterval(this._intervalId),this._intervalId=void 0)}_settle(t){this._stop(),this._settled=!0,this._view=t}async _pollOnce(){const t=this.sessionId;if(this._settled||!t)return;if(Date.now()>=this._deadline)return void this._settle("timeout");let e;try{e=await n.payments.getPaymentSession(t)}catch{return}return this._settled||t!==this.sessionId?void 0:e.status===l.Paid?(this._stop(),this._settled=!0,void this.dispatchEvent(new v({appointmentId:e.consultation_id,consultationType:e.consultation_type}))):void(e.status===l.Denied&&this._settle("denied"))}_renderVerifying(){return c`<div class="panel" role="status" aria-live="polite">${f({size:40,color:"var(--color-primary-default)"})}<p class="message">${r("Verificando tu pago...")}</p></div>`}_renderDenied(){return c`<div class="panel" role="alert"><p class="title">${r("Tu pago no se ha completado")}</p><p class="message">${r("El pago ha sido rechazado y no hemos creado la cita. No se te ha cobrado nada: vuelve a intentarlo con otro método de pago.")}</p></div>`}_renderTimeout(){return c`<div class="panel" role="alert"><p class="title">${r("No hemos podido confirmar tu pago")}</p><p class="message">${r("Ha ocurrido un problema al verificar el estado de tu pago. Por favor, contacta con soporte si el cargo se ha realizado.")}</p></div>`}render(){switch(this._view){case"denied":return this._renderDenied();case"timeout":return this._renderTimeout();default:return this._renderVerifying()}}};s([h({type:String,attribute:"session-id"})],g.prototype,"sessionId",void 0),s([h({type:String,attribute:"api-key"})],g.prototype,"apiKey",void 0),s([h({type:String,attribute:"token"})],g.prototype,"token",void 0),s([h({type:String,attribute:"locale"})],g.prototype,"locale",void 0),s([h({type:String,attribute:"env"})],g.prototype,"env",void 0),s([h({type:Number,attribute:"timeout-ms"})],g.prototype,"timeoutMs",void 0),s([m()],g.prototype,"_view",void 0),g=s([a(),o("mq-payment-poller")],g),i();export{g as MqPaymentPoller,v as MqPaymentSucceededEvent};
@@ -1 +1 @@
1
- import{_ as e,t as s}from"./chunks/custom-element-DA9Fxvxd.js";import{a as t,E as n}from"./chunks/lit-element-DiWJYFwC.js";import{s as r}from"./chunks/context-consumer-ESdICVAb.js";import{Q as c}from"./chunks/chunk-RCFIJTXZ-C6Ir0-sM.js";import{S as o,a as i}from"./chunks/chunk-YTQUGGS3-DmCGIoFy.js";import{g as a}from"./chunks/chunk-YMQSBQHL-De_r7BNk.js";import{g as h,a as l}from"./chunks/api-chat-client-CqMn2JEn.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/external-CJj32K_p.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";import"./env.js";class ProfessionalPresenceSyncController{constructor(e){this.host=e,this.clearTimers=new Map,this._onAbsenceCreated=e=>{if(!e?.professional_hash||!e.finishes_at)return;const{professional_hash:s,id:t,finishes_at:n}=e;this._setActiveAbsence(s,{id:t,finishes_at:n}),this._clearTimer(s);const r=h(n).getTime()-Date.now();r>0&&r<2147483647&&this.clearTimers.set(s,setTimeout(()=>{this.clearTimers.delete(s),this._setActiveAbsence(s,null)},r))},this._onAbsenceCancelled=e=>{e?.professional_hash&&(this._clearTimer(e.professional_hash),this._setActiveAbsence(e.professional_hash,null))},new r(this.host,{context:o,subscribe:!0,callback:e=>{e&&e!==this.socket&&(this.socket=e,this.socket.on(i.absence_created,this._onAbsenceCreated),this.socket.on(i.absence_cancelled,this._onAbsenceCancelled))}}),new r(this.host,{context:c,subscribe:!0,callback:e=>{e&&(this.queryClient=e)}}),this.host.addController(this)}_queryKey(e){return a(l,{hash:e}).queryKey}_setActiveAbsence(e,s){this.queryClient?.setQueryData(this._queryKey(e),e=>e?{...e,active_absence:s}:void 0)}_clearTimer(e){const s=this.clearTimers.get(e);s&&(clearTimeout(s),this.clearTimers.delete(e))}hostConnected(){}hostDisconnected(){this.socket?.off(i.absence_created,this._onAbsenceCreated),this.socket?.off(i.absence_cancelled,this._onAbsenceCancelled);for(const e of this.clearTimers.values())clearTimeout(e);this.clearTimers.clear()}}let m=class MqProfessionalPresenceSync extends t{constructor(){super(...arguments),this._controller=new ProfessionalPresenceSyncController(this)}createRenderRoot(){return this}render(){return n}};m=e([s("mq-professional-presence-sync")],m);export{m as MqProfessionalPresenceSync,ProfessionalPresenceSyncController};
1
+ import{_ as e,t as s}from"./chunks/custom-element-DA9Fxvxd.js";import{a as t,E as n}from"./chunks/lit-element-DiWJYFwC.js";import{s as r}from"./chunks/context-consumer-ESdICVAb.js";import{Q as c}from"./chunks/chunk-RCFIJTXZ-C6Ir0-sM.js";import{S as o,a as i}from"./chunks/chunk-YTQUGGS3-DmCGIoFy.js";import{g as a}from"./chunks/chunk-YMQSBQHL-De_r7BNk.js";import{g as h,a as l}from"./chunks/api-chat-client-1Vz6ZOwp.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/create-context-DqP79qjF.js";import"./chunks/external-CJj32K_p.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";import"./env.js";class ProfessionalPresenceSyncController{constructor(e){this.host=e,this.clearTimers=new Map,this._onAbsenceCreated=e=>{if(!e?.professional_hash||!e.finishes_at)return;const{professional_hash:s,id:t,finishes_at:n}=e;this._setActiveAbsence(s,{id:t,finishes_at:n}),this._clearTimer(s);const r=h(n).getTime()-Date.now();r>0&&r<2147483647&&this.clearTimers.set(s,setTimeout(()=>{this.clearTimers.delete(s),this._setActiveAbsence(s,null)},r))},this._onAbsenceCancelled=e=>{e?.professional_hash&&(this._clearTimer(e.professional_hash),this._setActiveAbsence(e.professional_hash,null))},new r(this.host,{context:o,subscribe:!0,callback:e=>{e&&e!==this.socket&&(this.socket=e,this.socket.on(i.absence_created,this._onAbsenceCreated),this.socket.on(i.absence_cancelled,this._onAbsenceCancelled))}}),new r(this.host,{context:c,subscribe:!0,callback:e=>{e&&(this.queryClient=e)}}),this.host.addController(this)}_queryKey(e){return a(l,{hash:e}).queryKey}_setActiveAbsence(e,s){this.queryClient?.setQueryData(this._queryKey(e),e=>e?{...e,active_absence:s}:void 0)}_clearTimer(e){const s=this.clearTimers.get(e);s&&(clearTimeout(s),this.clearTimers.delete(e))}hostConnected(){}hostDisconnected(){this.socket?.off(i.absence_created,this._onAbsenceCreated),this.socket?.off(i.absence_cancelled,this._onAbsenceCancelled);for(const e of this.clearTimers.values())clearTimeout(e);this.clearTimers.clear()}}let m=class MqProfessionalPresenceSync extends t{constructor(){super(...arguments),this._controller=new ProfessionalPresenceSyncController(this)}createRenderRoot(){return this}render(){return n}};m=e([s("mq-professional-presence-sync")],m);export{m as MqProfessionalPresenceSync,ProfessionalPresenceSyncController};
@@ -1,4 +1,4 @@
1
- import{isValidLocale as t,setLocale as e,getLocale as i,initLocalization as o}from"./i18n.js";import{_ as n,t as a}from"./chunks/custom-element-DA9Fxvxd.js";import{m as s,s as r}from"./chunks/runtime-Bg1WXVCx.js";import{l as c}from"./chunks/localized-decorator-BlOuLhym.js";import{i as p,a as l,x as d,E as m}from"./chunks/lit-element-DiWJYFwC.js";import{n as u}from"./chunks/property-scuRaFcM.js";import{r as h}from"./chunks/state-LQivXIgA.js";import{setEnv as v}from"./env.js";import{MqViewAppointmentsEvent as g,MqHomeEvent as f}from"./events.js";import{a as k,A as y,g as b,C as x}from"./chunks/api-chat-client-CqMn2JEn.js";import{checkIcon as j}from"./ui/icons/check-icon.js";import"./ui/mq-callout.js";import"./ui/mq-button.js";import{c as w}from"./chunks/consume-CovVqBjI.js";import{l as $}from"./chunks/chunk-S5RWG6G2-DPesx3Od.js";import"./chunks/professional-overview-CfjgnTw4.js";import{f as q}from"./chunks/price-BmA2Dl9f.js";import{Q as C}from"./chunks/query-controller-BlO1Ax65.js";import{g as _}from"./chunks/get-appointment-query-Ck68BEMg.js";import{g as S}from"./chunks/get-organization-setup-query-BMbuRi6v.js";import{g as z}from"./chunks/get-patient-profile-query-B0tUDJmT.js";import{g as I}from"./chunks/chunk-GZF3YFSX-DM-GTqxg.js";import{calendarIcon as Q}from"./ui/icons/calendar-icon.js";import{chatbubbleIcon as A}from"./ui/icons/chat-bubble-icon.js";import{videoIcon as O}from"./ui/icons/video-icon.js";import"./mq-chat-room.js";import"./ui/mq-floating-bubble.js";import"./ui/mq-unread-badge.js";import{g as T,a as P}from"./chunks/i18n-formats-DYS91YEa.js";import"./ui/mq-skeleton.js";import"./ui/mq-card.js";import{Q as E}from"./chunks/chunk-RCFIJTXZ-C6Ir0-sM.js";import{t as N,e as V,a as F,f as H,g as B,h as K}from"./chunks/telemetry-client-Ca71sobH.js";import"./chunks/chunk-4FFT6DC2-CVWibomC.js";import"./chunks/external-CJj32K_p.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";import"./ui/icons/types.js";import"./ui/icons/info-circle-outine-icon.js";import"./chunks/class-map-Co76I6aw.js";import"./chunks/directive-2EDmOukv.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/create-context-DqP79qjF.js";import"./ui/icons/chevron-down-icon.js";import"./chunks/if-defined-BYeVdwgd.js";import"./ui/mq-text-button.js";import"./ui/mq-avatar.js";import"./ui/icons/briefcase-icon.js";import"./ui/icons/clock-icon.js";import"./ui/icons/message-bubble-icon.js";import"./ui/icons/phone-icon.js";import"./chunks/query-Cjvi4_dT.js";import"./chunks/provide-D2fnEhT2.js";import"./chunks/context-provider--AKuwfs9.js";import"./theme.js";import"./ui/icons/x-icon.js";import"./chunks/chunk-YMQSBQHL-De_r7BNk.js";import"./ui/icons/chevron-left-icon.js";import"./chunks/query-CeeutdfT.js";import"./ui/icons/check-double-icon.js";import"./chunks/chunk-YTQUGGS3-DmCGIoFy.js";import"./chunks/mutation-controller-CR2qcqhH.js";import"./chunks/style-map-CIdqdn7C.js";const G=p`header{padding:var(--sp-6) var(--sp-4);display:flex;align-items:center;gap:var(--sp-2);max-width:var(--content-max-width);margin:0 auto}.summary{padding:var(--sp-6) var(--sp-4);background-color:var(--color-neutrals-background-weak);max-width:var(--content-max-width);margin:0 auto}.summary-content{display:flex;flex-direction:column;gap:var(--sp-4)}.manage-appointment{box-sizing:border-box;max-width:var(--content-max-width);margin:0 auto}`;let M=class MqScheduleSuccessSkeleton extends l{static{this.styles=G}render(){return d`<div><header><mq-skeleton width="220px" height="40px" border-radius="md"></mq-skeleton></header><div class="summary"><div class="summary-content"><mq-skeleton width="280px" height="32px" border-radius="md"></mq-skeleton><mq-skeleton width="100%" height="400px" border-radius="lg"></mq-skeleton><mq-skeleton width="100%" height="80px" border-radius="lg"></mq-skeleton></div></div><div class="manage-appointment"><mq-skeleton width="100%" height="313px" border-radius="lg"></mq-skeleton></div></div>`}};M=n([a("mq-schedule-success-skeleton")],M);const R=p`.success-title{display:flex;align-items:center;gap:var(--sp-2);margin-bottom:var(--sp-4)}header h1{font-family:var(--font-titles);font-size:var(--text-3xl);line-height:var(--text-3xl--line-height);font-weight:var(--font-weight-bold);margin: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;margin-bottom:var(--sp-6)}.summary{padding:var(--sp-6) var(--sp-4)}.professional-card{padding:var(--sp-4)}.appointment-summary{margin-bottom:var(--sp-2);display:flex;flex-direction:column;gap:var(--sp-4)}.add-to-calendar-container{padding-top:var(--sp-4);border-top:1px solid var(--color-neutrals-border-disabled)}.price-breakdown{display:flex;flex-direction:column;gap:var(--sp-2)}.price-row{display:flex;justify-content:space-between;gap:var(--sp-4);font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);color:var(--color-neutrals-text-default)}.price-row--total{font-weight:var(--font-weight-semibold)}.price-breakdown hr{width:100%;border:none;border-top:1px solid var(--color-neutrals-border-disabled);margin:var(--sp-1) 0}.floating-content{height:100%}.actions{display:flex;flex-direction:column;gap:var(--sp-4)}@media (min-width:768px){.actions{flex-direction:row}}.footer-cta{margin-top:var(--sp-4);padding:var(--sp-6) var(--sp-4)}.footer-cta h2{margin-bottom:var(--sp-2)}.footer-cta .description{font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);color:var(--color-neutrals-text-default);margin:0 0 var(--sp-6)}.footer-cta .actions{display:flex;flex-direction:column;gap:var(--sp-3)}`;class OpenVideocallEvent extends Event{static{this.eventName="open-videocall"}constructor(t){super(OpenVideocallEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}let U=class MqScheduleSuccess extends l{constructor(){super(...arguments),this.kind="schedule",this.showNavCtas=!1,this._trackedPageView=!1,this.getPatientProfileQuery=new C(this,()=>z(k)),this.getAppointmentQuery=new C(this,()=>_(k,{id:this.appointmentId})),this.getCouponQuery=new C(this,()=>{return t=k,e={appointmentId:this.appointmentId},i={enabled:!!this.appointmentId},{queryKey:["appointment-consultation-coupon",e.appointmentId],queryFn:()=>t.payments.getAppointmentConsultationCoupon(e.appointmentId),retry:!1,...i};var t,e,i}),this.getOrganizationSpecialtiesQuery=new C(this,()=>T(k)),this.getOrganizationSetupQuery=new C(this,()=>S(k)),this.isChatOpen=!1,this.unreadQuery=new C(this,()=>I(k,{roomId:Number(this.getAppointmentQuery.result?.data?.room_id)},{enabled:!!this.getAppointmentQuery.result?.data?.room_id})),this._getCalloutText=t=>{switch(t.channel){case y.videocall:return s("Te enviaremos un enlace al email indicado cuando sea el momento de conectarte a la vídeoconsulta. Asegúrate de tener buena conexión a internet y un dispositivo con cámara y micrófono.");case y.phonecall:return s(r`El profesional te llamará al
1
+ import{isValidLocale as t,setLocale as e,getLocale as i,initLocalization as o}from"./i18n.js";import{_ as n,t as a}from"./chunks/custom-element-DA9Fxvxd.js";import{m as s,s as r}from"./chunks/runtime-Bg1WXVCx.js";import{l as c}from"./chunks/localized-decorator-BlOuLhym.js";import{i as p,a as l,x as d,E as m}from"./chunks/lit-element-DiWJYFwC.js";import{n as u}from"./chunks/property-scuRaFcM.js";import{r as h}from"./chunks/state-LQivXIgA.js";import{setEnv as v}from"./env.js";import{MqViewAppointmentsEvent as g,MqHomeEvent as f}from"./events.js";import{a as k,A as y,g as b,C as x}from"./chunks/api-chat-client-1Vz6ZOwp.js";import{checkIcon as j}from"./ui/icons/check-icon.js";import"./ui/mq-callout.js";import"./ui/mq-button.js";import{c as w}from"./chunks/consume-CovVqBjI.js";import{l as $}from"./chunks/chunk-S5RWG6G2-DPesx3Od.js";import"./chunks/professional-overview-CfjgnTw4.js";import{f as q}from"./chunks/price-DIhNpS8n.js";import{Q as C}from"./chunks/query-controller-BlO1Ax65.js";import{g as _}from"./chunks/get-appointment-query-Ck68BEMg.js";import{g as S}from"./chunks/get-organization-setup-query-BMbuRi6v.js";import{g as z}from"./chunks/get-patient-profile-query-B0tUDJmT.js";import{g as I}from"./chunks/chunk-GZF3YFSX-DM-GTqxg.js";import{calendarIcon as O}from"./ui/icons/calendar-icon.js";import{chatbubbleIcon as Q}from"./ui/icons/chat-bubble-icon.js";import{videoIcon as A}from"./ui/icons/video-icon.js";import"./mq-chat-room.js";import"./ui/mq-floating-bubble.js";import"./ui/mq-unread-badge.js";import{g as T,a as P}from"./chunks/i18n-formats-DYS91YEa.js";import"./ui/mq-skeleton.js";import"./ui/mq-card.js";import{Q as E}from"./chunks/chunk-RCFIJTXZ-C6Ir0-sM.js";import{t as N,e as V,a as F,f as H,g as B,h as G}from"./chunks/telemetry-client-BLJVs9me.js";import"./chunks/chunk-4FFT6DC2-CVWibomC.js";import"./chunks/external-CJj32K_p.js";import"./chunks/parseISO-Dj3qSTG8.js";import"./chunks/format-CRFiCNHw.js";import"./chunks/isBefore-CPpTogxo.js";import"./ui/icons/types.js";import"./ui/icons/info-circle-outine-icon.js";import"./chunks/class-map-Co76I6aw.js";import"./chunks/directive-2EDmOukv.js";import"./chunks/context-consumer-ESdICVAb.js";import"./chunks/context-request-event-Dfydf1ub.js";import"./chunks/create-context-DqP79qjF.js";import"./ui/icons/chevron-down-icon.js";import"./chunks/if-defined-BYeVdwgd.js";import"./ui/mq-text-button.js";import"./ui/mq-avatar.js";import"./ui/icons/briefcase-icon.js";import"./ui/icons/clock-icon.js";import"./ui/icons/message-bubble-icon.js";import"./ui/icons/phone-icon.js";import"./chunks/query-Cjvi4_dT.js";import"./chunks/provide-D2fnEhT2.js";import"./chunks/context-provider--AKuwfs9.js";import"./theme.js";import"./ui/icons/x-icon.js";import"./chunks/chunk-YMQSBQHL-De_r7BNk.js";import"./ui/icons/chevron-left-icon.js";import"./chunks/query-CeeutdfT.js";import"./ui/icons/check-double-icon.js";import"./chunks/chunk-YTQUGGS3-DmCGIoFy.js";import"./chunks/mutation-controller-CR2qcqhH.js";import"./chunks/style-map-CIdqdn7C.js";const K=p`header{padding:var(--sp-6) var(--sp-4);display:flex;align-items:center;gap:var(--sp-2);max-width:var(--content-max-width);margin:0 auto}.summary{padding:var(--sp-6) var(--sp-4);background-color:var(--color-neutrals-background-weak);max-width:var(--content-max-width);margin:0 auto}.summary-content{display:flex;flex-direction:column;gap:var(--sp-4)}.manage-appointment{box-sizing:border-box;max-width:var(--content-max-width);margin:0 auto}`;let M=class MqScheduleSuccessSkeleton extends l{static{this.styles=K}render(){return d`<div><header><mq-skeleton width="220px" height="40px" border-radius="md"></mq-skeleton></header><div class="summary"><div class="summary-content"><mq-skeleton width="280px" height="32px" border-radius="md"></mq-skeleton><mq-skeleton width="100%" height="400px" border-radius="lg"></mq-skeleton><mq-skeleton width="100%" height="80px" border-radius="lg"></mq-skeleton></div></div><div class="manage-appointment"><mq-skeleton width="100%" height="313px" border-radius="lg"></mq-skeleton></div></div>`}};M=n([a("mq-schedule-success-skeleton")],M);const R=p`.success-title{display:flex;align-items:center;gap:var(--sp-2);margin-bottom:var(--sp-4)}header h1{font-family:var(--font-titles);font-size:var(--text-3xl);line-height:var(--text-3xl--line-height);font-weight:var(--font-weight-bold);margin: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;margin-bottom:var(--sp-6)}.summary{padding:var(--sp-6) var(--sp-4)}.professional-card{padding:var(--sp-4)}.appointment-summary{margin-bottom:var(--sp-2);display:flex;flex-direction:column;gap:var(--sp-4)}.add-to-calendar-container{padding-top:var(--sp-4);border-top:1px solid var(--color-neutrals-border-disabled)}.price-breakdown{display:flex;flex-direction:column;gap:var(--sp-2)}.price-row{display:flex;justify-content:space-between;gap:var(--sp-4);font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);color:var(--color-neutrals-text-default)}.price-row--total{font-weight:var(--font-weight-semibold)}.price-breakdown hr{width:100%;border:none;border-top:1px solid var(--color-neutrals-border-disabled);margin:var(--sp-1) 0}.floating-content{height:100%}.actions{display:flex;flex-direction:column;gap:var(--sp-4)}@media (min-width:768px){.actions{flex-direction:row}}.footer-cta{margin-top:var(--sp-4);padding:var(--sp-6) var(--sp-4)}.footer-cta h2{margin-bottom:var(--sp-2)}.footer-cta .description{font-family:var(--font-body);font-size:var(--text-base);line-height:var(--text-base--line-height);color:var(--color-neutrals-text-default);margin:0 0 var(--sp-6)}.footer-cta .actions{display:flex;flex-direction:column;gap:var(--sp-3)}`;class OpenVideocallEvent extends Event{static{this.eventName="open-videocall"}constructor(t){super(OpenVideocallEvent.eventName,{bubbles:!0,composed:!0}),this.detail=t}}let U=class MqScheduleSuccess extends l{constructor(){super(...arguments),this.kind="schedule",this.showNavCtas=!1,this._trackedPageView=!1,this.getPatientProfileQuery=new C(this,()=>z(k)),this.getAppointmentQuery=new C(this,()=>_(k,{id:this.appointmentId})),this.getCouponQuery=new C(this,()=>{return t=k,e={appointmentId:this.appointmentId},i={enabled:!!this.appointmentId},{queryKey:["appointment-consultation-coupon",e.appointmentId],queryFn:()=>t.payments.getAppointmentConsultationCoupon(e.appointmentId),retry:!1,...i};var t,e,i}),this.getOrganizationSpecialtiesQuery=new C(this,()=>T(k)),this.getOrganizationSetupQuery=new C(this,()=>S(k)),this.isChatOpen=!1,this.unreadQuery=new C(this,()=>I(k,{roomId:Number(this.getAppointmentQuery.result?.data?.room_id)},{enabled:!!this.getAppointmentQuery.result?.data?.room_id})),this._getCalloutText=t=>{switch(t.channel){case y.videocall:return s("Te enviaremos un enlace al email indicado cuando sea el momento de conectarte a la vídeoconsulta. Asegúrate de tener buena conexión a internet y un dispositivo con cámara y micrófono.");case y.phonecall:return s(r`El profesional te llamará al
2
2
  ${this.getPatientProfileQuery.result?.data?.profile.phone??""} en el horario
3
3
  seleccionado. Asegúrate de tener buena cobertura y poder atender en
4
- el horario elegido.`);case y.chat:return s("El profesional te enviará un mensaje para que podamos coordinar la cita. Asegúrate de tener buena cobertura y poder atender en el horario elegido.");default:return m}}}static{this.styles=R}get _accessToken(){return this.token??this.loginToken?.access_token}get _timezone(){return this.timezone||Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}willUpdate(i){i.has("env")&&this.env&&v(this.env),i.has("apiKey")&&this.apiKey&&k.setApiKey(this.apiKey),i.has("token")&&this.token&&k.setAuthToken(this.token),i.has("locale")&&this.locale&&t(this.locale)&&(e(this.locale),k.setLanguage(this.locale))}get _patientHash(){return this.getPatientProfileQuery.result?.data?.hash??""}connectedCallback(){super.connectedCallback(),this.queryClientContext?.invalidateQueries()}updated(){!this._trackedPageView&&this._patientHash&&(this._trackedPageView=!0,N.track(V(this._patientHash,this.appointmentId)))}renderPriceBreakdown(t,e,i){const o=t.price;if(null==o||o<=0)return m;const n=t.currency??"EUR",a=t.discount_amount??0,r=a>0,c=o-a,p=this.getCouponQuery.result?.data,l=p?.name??p?.code,u=r?p?.percent_off??Math.round(a/o*100):0,h=l?`${s("Promoción")} ${l}`:s("Promoción");return d`<div class="price-breakdown"><div class="price-row"><span>${i}</span> <span>${q({amount:o,currency:n},e)}</span></div>${r?d`<div class="price-row"><span>${h} (-${u}%)</span> <span>${q({amount:-a,currency:n},e)}</span></div><hr><div class="price-row price-row--total"><span>${s("Total")}</span> <span>${q({amount:c,currency:n},e)}</span></div>`:m}</div>`}render(){return this.getAppointmentQuery.render({pending:()=>d`<mq-schedule-success-skeleton></mq-schedule-success-skeleton>`,complete:t=>{const e=i(),o=b(t.start_date),n=F(o,t.duration),a=this.getOrganizationSpecialtiesQuery.result?.data?.find(e=>e.id===Number(t.speciality_id)),c=P(a?.code??"",e,a?.name),p=t.channel===y.videocall,l=t.channel===y.phonecall,u=!0===this.getOrganizationSetupQuery.result?.data?.appointments?.has_chat_in_appointment,h=(p||l)&&u,v=this._accessToken;return d`<div><header><div class="success-title">${j()}<h1>${"schedule"===this.kind?s("Cita confirmada"):s("Cita modificada")}</h1></div><h2>${s(r`Resumen de la cita para ${t?.to?.name??""}`)}</h2></header><mq-card class="summary" roundness="md"><div class="appointment-summary"><professional-overview .name="${t.from.name??""}" .specialtyName="${c}" .collegiateNumber="${t.from.collegiate_number??void 0}" .description="${t.from.description??""}" .languages="${t.from.languages??[]}" .avatar="${t.from.avatar??""}" always-expanded-on-desktop></professional-overview><appointment-details .startsAt="${o.toISOString()}" .duration="${t.duration}" .channel="${t.channel}" .timezone="${this._timezone}"></appointment-details>${this.renderPriceBreakdown(t,e,c||s("Consulta"))}<div class="add-to-calendar-container"><mq-text-button fontWeight="bold" size="sm" @click="${()=>{N.track(H(this._patientHash,this.appointmentId));const e=function({title:t,description:e,startsAt:i,endsAt:o}){const n=t=>t.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),a=n(i),s=n(o);return`https://www.google.com/calendar/render?${new URLSearchParams({action:"TEMPLATE",text:t,dates:`${a}/${s}`,...e&&{details:e}}).toString()}`}({title:s(r`Cita agendada de ${t.from.speciality??""}`),startsAt:o,endsAt:n,description:p&&t.consultation_short_url?s(r`Enlace a la cita: ${t.consultation_short_url}`):void 0});window.open(e,"_blank")}}">${Q({size:24})} ${s("Añadir al calendario")}</mq-text-button></div>${h||p?d`<div class="actions">${h?d`<mq-button variant="primary" fullwidth size="md" @click="${()=>{N.track(B(this._patientHash,this.appointmentId)),this.isChatOpen=!this.isChatOpen}}">${A({size:24})} ${s("Chatear con el profesional")} ${(this.unreadQuery.result?.data?.unread_count??0)>0?d`<mq-unread-badge></mq-unread-badge>`:m}</mq-button>`:m} ${p?d`<mq-button variant="outline" fullwidth size="md" @click="${()=>{N.track(K(this._patientHash,this.appointmentId)),this.dispatchEvent(new OpenVideocallEvent({appointmentId:this.appointmentId}))}}">${O({size:24})} ${s("Ir a videollamada")}</mq-button>`:m}</div>`:m}</div><mq-callout background="default" variant="info" ?noPadding="${!(h||p)}">${this._getCalloutText(t)}</mq-callout></mq-card>${this.showNavCtas?d`<mq-card class="footer-cta" roundness="md"><h2>${s("Tus citas")}</h2><p class="description">${s("Accede, modifica o anula tus citas.")}</p><div class="actions"><mq-button variant="primary" size="md" fullwidth @click="${()=>{this.dispatchEvent(new g({tab:"next"}))}}">${s("Ver mis citas")}</mq-button><mq-button variant="outline" size="md" fullwidth @click="${()=>{this.dispatchEvent(new f)}}">${s("Volver al inicio")}</mq-button></div></mq-card>`:m}</div><mq-floating-bubble ?dismissable="${!1}" .open="${this.isChatOpen}" @mq-close="${()=>{this.isChatOpen=!1}}" hideCloseButton>${this.isChatOpen&&v?d`<div slot="content" class="floating-content"><mq-chat-room .consultationId="${t.id}" .consultationType="${x.appointment}" .token="${v}" .roomId="${Number(t.room_id)}" .professionalHash="${t.from.hash}" @mq-chat-room-close="${()=>{this.isChatOpen=!1}}"></mq-chat-room></div>`:m}</mq-floating-bubble>`}})}};n([u({type:String})],U.prototype,"kind",void 0),n([u({type:String})],U.prototype,"appointmentId",void 0),n([u({type:String,attribute:"api-key"})],U.prototype,"apiKey",void 0),n([u({type:String,attribute:"token"})],U.prototype,"token",void 0),n([u({type:String,attribute:"timezone"})],U.prototype,"timezone",void 0),n([u({type:String,attribute:"locale"})],U.prototype,"locale",void 0),n([u({type:String,attribute:"env"})],U.prototype,"env",void 0),n([u({type:Boolean,attribute:"show-nav-ctas"})],U.prototype,"showNavCtas",void 0),n([w({context:E,subscribe:!0})],U.prototype,"queryClientContext",void 0),n([w({context:$})],U.prototype,"loginToken",void 0),n([h()],U.prototype,"isChatOpen",void 0),U=n([c(),a("mq-schedule-success")],U),o();export{U as MqScheduleSuccess,OpenVideocallEvent};
4
+ el horario elegido.`);case y.chat:return s("El profesional te enviará un mensaje para que podamos coordinar la cita. Asegúrate de tener buena cobertura y poder atender en el horario elegido.");default:return m}}}static{this.styles=R}get _accessToken(){return this.token??this.loginToken?.access_token}get _timezone(){return this.timezone||Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}willUpdate(i){i.has("env")&&this.env&&v(this.env),i.has("apiKey")&&this.apiKey&&k.setApiKey(this.apiKey),i.has("token")&&this.token&&k.setAuthToken(this.token),i.has("locale")&&this.locale&&t(this.locale)&&(e(this.locale),k.setLanguage(this.locale))}get _patientHash(){return this.getPatientProfileQuery.result?.data?.hash??""}connectedCallback(){super.connectedCallback(),this.queryClientContext?.invalidateQueries()}updated(){!this._trackedPageView&&this._patientHash&&(this._trackedPageView=!0,N.track(V(this._patientHash,this.appointmentId)))}renderPriceBreakdown(t,e,i){const o=t.price;if(null==o||o<=0)return m;const n=t.currency??"EUR",a=t.discount_amount??0,r=a>0,c=o-a,p=this.getCouponQuery.result?.data,l=p?.name??p?.code,u=r?p?.percent_off??Math.round(a/o*100):0,h=l?`${s("Promoción")} ${l}`:s("Promoción");return d`<div class="price-breakdown"><div class="price-row"><span>${i}</span> <span>${q({amount:o,currency:n},e)}</span></div>${r?d`<div class="price-row"><span>${h} (-${u}%)</span> <span>${q({amount:-a,currency:n},e)}</span></div><hr><div class="price-row price-row--total"><span>${s("Total")}</span> <span>${q({amount:c,currency:n},e)}</span></div>`:m}</div>`}render(){return this.getAppointmentQuery.render({pending:()=>d`<mq-schedule-success-skeleton></mq-schedule-success-skeleton>`,complete:t=>{const e=i(),o=b(t.start_date),n=F(o,t.duration),a=this.getOrganizationSpecialtiesQuery.result?.data?.find(e=>e.id===Number(t.speciality_id)),c=P(a?.code??"",e,a?.name),p=t.channel===y.videocall,l=t.channel===y.phonecall,u=!0===this.getOrganizationSetupQuery.result?.data?.appointments?.has_chat_in_appointment,h=(p||l)&&u,v=this._accessToken;return d`<div><header><div class="success-title">${j()}<h1>${"schedule"===this.kind?s("Cita confirmada"):s("Cita modificada")}</h1></div><h2>${s(r`Resumen de la cita para ${t?.to?.name??""}`)}</h2></header><mq-card class="summary" roundness="md"><div class="appointment-summary"><professional-overview .name="${t.from.name??""}" .specialtyName="${c}" .collegiateNumber="${t.from.collegiate_number??void 0}" .description="${t.from.description??""}" .languages="${t.from.languages??[]}" .avatar="${t.from.avatar??""}" always-expanded-on-desktop></professional-overview><appointment-details .startsAt="${o.toISOString()}" .duration="${t.duration}" .channel="${t.channel}" .timezone="${this._timezone}"></appointment-details>${this.renderPriceBreakdown(t,e,c||s("Consulta"))}<div class="add-to-calendar-container"><mq-text-button fontWeight="bold" size="sm" @click="${()=>{N.track(H(this._patientHash,this.appointmentId));const e=function({title:t,description:e,startsAt:i,endsAt:o}){const n=t=>t.toISOString().replace(/[-:]/g,"").replace(/\.\d{3}/,""),a=n(i),s=n(o);return`https://www.google.com/calendar/render?${new URLSearchParams({action:"TEMPLATE",text:t,dates:`${a}/${s}`,...e&&{details:e}}).toString()}`}({title:s(r`Cita agendada de ${t.from.speciality??""}`),startsAt:o,endsAt:n,description:p&&t.consultation_short_url?s(r`Enlace a la cita: ${t.consultation_short_url}`):void 0});window.open(e,"_blank")}}">${O({size:24})} ${s("Añadir al calendario")}</mq-text-button></div>${h||p?d`<div class="actions">${h?d`<mq-button variant="primary" fullwidth size="md" @click="${()=>{N.track(B(this._patientHash,this.appointmentId)),this.isChatOpen=!this.isChatOpen}}">${Q({size:24})} ${s("Chatear con el profesional")} ${(this.unreadQuery.result?.data?.unread_count??0)>0?d`<mq-unread-badge></mq-unread-badge>`:m}</mq-button>`:m} ${p?d`<mq-button variant="outline" fullwidth size="md" @click="${()=>{N.track(G(this._patientHash,this.appointmentId)),this.dispatchEvent(new OpenVideocallEvent({appointmentId:this.appointmentId}))}}">${A({size:24})} ${s("Ir a videollamada")}</mq-button>`:m}</div>`:m}</div><mq-callout background="default" variant="info" ?noPadding="${!(h||p)}">${this._getCalloutText(t)}</mq-callout></mq-card>${this.showNavCtas?d`<mq-card class="footer-cta" roundness="md"><h2>${s("Tus citas")}</h2><p class="description">${s("Accede, modifica o anula tus citas.")}</p><div class="actions"><mq-button variant="primary" size="md" fullwidth @click="${()=>{this.dispatchEvent(new g({tab:"next"}))}}">${s("Ver mis citas")}</mq-button><mq-button variant="outline" size="md" fullwidth @click="${()=>{this.dispatchEvent(new f)}}">${s("Volver al inicio")}</mq-button></div></mq-card>`:m}</div><mq-floating-bubble ?dismissable="${!1}" .open="${this.isChatOpen}" @mq-close="${()=>{this.isChatOpen=!1}}" hideCloseButton>${this.isChatOpen&&v?d`<div slot="content" class="floating-content"><mq-chat-room .consultationId="${t.id}" .consultationType="${x.appointment}" .token="${v}" .roomId="${Number(t.room_id)}" .professionalHash="${t.from.hash}" @mq-chat-room-close="${()=>{this.isChatOpen=!1}}"></mq-chat-room></div>`:m}</mq-floating-bubble>`}})}};n([u({type:String})],U.prototype,"kind",void 0),n([u({type:String})],U.prototype,"appointmentId",void 0),n([u({type:String,attribute:"api-key"})],U.prototype,"apiKey",void 0),n([u({type:String,attribute:"token"})],U.prototype,"token",void 0),n([u({type:String,attribute:"timezone"})],U.prototype,"timezone",void 0),n([u({type:String,attribute:"locale"})],U.prototype,"locale",void 0),n([u({type:String,attribute:"env"})],U.prototype,"env",void 0),n([u({type:Boolean,attribute:"show-nav-ctas"})],U.prototype,"showNavCtas",void 0),n([w({context:E,subscribe:!0})],U.prototype,"queryClientContext",void 0),n([w({context:$})],U.prototype,"loginToken",void 0),n([h()],U.prototype,"isChatOpen",void 0),U=n([c(),a("mq-schedule-success")],U),o();export{U as MqScheduleSuccess,OpenVideocallEvent};
@@ -14,7 +14,7 @@ import './ui/mq-clamped-text.js';
14
14
  import './ui/mq-card.js';
15
15
  import { P as PriceInCents } from './chunks/price.d-CwLosdAN.js';
16
16
  import { QueryClient } from '@tanstack/query-core';
17
- import { C as CreatePaymentLinkRequest } from './chunks/schemas.d-BEA8Pl6w.js';
17
+ import { C as CreatePaymentLinkRequest, P as PaymentProvider } from './chunks/schemas.d-5CaMrfOq.js';
18
18
  import './ui/mq-skeleton.js';
19
19
  import './ui/mq-select.js';
20
20
  import './ui/mq-time-slot-picker.js';
@@ -598,7 +598,9 @@ declare global {
598
598
  */
599
599
  declare class PaymentMethodSelector extends LitElement {
600
600
  static styles: lit.CSSResult;
601
+ showWallets: boolean;
601
602
  private _selected;
603
+ protected willUpdate(changed: PropertyValues<this>): void;
602
604
  private _select;
603
605
  private _confirm;
604
606
  private _renderRow;
@@ -621,6 +623,9 @@ declare global {
621
623
  * @fires google-pay-opened - Cancelable. Fired before the Google Pay popup opens.
622
624
  * Call preventDefault() to open the checkout URL yourself.
623
625
  * detail.url includes #token= (secret — do not log).
626
+ * @fires mq-payment-redirect - Cancelable. Fired when paying hands the user over
627
+ * to an off-site gateway (Stripe). Its default action is the navigation, so
628
+ * hosts need no listener unless they must open the URL themselves.
624
629
  * @fires error - Fired when the polling timeout is reached
625
630
  */
626
631
  declare class PaymentStep extends LitElement {
@@ -643,6 +648,7 @@ declare class PaymentStep extends LitElement {
643
648
  locale: string;
644
649
  countryCode: string;
645
650
  successUrl?: string;
651
+ provider?: PaymentProvider;
646
652
  queryClientContext: QueryClient | undefined;
647
653
  private _view;
648
654
  private _walletWaiting;
@@ -775,7 +781,7 @@ declare class ProfessionalsList extends LitElement {
775
781
  private getOrganizationSpecialtiesQuery;
776
782
  private getScheduleServicesQuery;
777
783
  private getProfessionalsBySpecialtyAndServiceQuery;
778
- render(): typeof nothing | lit_html.TemplateResult<1> | null;
784
+ render(): lit_html.TemplateResult<1> | typeof nothing | null;
779
785
  }
780
786
  declare global {
781
787
  interface HTMLElementTagNameMap {