@alfadocs/ui-kit 1.47.0 → 1.48.0

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 (442) hide show
  1. package/dist/_chunks/{actions-cell-renderer-B5m9lwgC.js → actions-cell-renderer-DMittsR3.js} +4 -4
  2. package/dist/_chunks/{address-autocomplete-Bq-1n1UX.js → address-autocomplete-Dp5uMvKP.js} +61 -60
  3. package/dist/_chunks/{address-fields-jFfjxOQR.js → address-fields-QfC-N3pw.js} +5 -5
  4. package/dist/_chunks/{agenda-card-DyQtHb9z.js → agenda-card-C4h0xMGi.js} +2 -2
  5. package/dist/_chunks/{agenda-tray-CBaJASb5.js → agenda-tray-DNZYW2xt.js} +4 -4
  6. package/dist/_chunks/{ai-credits-notice-xszqOZTC.js → ai-credits-notice-C-kz_RrY.js} +3 -3
  7. package/dist/_chunks/{ai-permission-notice-D7I2U-cz.js → ai-permission-notice-BRZeS3mT.js} +3 -3
  8. package/dist/_chunks/{ai-prompt-input-DXknpQCB.js → ai-prompt-input-CxvnXsAs.js} +82 -82
  9. package/dist/_chunks/{alia-sidebar-CUqaJNPQ.js → alia-sidebar-Crn8OGPF.js} +7 -7
  10. package/dist/_chunks/{anamnesis-card-xtEhyojD.js → anamnesis-card-D8Si-2GV.js} +3 -3
  11. package/dist/_chunks/{anamnesis-summary-card-CclBbiXg.js → anamnesis-summary-card-DPyScUMM.js} +2 -2
  12. package/dist/_chunks/{anamnesis-summary-rows-DI-UX5r6.js → anamnesis-summary-rows-CZirLRuv.js} +12 -12
  13. package/dist/_chunks/{antenatal-schedule-timeline-CXk_tzWG.js → antenatal-schedule-timeline-8fm3vPSV.js} +2 -2
  14. package/dist/_chunks/{appointment-card-DluZy8Iv.js → appointment-card-CvGU0QP6.js} +5 -5
  15. package/dist/_chunks/{appointment-peek-BsfCpiJs.js → appointment-peek--dmWznLZ.js} +5 -5
  16. package/dist/_chunks/{appointment-timeline-Cs5f9viN.js → appointment-timeline-y9uYZMUd.js} +6 -6
  17. package/dist/_chunks/{appointment-tray-CLrGGnKR.js → appointment-tray-BTecNeSb.js} +4 -4
  18. package/dist/_chunks/appointment-workflow-status-CS8ufF1f.js +66 -0
  19. package/dist/_chunks/{audio-recorder-B7dT-Y3v.js → audio-recorder-DZBtAvLH.js} +4 -4
  20. package/dist/_chunks/{autocomplete-MpBhz-fG.js → autocomplete-DSasZUf6.js} +65 -64
  21. package/dist/_chunks/{badge-BudgzTe_.js → badge-BAkd6_Pj.js} +24 -17
  22. package/dist/_chunks/{balance-badge-cell-YGrYdrvR.js → balance-badge-cell-CA0YNJMR.js} +6 -6
  23. package/dist/_chunks/{bishop-score-Cu70iv9C.js → bishop-score-BMLRvXYF.js} +4 -4
  24. package/dist/_chunks/{bmi-calculator-C9N19aLX.js → bmi-calculator-DUhRyyrA.js} +3 -3
  25. package/dist/_chunks/{booking-C4MwImkS.js → booking-BQYFDcrz.js} +10 -10
  26. package/dist/_chunks/{breadcrumb-agut0PwN.js → breadcrumb-D3boYzD4.js} +50 -49
  27. package/dist/_chunks/{button-CaUe1uyd.js → button-18oBsI3n.js} +54 -50
  28. package/dist/_chunks/button-group-BSDqso_C.js +408 -0
  29. package/dist/_chunks/{calendar-OzSeTb4V.js → calendar-DjoJ9ovF.js} +11 -17
  30. package/dist/_chunks/{calendar-event-card-B6N5h1dO.js → calendar-event-card-BUbKBPv_.js} +55 -73
  31. package/dist/_chunks/calendar-workspace-D8zX9JWm.js +10423 -0
  32. package/dist/_chunks/{care-plan-card-BOv0NRle.js → care-plan-card-ciBaaguw.js} +4 -4
  33. package/dist/_chunks/{care-plan-entry-card-d-rZD4li.js → care-plan-entry-card-D7A0whiZ.js} +5 -5
  34. package/dist/_chunks/{care-plan-header-CEmBXn6-.js → care-plan-header-DKV1gLqv.js} +4 -4
  35. package/dist/_chunks/{carousel.agent-z1yLBpyC.js → carousel.agent-DqDGR2yH.js} +2 -2
  36. package/dist/_chunks/{chart-D8ucl8hH.js → chart-VjuXDXOZ.js} +3 -3
  37. package/dist/_chunks/{chat-input-Cj7ZYQr5.js → chat-input-BVho_SqP.js} +2 -2
  38. package/dist/_chunks/{chat-message-BMVxiUIX.js → chat-message-Co_NRGM4.js} +3 -3
  39. package/dist/_chunks/{smartphone-DaPcFw-X.js → circle-dashed-CUj6o2cA.js} +3 -14
  40. package/dist/_chunks/{city-input-DaQc-Hbj.js → city-input-BGYc4lRV.js} +2 -2
  41. package/dist/_chunks/{clinical-note-card-DdsGYMmI.js → clinical-note-card-DYDQ3q2x.js} +89 -74
  42. package/dist/_chunks/{code-block-BB-viuTn.js → code-block-C_eNHWaa.js} +2 -2
  43. package/dist/_chunks/combobox-B_rLwmSv.js +578 -0
  44. package/dist/_chunks/{command-palette-DQl_SNEv.js → command-palette-DhgGo7GJ.js} +82 -80
  45. package/dist/_chunks/{connection-status-BmA9T0UO.js → connection-status-Cfux3TvH.js} +4 -4
  46. package/dist/_chunks/{contact-profile-card-C0WpwpVV.js → contact-profile-card-Dj4NgBL-.js} +3 -3
  47. package/dist/_chunks/control-room-rail-DAO0qfOI.js +379 -0
  48. package/dist/_chunks/{copy-field-B8XRVmQv.js → copy-field-Cm4y5Bff.js} +2 -2
  49. package/dist/_chunks/{country-select-CfDNFG5c.js → country-select-C5jZjO8O.js} +2 -2
  50. package/dist/_chunks/{cycle-calculator-BH2StWoT.js → cycle-calculator-B9lBRNiZ.js} +3 -3
  51. package/dist/_chunks/{dashboard-grid-BcXWL5S9.js → dashboard-grid-uX7x1ePj.js} +2 -2
  52. package/dist/_chunks/{data-table-DnKOmEVw.js → data-table-DWOSxlsy.js} +9 -9
  53. package/dist/_chunks/{data-table-tabs-B9SXA5VP.js → data-table-tabs-CzYYKp2_.js} +3 -3
  54. package/dist/_chunks/{dependent-selector-BHDP0nBB.js → dependent-selector-BR_8D2Qu.js} +2 -2
  55. package/dist/_chunks/{description-list-BsJ_6CQE.js → description-list-1A2DEbE6.js} +2 -2
  56. package/dist/_chunks/{document-preview-COV0BC6n.js → document-preview-Od2Hz4z5.js} +13 -12
  57. package/dist/_chunks/{document-scanner-B1abl-A4.js → document-scanner-p0aGlzCy.js} +3 -3
  58. package/dist/_chunks/{dropdown-menu-DU-Hrf33.js → dropdown-menu-C8PaW3lR.js} +110 -96
  59. package/dist/_chunks/{due-date-calculator-Buh_mVHq.js → due-date-calculator-BVqJaxzd.js} +4 -4
  60. package/dist/_chunks/{editable-currency-cell-renderer-OUkUv7U4.js → editable-currency-cell-renderer-D_G2Ap61.js} +4 -4
  61. package/dist/_chunks/{editable-description-ADMVFPUz.js → editable-description-B4NVdjvd.js} +3 -3
  62. package/dist/_chunks/{editor-overlay-DwNKaI22.js → editor-overlay-BDiBvQmL.js} +2 -2
  63. package/dist/_chunks/{empty-state-BUN_UAWf.js → empty-state-DTBZ1ENT.js} +2 -2
  64. package/dist/_chunks/{entity-card-I-Gio5wo.js → entity-card-D1Yrh9wf.js} +2 -1
  65. package/dist/_chunks/{entity-summary-DXejuQ8i.js → entity-summary-Ckz_U00H.js} +3 -3
  66. package/dist/_chunks/{error-boundary-BNT2iQ1w.js → error-boundary-BxTqEXqj.js} +2 -2
  67. package/dist/_chunks/euro-Dsuz4ixO.js +22 -0
  68. package/dist/_chunks/{face-scheme-mIhwrQXt.js → face-scheme-fku-RShg.js} +71 -71
  69. package/dist/_chunks/{fetal-weight-wx4ycKc6.js → fetal-weight-B69yOS9W.js} +3 -3
  70. package/dist/_chunks/{field-array-BW9KeeXG.js → field-array-lIXrFWS0.js} +3 -3
  71. package/dist/_chunks/file-BuG1VMAy.js +21 -0
  72. package/dist/_chunks/{file-Cwe9VC1A.js → file-image-cDgE-BTy.js} +2 -19
  73. package/dist/_chunks/{file-manager-DOcJGIx2.js → file-manager-CqgxLqoA.js} +15 -14
  74. package/dist/_chunks/{file-upload-BDpb08GM.js → file-upload-B242a_Y1.js} +53 -52
  75. package/dist/_chunks/{finished-terminal-DJd7Z_po.js → finished-terminal-B2oqXO0Y.js} +2 -2
  76. package/dist/_chunks/fiscal-code-input-BEF8eKIG.js +572 -0
  77. package/dist/_chunks/{freemium-paywall-BaW5ODc9.js → freemium-paywall-B6JITu4l.js} +2 -2
  78. package/dist/_chunks/{gestational-age-calculator-CwbecTul.js → gestational-age-calculator-DsGN6_HS.js} +5 -5
  79. package/dist/_chunks/handled-rejection-6gqCf5vt.js +13 -0
  80. package/dist/_chunks/{hcg-doubling-BcXriXJe.js → hcg-doubling-D2SH-e7t.js} +3 -3
  81. package/dist/_chunks/{header-3o9o9v_T.js → header-CCjp5GvE.js} +2 -2
  82. package/dist/_chunks/{header-settings-BEfx_-TF.js → header-settings-ZXa6hXuu.js} +5 -5
  83. package/dist/_chunks/{help-me-write-templates-DHIwa4xR.js → help-me-write-templates-DQtT1qs_.js} +5 -5
  84. package/dist/_chunks/history-CK2JaU2g.js +16 -0
  85. package/dist/_chunks/{hover-card-nUae8NPJ.js → hover-card-BplP5SzQ.js} +2 -2
  86. package/dist/_chunks/{icon-button-CehAeZoP.js → icon-button-CY7GU_Se.js} +2 -2
  87. package/dist/_chunks/icon-button-group-B_426QN_.js +431 -0
  88. package/dist/_chunks/{icon-picker-DMEelg9v.js → icon-picker-ZLebyB0U.js} +3 -3
  89. package/dist/_chunks/{image-cropper-BjPjT7wU.js → image-cropper-_HiNN79d.js} +2 -2
  90. package/dist/_chunks/{info-tip-iP2Pm9dh.js → info-tip-laBxZhKu.js} +2 -2
  91. package/dist/_chunks/{insert-result-DPnOBD85.js → insert-result-CSuPQyKL.js} +2 -2
  92. package/dist/_chunks/{key-value-pair-DaQI_LZB.js → key-value-pair-Dcdl3Gni.js} +2 -2
  93. package/dist/_chunks/{kit-extensions-DuoFF1R3.js → kit-extensions-BTJSnM_H.js} +6 -6
  94. package/dist/_chunks/{link-cell-renderer-s3oHzOwi.js → link-cell-renderer-Tswqf6BT.js} +7 -7
  95. package/dist/_chunks/{locale-picker-CH3kfrIG.js → locale-picker-DGkQmhV9.js} +170 -180
  96. package/dist/_chunks/{map-view-CHw4RL6w.js → map-view-Bb7ClKSF.js} +2 -2
  97. package/dist/_chunks/{marketplace-app-shell-PB89Dkk_.js → marketplace-app-shell-Dehuxbi-.js} +6 -6
  98. package/dist/_chunks/menu-row-BAr8bx1I.js +95 -0
  99. package/dist/_chunks/{message-card-V3sFPiQI.js → message-card-DKOtnBHy.js} +3 -3
  100. package/dist/_chunks/{message-tray-CrRIHfiQ.js → message-tray-COMEtmyr.js} +4 -4
  101. package/dist/_chunks/{multi-select-CtPd7g4x.js → multi-select-N4Smh-gj.js} +114 -113
  102. package/dist/_chunks/{muscle-scheme-UVz_x4iE.js → muscle-scheme-Co0NIgbU.js} +3 -3
  103. package/dist/_chunks/{note-attachment-CwDir3kK.js → note-attachment-CGjNTrAC.js} +2 -2
  104. package/dist/_chunks/{note-timeline-Dn_XTo1s.js → note-timeline-CVnKL0p6.js} +2 -2
  105. package/dist/_chunks/notes-panel-BiOxZL_0.js +1111 -0
  106. package/dist/_chunks/{notification-card-B2gLO6dK.js → notification-card-DDzBCi8l.js} +3 -3
  107. package/dist/_chunks/{notification-tray-BOEKegVV.js → notification-tray-PnH2PBlZ.js} +4 -4
  108. package/dist/_chunks/{operator-hero-XIdwDmN2.js → operator-hero-5061fkY5.js} +3 -3
  109. package/dist/_chunks/{optical-prescription-LGgmtcST.js → optical-prescription-DUufWXfZ.js} +3 -3
  110. package/dist/_chunks/{pagination-EkD5SiCK.js → pagination-B0N2qGy_.js} +83 -82
  111. package/dist/_chunks/panel-subview-CzHutkA8.js +217 -0
  112. package/dist/_chunks/{patient-details-yrgkSeEY.js → patient-details-C23Hdm8v.js} +3 -3
  113. package/dist/_chunks/{patient-field-row-DCMkFGqI.js → patient-field-row-DElFbpKc.js} +12 -12
  114. package/dist/_chunks/{patient-search-5QcmQKJD.js → patient-search-DgXdGkhK.js} +4 -4
  115. package/dist/_chunks/{patient-summary-card-CmEFflGS.js → patient-summary-card-C36L3h7h.js} +7 -7
  116. package/dist/_chunks/{payment-automation-upsell-BKmBXU4i.js → payment-automation-upsell-ugi4np1l.js} +3 -3
  117. package/dist/_chunks/{payment-request-card-Cer6XXCn.js → payment-request-card-DMJB57Tv.js} +5 -5
  118. package/dist/_chunks/{periodontal-chart-DJoZS_o7.js → periodontal-chart-DbGzKDj7.js} +2 -2
  119. package/dist/_chunks/{periodontal-chart-card-Nd1ZoYWb.js → periodontal-chart-card-DvHyP47v.js} +3 -3
  120. package/dist/_chunks/{periodontal-diagnosis-C7pfPOct.js → periodontal-diagnosis-B8WqI0eU.js} +2 -2
  121. package/dist/_chunks/{periodontal-risk-chart-B2tNFa15.js → periodontal-risk-chart-DsFRFFSz.js} +2 -2
  122. package/dist/_chunks/{phone-input-IWrGOCwm.js → phone-input-sQj-zi59.js} +85 -86
  123. package/dist/_chunks/{popover-DO-pssF3.js → popover-Dvb40vPH.js} +2 -2
  124. package/dist/_chunks/{practice-profile-hero-DxoLlQr5.js → practice-profile-hero-CPy5h2yI.js} +2 -2
  125. package/dist/_chunks/{practice-results-D11Zpt27.js → practice-results-t2BHht91.js} +7 -7
  126. package/dist/_chunks/{pregnancy-dating-DcyV9ZRD.js → pregnancy-dating-lfjjZVZH.js} +5 -5
  127. package/dist/_chunks/{pregnancy-weight-gain-Bfq4Kwt5.js → pregnancy-weight-gain-WpNt-S0q.js} +3 -3
  128. package/dist/_chunks/{privacy-lock-CbFCAMM3.js → privacy-lock-D6gq0GDg.js} +3 -3
  129. package/dist/_chunks/privacy-mask-BC5lw2zB.js +81 -0
  130. package/dist/_chunks/{product-hub-panel-w40-_-1s.js → product-hub-panel-CKeSCSeE.js} +3 -3
  131. package/dist/_chunks/{province-select-BaUnkg4S.js → province-select-BiszMRRY.js} +2 -2
  132. package/dist/_chunks/{public-header.agent-D-EBVskf.js → public-header.agent-B9wDmUeB.js} +3 -3
  133. package/dist/_chunks/{radiograph-panel.agent-LrILY2lN.js → radiograph-panel.agent-TmyIvTOa.js} +6 -6
  134. package/dist/_chunks/{reviews-panel-2GVuxGeT.js → reviews-panel-BdwFp_0c.js} +4 -4
  135. package/dist/_chunks/{rich-text-editor-BwDV2XkZ.js → rich-text-editor-y6ML0KeV.js} +12 -11
  136. package/dist/_chunks/{search-bar-CCmViqaa.js → search-bar-6bHatpYJ.js} +69 -67
  137. package/dist/_chunks/{select-CLSUnKjF.js → select-upNAltly.js} +89 -88
  138. package/dist/_chunks/{session-countdown-BqppPrw6.js → session-countdown-ACJyTXH2.js} +2 -2
  139. package/dist/_chunks/{sheet-C8WIDFS8.js → sheet-D0Lh0KR2.js} +2 -2
  140. package/dist/_chunks/{sign-in-with-alfadocs-button-DWwBJtyE.js → sign-in-with-alfadocs-button-CDyJAIzW.js} +2 -2
  141. package/dist/_chunks/{signature-request-D_j2aQu1.js → signature-request-15D363w5.js} +6 -6
  142. package/dist/_chunks/{signature-status-chip-D4NsrdeI.js → signature-status-chip-Dz6sS2oA.js} +2 -2
  143. package/dist/_chunks/{slot-grid-B3eOPkKD.js → slot-grid-4fWH3Euk.js} +4 -4
  144. package/dist/_chunks/smartphone-C0rFF2if.js +15 -0
  145. package/dist/_chunks/{streaming-text-CE1u_oGa.js → streaming-text-eRiizArc.js} +2 -2
  146. package/dist/_chunks/{tab-bar-Cw9UK18Z.js → tab-bar-BHFf6knq.js} +9 -9
  147. package/dist/_chunks/{tabs-BnRaLT0y.js → tabs-CFsuMQ5H.js} +82 -81
  148. package/dist/_chunks/{tag-Ci3xJPcH.js → tag-B65tLWvD.js} +24 -21
  149. package/dist/_chunks/{task-card-qTKD1fIT.js → task-card-CTTQfPS6.js} +72 -55
  150. package/dist/_chunks/task-editor-DlvTwAfv.js +1243 -0
  151. package/dist/_chunks/{task-tray-DIwjAIes.js → task-tray-JA-qp_pB.js} +4 -4
  152. package/dist/_chunks/tasks-panel-C_dVDQKJ.js +1243 -0
  153. package/dist/_chunks/{theme-toggle-BP0XRGMM.js → theme-toggle-LUBxlNDm.js} +4 -4
  154. package/dist/_chunks/{toast-ZZfhA5u0.js → toast-CT8hjr9r.js} +2 -2
  155. package/dist/_chunks/{token-insert-menu-A9B5AJw6.js → token-insert-menu-klwbxVKh.js} +3 -3
  156. package/dist/_chunks/{tool-rail-CCFqDfAn.js → tool-rail-DEeX4PdN.js} +144 -137
  157. package/dist/_chunks/{tooth-scheme-DPAq0vQK.js → tooth-scheme-BkjhkI8g.js} +4 -4
  158. package/dist/_chunks/{treatment-receipt-DU0OewqH.js → treatment-receipt-C-gWZ6uv.js} +3 -3
  159. package/dist/_chunks/{unit-converter-C-LpGzrN.js → unit-converter-Dp_KDxE6.js} +3 -3
  160. package/dist/_chunks/use-appointment-details-read-D2FH-cHF.js +2045 -0
  161. package/dist/_chunks/use-list-reflow-C7O4Uqnl.js +133 -0
  162. package/dist/_chunks/use-priority-overflow-Cdmb5EiR.js +108 -0
  163. package/dist/_chunks/{variables-menu-vXUaSBj4.js → variables-menu-aJLKJ_cu.js} +127 -136
  164. package/dist/_chunks/{warning-stack-C0glSB7p.js → warning-stack-CEgYkI1z.js} +3 -3
  165. package/dist/_chunks/{widget-picker-B1sj6uyf.js → widget-picker-CilQvcNL.js} +2 -2
  166. package/dist/_chunks/{workflow-map-DhR_h5yw.js → workflow-map-qGkQTNvS.js} +30 -29
  167. package/dist/_chunks/{workflow-status-CuJAOuKL.js → workflow-status-ClHfz4Kr.js} +209 -167
  168. package/dist/agent-catalog.json +371 -26
  169. package/dist/agent-i18n/en.json +41 -9
  170. package/dist/components/_shared/appointment-format.d.ts +52 -0
  171. package/dist/{patterns/calendar/calendar-editor-fields.d.ts → components/_shared/compact-editor-fields.d.ts} +6 -5
  172. package/dist/components/_shared/handled-rejection.d.ts +2 -0
  173. package/dist/components/_shared/menu-row.d.ts +17 -0
  174. package/dist/components/_shared/patient-identity.d.ts +7 -0
  175. package/dist/components/_shared/patient-picker.d.ts +24 -0
  176. package/dist/components/_shared/privacy-mask.d.ts +29 -0
  177. package/dist/components/address-autocomplete/index.js +1 -1
  178. package/dist/components/address-fields/index.js +1 -1
  179. package/dist/components/agenda-card/index.js +1 -1
  180. package/dist/components/agenda-tray/index.js +1 -1
  181. package/dist/components/ai-credits-notice/index.js +1 -1
  182. package/dist/components/ai-permission-notice/index.js +1 -1
  183. package/dist/components/ai-prompt-input/index.js +1 -1
  184. package/dist/components/anamnesis-card/index.js +1 -1
  185. package/dist/components/anamnesis-summary-card/index.js +1 -1
  186. package/dist/components/appointment-card/index.js +2 -2
  187. package/dist/components/appointment-details-panel/appointment-details-panel.agent.d.ts +4 -0
  188. package/dist/components/appointment-details-panel/appointment-details-panel.d.ts +134 -0
  189. package/dist/components/appointment-details-panel/appointment-details-panel.focus.d.ts +7 -0
  190. package/dist/components/appointment-details-panel/appointment-details-panel.history.d.ts +12 -0
  191. package/dist/components/appointment-details-panel/appointment-details-panel.identity.d.ts +41 -0
  192. package/dist/{patterns/calendar/calendar-info-hover.d.ts → components/appointment-details-panel/appointment-details-panel.info-hover.d.ts} +1 -1
  193. package/dist/components/appointment-details-panel/appointment-details-panel.sections.d.ts +51 -0
  194. package/dist/components/appointment-details-panel/appointment-details-panel.types.d.ts +326 -0
  195. package/dist/components/appointment-details-panel/index.d.ts +8 -0
  196. package/dist/components/appointment-details-panel/index.js +8 -0
  197. package/dist/components/appointment-details-panel/use-appointment-details-read.d.ts +32 -0
  198. package/dist/components/appointment-peek/index.js +1 -1
  199. package/dist/components/appointment-timeline/index.js +1 -1
  200. package/dist/components/audio-recorder/index.js +1 -1
  201. package/dist/components/autocomplete/index.js +1 -1
  202. package/dist/components/badge/index.js +1 -1
  203. package/dist/components/bishop-score/index.js +1 -1
  204. package/dist/components/bmi-calculator/index.js +1 -1
  205. package/dist/components/booking/index.js +1 -1
  206. package/dist/components/breadcrumb/index.js +1 -1
  207. package/dist/components/button/button.d.ts +2 -1
  208. package/dist/components/button/index.js +2 -2
  209. package/dist/components/button-group/button-group.d.ts +19 -2
  210. package/dist/components/button-group/index.js +1 -1
  211. package/dist/components/calendar/calendar.d.ts +5 -1
  212. package/dist/components/calendar/index.js +1 -1
  213. package/dist/components/calendar-event-card/index.js +1 -1
  214. package/dist/components/care-plan-card/index.js +1 -1
  215. package/dist/components/care-plan-entry-card/index.js +1 -1
  216. package/dist/components/care-plan-header/index.js +1 -1
  217. package/dist/components/carousel/index.js +1 -1
  218. package/dist/components/chart/index.js +1 -1
  219. package/dist/components/chat-input/index.js +1 -1
  220. package/dist/components/chat-message/index.js +1 -1
  221. package/dist/components/city-input/index.js +1 -1
  222. package/dist/components/clinical-note-card/clinical-note-card.d.ts +13 -5
  223. package/dist/components/clinical-note-card/index.js +1 -1
  224. package/dist/components/combobox/combobox.d.ts +9 -4
  225. package/dist/components/combobox/index.js +1 -1
  226. package/dist/components/command-palette/index.js +1 -1
  227. package/dist/components/connection-status/index.js +1 -1
  228. package/dist/components/contact-profile-card/index.js +1 -1
  229. package/dist/components/control-room-rail/control-room-rail.d.ts +21 -3
  230. package/dist/components/control-room-rail/index.d.ts +1 -1
  231. package/dist/components/control-room-rail/index.js +1 -1
  232. package/dist/components/copy-field/index.js +1 -1
  233. package/dist/components/country-select/index.js +1 -1
  234. package/dist/components/cycle-calculator/index.js +1 -1
  235. package/dist/components/dashboard-grid/index.js +1 -1
  236. package/dist/components/data-table/index.js +4 -4
  237. package/dist/components/data-table-tabs/index.js +1 -1
  238. package/dist/components/dependent-selector/index.js +1 -1
  239. package/dist/components/description-list/index.js +1 -1
  240. package/dist/components/document-preview/index.js +1 -1
  241. package/dist/components/document-scanner/index.js +1 -1
  242. package/dist/components/dropdown-menu/index.js +1 -1
  243. package/dist/components/due-date-calculator/index.js +2 -2
  244. package/dist/components/editable-description/index.js +1 -1
  245. package/dist/components/editor-overlay/index.js +1 -1
  246. package/dist/components/empty-state/index.js +1 -1
  247. package/dist/components/entity-summary/index.js +1 -1
  248. package/dist/components/error-boundary/index.js +1 -1
  249. package/dist/components/face-scheme/index.js +1 -1
  250. package/dist/components/fetal-weight/index.js +1 -1
  251. package/dist/components/field-array/index.js +1 -1
  252. package/dist/components/file-manager/index.js +1 -1
  253. package/dist/components/file-upload/index.js +1 -1
  254. package/dist/components/finished-terminal/index.js +1 -1
  255. package/dist/components/fiscal-code-input/fiscal-code-input.d.ts +7 -0
  256. package/dist/components/fiscal-code-input/index.d.ts +1 -1
  257. package/dist/components/fiscal-code-input/index.js +8 -7
  258. package/dist/components/fiscal-code-input/is-valid-codice-fiscale.d.ts +19 -4
  259. package/dist/components/freemium-paywall/index.js +1 -1
  260. package/dist/components/gestational-age-calculator/index.js +1 -1
  261. package/dist/components/hcg-doubling/index.js +1 -1
  262. package/dist/components/header/index.js +1 -1
  263. package/dist/components/header-settings/index.js +1 -1
  264. package/dist/components/hover-card/index.js +1 -1
  265. package/dist/components/icon-button/index.js +1 -1
  266. package/dist/components/icon-button-group/index.js +1 -1
  267. package/dist/components/icon-picker/index.js +1 -1
  268. package/dist/components/image-cropper/index.js +1 -1
  269. package/dist/components/index.d.ts +2 -0
  270. package/dist/components/info-tip/index.js +1 -1
  271. package/dist/components/key-value-pair/index.js +1 -1
  272. package/dist/components/locale-picker/index.js +1 -1
  273. package/dist/components/map-view/index.js +1 -1
  274. package/dist/components/message-card/index.js +1 -1
  275. package/dist/components/message-tray/index.js +1 -1
  276. package/dist/components/multi-select/index.js +1 -1
  277. package/dist/components/muscle-scheme/index.js +1 -1
  278. package/dist/components/note-timeline/index.js +1 -1
  279. package/dist/components/notes-panel/index.d.ts +1 -1
  280. package/dist/components/notes-panel/index.js +1 -1
  281. package/dist/components/notes-panel/notes-panel.d.ts +102 -26
  282. package/dist/components/notification-card/index.js +1 -1
  283. package/dist/components/notification-tray/index.js +1 -1
  284. package/dist/components/operator-hero/index.js +1 -1
  285. package/dist/components/optical-prescription/index.js +1 -1
  286. package/dist/components/pagination/index.js +1 -1
  287. package/dist/components/panel-subview/index.js +1 -1
  288. package/dist/components/patient-details/index.js +1 -1
  289. package/dist/components/patient-search/index.js +1 -1
  290. package/dist/components/patient-summary-card/index.js +1 -1
  291. package/dist/components/patient-table/index.js +1 -1
  292. package/dist/components/payment-card/index.js +1 -1
  293. package/dist/components/periodontal-chart/index.js +1 -1
  294. package/dist/components/periodontal-chart-card/index.js +1 -1
  295. package/dist/components/periodontal-diagnosis/index.js +1 -1
  296. package/dist/components/periodontal-risk-chart/index.js +1 -1
  297. package/dist/components/phone-input/index.js +1 -1
  298. package/dist/components/popover/index.js +1 -1
  299. package/dist/components/practice-profile-hero/index.js +1 -1
  300. package/dist/components/practice-results/index.js +1 -1
  301. package/dist/components/pregnancy-dating/index.js +1 -1
  302. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  303. package/dist/components/privacy-lock/index.js +1 -1
  304. package/dist/components/product-hub-tray/index.js +1 -1
  305. package/dist/components/province-select/index.js +1 -1
  306. package/dist/components/public-header/index.js +1 -1
  307. package/dist/components/radiograph-panel/index.js +1 -1
  308. package/dist/components/reviews-panel/index.js +1 -1
  309. package/dist/components/rich-text-editor/index.js +2 -2
  310. package/dist/components/search-bar/index.js +1 -1
  311. package/dist/components/select/index.js +1 -1
  312. package/dist/components/session-countdown/index.js +1 -1
  313. package/dist/components/sheet/index.js +1 -1
  314. package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
  315. package/dist/components/signature-field/signature-field.d.ts +1 -1
  316. package/dist/components/signature-status-chip/index.js +1 -1
  317. package/dist/components/skeleton-scheme/index.js +17 -17
  318. package/dist/components/slot-grid/index.js +1 -1
  319. package/dist/components/streaming-text/index.js +1 -1
  320. package/dist/components/tab-bar/index.js +1 -1
  321. package/dist/components/tabs/index.js +1 -1
  322. package/dist/components/tag/index.js +1 -1
  323. package/dist/components/task-card/index.js +1 -1
  324. package/dist/components/task-card/task-card.d.ts +6 -0
  325. package/dist/components/task-editor/index.d.ts +4 -0
  326. package/dist/components/task-editor/index.js +6 -0
  327. package/dist/components/task-editor/task-editor.agent.d.ts +4 -0
  328. package/dist/components/task-editor/task-editor.d.ts +240 -0
  329. package/dist/components/task-editor/use-task-editor-form.d.ts +101 -0
  330. package/dist/components/task-tray/index.js +1 -1
  331. package/dist/components/tasks-panel/index.d.ts +1 -1
  332. package/dist/components/tasks-panel/index.js +1 -1
  333. package/dist/components/tasks-panel/tasks-panel.d.ts +84 -12
  334. package/dist/components/theme-toggle/index.js +1 -1
  335. package/dist/components/toast/index.js +1 -1
  336. package/dist/components/token-insert-menu/index.js +1 -1
  337. package/dist/components/tool-rail/index.js +1 -1
  338. package/dist/components/tooth-scheme/index.js +1 -1
  339. package/dist/components/treatment-receipt/index.js +1 -1
  340. package/dist/components/unit-converter/index.js +1 -1
  341. package/dist/components/variables-menu/index.js +1 -1
  342. package/dist/components/warning-stack/index.js +1 -1
  343. package/dist/components/widget-picker/index.js +1 -1
  344. package/dist/components/workflow/index.js +1 -1
  345. package/dist/components/workflow-status/appointment-workflow-status.d.ts +55 -0
  346. package/dist/components/workflow-status/index.d.ts +2 -0
  347. package/dist/components/workflow-status/index.js +7 -2
  348. package/dist/components/workflow-status/workflow-status.d.ts +35 -0
  349. package/dist/hooks/index.js +2 -2
  350. package/dist/hooks/use-exit-transition.d.ts +5 -0
  351. package/dist/hooks/use-priority-overflow.d.ts +11 -2
  352. package/dist/host-compat.css +7 -1
  353. package/dist/i18n/locales/ar.d.ts +29 -10
  354. package/dist/i18n/locales/ar.js +33 -14
  355. package/dist/i18n/locales/de.d.ts +29 -10
  356. package/dist/i18n/locales/de.js +33 -14
  357. package/dist/i18n/locales/el.d.ts +29 -10
  358. package/dist/i18n/locales/el.js +33 -14
  359. package/dist/i18n/locales/en.d.ts +29 -10
  360. package/dist/i18n/locales/en.js +33 -14
  361. package/dist/i18n/locales/es.d.ts +29 -10
  362. package/dist/i18n/locales/es.js +33 -14
  363. package/dist/i18n/locales/fr.d.ts +29 -10
  364. package/dist/i18n/locales/fr.js +33 -14
  365. package/dist/i18n/locales/hi.d.ts +29 -10
  366. package/dist/i18n/locales/hi.js +33 -14
  367. package/dist/i18n/locales/it.d.ts +29 -10
  368. package/dist/i18n/locales/it.js +33 -14
  369. package/dist/i18n/locales/ja.d.ts +29 -10
  370. package/dist/i18n/locales/ja.js +33 -14
  371. package/dist/i18n/locales/nl.d.ts +29 -10
  372. package/dist/i18n/locales/nl.js +33 -14
  373. package/dist/i18n/locales/pl.d.ts +29 -10
  374. package/dist/i18n/locales/pl.js +33 -14
  375. package/dist/i18n/locales/pt.d.ts +29 -10
  376. package/dist/i18n/locales/pt.js +33 -14
  377. package/dist/i18n/locales/ro.d.ts +29 -10
  378. package/dist/i18n/locales/ro.js +33 -14
  379. package/dist/i18n/locales/ru.d.ts +29 -10
  380. package/dist/i18n/locales/ru.js +33 -14
  381. package/dist/i18n/locales/sq.d.ts +29 -10
  382. package/dist/i18n/locales/sq.js +33 -14
  383. package/dist/i18n/locales/sv.d.ts +29 -10
  384. package/dist/i18n/locales/sv.js +33 -14
  385. package/dist/i18n/locales/tr.d.ts +29 -10
  386. package/dist/i18n/locales/tr.js +33 -14
  387. package/dist/i18n/locales/zh.d.ts +29 -10
  388. package/dist/i18n/locales/zh.js +33 -14
  389. package/dist/i18n/registerUiBundle.d.ts +5 -9
  390. package/dist/index.js +742 -728
  391. package/dist/locales/ar.json +33 -14
  392. package/dist/locales/de.json +33 -14
  393. package/dist/locales/el.json +33 -14
  394. package/dist/locales/en.json +33 -14
  395. package/dist/locales/es.json +33 -14
  396. package/dist/locales/fr.json +33 -14
  397. package/dist/locales/hi.json +33 -14
  398. package/dist/locales/it.json +33 -14
  399. package/dist/locales/ja.json +33 -14
  400. package/dist/locales/nl.json +33 -14
  401. package/dist/locales/pl.json +33 -14
  402. package/dist/locales/pt.json +33 -14
  403. package/dist/locales/ro.json +33 -14
  404. package/dist/locales/ru.json +33 -14
  405. package/dist/locales/sq.json +33 -14
  406. package/dist/locales/sv.json +33 -14
  407. package/dist/locales/tr.json +33 -14
  408. package/dist/locales/zh.json +33 -14
  409. package/dist/patterns/alia-assistant/index.js +1 -1
  410. package/dist/patterns/anamnesis/index.js +1 -1
  411. package/dist/patterns/calendar/calendar-appointment-details.d.ts +25 -95
  412. package/dist/patterns/calendar/calendar-patient-picker.d.ts +4 -3
  413. package/dist/patterns/calendar/calendar-privacy.d.ts +1 -22
  414. package/dist/patterns/calendar/calendar-sticky-offset.d.ts +20 -13
  415. package/dist/patterns/calendar/calendar-task-editor.d.ts +9 -13
  416. package/dist/patterns/calendar/calendar-workspace.d.ts +160 -1
  417. package/dist/patterns/calendar/calendar-workspace.model.d.ts +17 -12
  418. package/dist/patterns/calendar/calendar.journey.d.ts +40 -4
  419. package/dist/patterns/calendar/calendar.model.d.ts +10 -17
  420. package/dist/patterns/calendar/calendar.sheets.d.ts +18 -14
  421. package/dist/patterns/calendar/calendar.surface.d.ts +6 -1
  422. package/dist/patterns/calendar/calendar.types.d.ts +24 -100
  423. package/dist/patterns/calendar/index.d.ts +4 -3
  424. package/dist/patterns/calendar/index.js +1 -1
  425. package/dist/patterns/help-me-write-templates/index.js +1 -1
  426. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  427. package/dist/patterns/payment-automation-upsell/index.js +1 -1
  428. package/dist/patterns/signature-request/index.js +1 -1
  429. package/dist/tokens.css +1 -1
  430. package/package.json +22 -5
  431. package/dist/_chunks/button-group-CA1tmu39.js +0 -325
  432. package/dist/_chunks/calendar-workspace-DDnQmiIL.js +0 -12427
  433. package/dist/_chunks/combobox-DnSdYssy.js +0 -522
  434. package/dist/_chunks/control-room-rail-Cv7GpMqX.js +0 -354
  435. package/dist/_chunks/fiscal-code-input-ODQRd_Sw.js +0 -553
  436. package/dist/_chunks/icon-button-group-DZKC6KGf.js +0 -428
  437. package/dist/_chunks/notes-panel-CHbDDMx8.js +0 -683
  438. package/dist/_chunks/panel-subview-CYnuX-KR.js +0 -171
  439. package/dist/_chunks/tasks-panel-DncuBPIZ.js +0 -844
  440. package/dist/_chunks/use-list-reflow-Cw43nxw5.js +0 -100
  441. package/dist/_chunks/use-priority-overflow-c9SjxZkZ.js +0 -101
  442. package/dist/patterns/calendar/calendar-appointment-details.sections.d.ts +0 -37
@@ -0,0 +1,2045 @@
1
+ import { jsx as e, jsxs as m, Fragment as Y } from "react/jsx-runtime";
2
+ import { c as et } from "./index-D2ZczOXr.js";
3
+ import { useId as Ue, useRef as C, forwardRef as Gt, useEffect as pe, useMemo as gt, useState as _, useCallback as Vt } from "react";
4
+ import { useTranslation as O } from "react-i18next";
5
+ import { u as Yt } from "./registry-DvAUVLHh.js";
6
+ import { u as te } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
7
+ import { c as Qt } from "./compose-refs-C0k0tdqF.js";
8
+ import { h as qe, g as Ge } from "./handled-rejection-6gqCf5vt.js";
9
+ import { a as Jt, b as vt } from "./privacy-mask-BC5lw2zB.js";
10
+ import { A as z } from "./alert-CiQ5Pa3Q.js";
11
+ import { B as L } from "./button-18oBsI3n.js";
12
+ import { I as Dt } from "./icon-button-CY7GU_Se.js";
13
+ import { B as Xt } from "./button-group-BSDqso_C.js";
14
+ import { D as Me } from "./dropdown-menu-C8PaW3lR.js";
15
+ import { E as Et } from "./editable-description-B4NVdjvd.js";
16
+ import { N as Ve } from "./note-timeline-CVnKL0p6.js";
17
+ import { P as Ct } from "./panel-header-D_mTdhUp.js";
18
+ import { P as Ke } from "./panel-subview-CzHutkA8.js";
19
+ import { P as Rt } from "./patient-summary-card-C36L3h7h.js";
20
+ import { S as ne } from "./section-card-XR2bW1Ie.js";
21
+ import { C as Zt, S as ue } from "./skeleton-B1KTdJ4N.js";
22
+ import { T as en } from "./text-area-Bt3p7Pt0.js";
23
+ import { T as tn } from "./tooltip-Cp-PLePW.js";
24
+ import { T as Pt } from "./treatment-receipt-C-gWZ6uv.js";
25
+ import { a as yt } from "./whatsapp-button-Ai4YAVkl.js";
26
+ import { a as Ye, W as nn } from "./workflow-status-ClHfz4Kr.js";
27
+ import { u as tt, a as bt, i as an } from "./appointment-workflow-status-CS8ufF1f.js";
28
+ import { E as sn } from "./empty-state-DTBZ1ENT.js";
29
+ import { T as Ne } from "./timeline-61AihzYz.js";
30
+ import { C as nt } from "./calendar-clock-hbObjfGY.js";
31
+ import { T as Lt } from "./trash-2-uumy3fy1.js";
32
+ import { A as kt } from "./entity-card-D1Yrh9wf.js";
33
+ import { P as Qe } from "./pencil-B1sKKyuT.js";
34
+ import { A as on } from "./arrow-right-KsIrLdt0.js";
35
+ import { C as Mt } from "./clock-Drd4Wtis.js";
36
+ import { c as Oe } from "./createLucideIcon-DhHxpK9K.js";
37
+ import { C as rn } from "./calendar-plus-BFrIRE4r.js";
38
+ import { A as _t } from "./avatar-CkDeQOSI.js";
39
+ import { B as He } from "./badge-BAkd6_Pj.js";
40
+ import { H as at } from "./heart-pulse-BCppJyN2.js";
41
+ import { G as ln } from "./globe-sHBW1JN5.js";
42
+ import { T as dn } from "./triangle-alert-CBnO6nq_.js";
43
+ import { E as cn } from "./euro-Dsuz4ixO.js";
44
+ import { V as it } from "./video-BheNGvsu.js";
45
+ import { R as zt } from "./repeat-CvQa5rZt.js";
46
+ import { C as un } from "./counter-WsvRuum1.js";
47
+ import { D as _e } from "./description-list-1A2DEbE6.js";
48
+ import { T as pn } from "./timestamp-BV2lC-wV.js";
49
+ import { T as mn } from "./transaction-chip-CwgcJiqF.js";
50
+ import { H as me } from "./hover-card-BplP5SzQ.js";
51
+ import { S as hn } from "./smartphone-C0rFF2if.js";
52
+ import { P as fn } from "./phone-FceYcIFQ.js";
53
+ import { M as gn } from "./mail-BqXVF2zH.js";
54
+ import { M as vn } from "./map-pin-BaY37-Km.js";
55
+ import { C as yn } from "./calendar-days-BGWklvE-.js";
56
+ import { H as bn } from "./patient-field-row-DElFbpKc.js";
57
+ import { A as wt } from "./armchair-BaLDW6Hz.js";
58
+ import { B as kn } from "./building-2-D33bLCWL.js";
59
+ import { N as wn } from "./notebook-pen-CO7HoM-W.js";
60
+ import { C as Ot } from "./clipboard-list-rSzfIYZB.js";
61
+ import { C as xn } from "./copy-vRpqqHtY.js";
62
+ import { P as Nn } from "./plus-DzMQ_c6b.js";
63
+ import { S as An } from "./square-check-big-dj0o8yA3.js";
64
+ import { H as xt } from "./history-CK2JaU2g.js";
65
+ import { C as Tn } from "./chevron-down-DWE7GSq9.js";
66
+ import { C as Sn } from "./camera-VSklPDCv.js";
67
+ import { F as In } from "./file-BuG1VMAy.js";
68
+ import { F as Dn } from "./file-text-5yv6r2ls.js";
69
+ import { F as En } from "./folder-BghC8_S2.js";
70
+ import { R as Cn } from "./receipt-euro-B1cLM_TN.js";
71
+ /**
72
+ * @license lucide-react v1.22.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */
77
+ const Rn = [
78
+ ["path", { d: "M20 21v-8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8", key: "1w3rig" }],
79
+ ["path", { d: "M4 16s.5-1 2-1 2.5 2 4 2 2.5-2 4-2 2.5 2 4 2 2-1 2-1", key: "n2jgmb" }],
80
+ ["path", { d: "M2 21h20", key: "1nyx9w" }],
81
+ ["path", { d: "M7 8v3", key: "1qtyvj" }],
82
+ ["path", { d: "M12 8v3", key: "hwp4zt" }],
83
+ ["path", { d: "M17 8v3", key: "1i6e5u" }],
84
+ ["path", { d: "M7 4h.01", key: "1bh4kh" }],
85
+ ["path", { d: "M12 4h.01", key: "1ujb9j" }],
86
+ ["path", { d: "M17 4h.01", key: "1upcoc" }]
87
+ ], Pn = Oe("cake", Rn);
88
+ /**
89
+ * @license lucide-react v1.22.0 - ISC
90
+ *
91
+ * This source code is licensed under the ISC license.
92
+ * See the LICENSE file in the root directory of this source tree.
93
+ */
94
+ const Ln = [
95
+ ["path", { d: "M11 14h10", key: "1w8e9d" }],
96
+ ["path", { d: "M16 4h2a2 2 0 0 1 2 2v1.344", key: "1e62lh" }],
97
+ ["path", { d: "m17 18 4-4-4-4", key: "z2g111" }],
98
+ ["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113", key: "bjbb7m" }],
99
+ ["rect", { x: "8", y: "2", width: "8", height: "4", rx: "1", key: "ublpy" }]
100
+ ], Nt = Oe("clipboard-paste", Ln);
101
+ /**
102
+ * @license lucide-react v1.22.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */
107
+ const Mn = [
108
+ ["path", { d: "M16 10h2", key: "8sgtl7" }],
109
+ ["path", { d: "M16 14h2", key: "epxaof" }],
110
+ ["path", { d: "M6.17 15a3 3 0 0 1 5.66 0", key: "n6f512" }],
111
+ ["circle", { cx: "9", cy: "11", r: "2", key: "yxgjnd" }],
112
+ ["rect", { x: "2", y: "5", width: "20", height: "14", rx: "2", key: "qneu4z" }]
113
+ ], _n = Oe("id-card", Mn);
114
+ /**
115
+ * @license lucide-react v1.22.0 - ISC
116
+ *
117
+ * This source code is licensed under the ISC license.
118
+ * See the LICENSE file in the root directory of this source tree.
119
+ */
120
+ const zn = [
121
+ ["path", { d: "M12 2v20", key: "t6zp3m" }],
122
+ ["path", { d: "m15 19-3 3-3-3", key: "11eu04" }],
123
+ ["path", { d: "m19 9 3 3-3 3", key: "1mg7y2" }],
124
+ ["path", { d: "M2 12h20", key: "9i4pu4" }],
125
+ ["path", { d: "m5 9-3 3 3 3", key: "j64kie" }],
126
+ ["path", { d: "m9 5 3-3 3 3", key: "l8vdw6" }]
127
+ ], Ht = Oe("move", zn), On = '[data-component="button-group"] [data-component="icon-button"][aria-haspopup="menu"]', Hn = {
128
+ id: "appointment-details-panel",
129
+ // open and close back open_history and close_history; set_value backs
130
+ // set_status.
131
+ capabilities: ["open", "close", "set_value"],
132
+ state: {
133
+ eventId: {
134
+ type: "string | null",
135
+ descriptionKey: "ui.agent.appointmentDetailsPanel.state.eventId",
136
+ description: "The occurrence on screen or being read, as the host identifies it. After a failed or refused read, the occurrence it was for when the host says so. Null when there is none, or the host did not say.",
137
+ read: (t) => t.getEventId()
138
+ },
139
+ loadStatus: {
140
+ type: "'loading' | 'ready' | 'error' | 'refused'",
141
+ descriptionKey: "ui.agent.appointmentDetailsPanel.state.loadStatus",
142
+ description: "Where the read is: loading, ready, failed (with Retry) or refused. Actions need ready.",
143
+ read: (t) => t.getLoadStatus()
144
+ },
145
+ appointmentStatus: {
146
+ type: "'confirmed' | 'waiting' | 'in_care' | 'done' | 'cancelled' | 'absent' | null",
147
+ descriptionKey: "ui.agent.appointmentDetailsPanel.state.appointmentStatus",
148
+ description: "The appointment status as last saved here or read. Null when none is recorded or nothing is on screen.",
149
+ read: (t) => t.getAppointmentStatus()
150
+ },
151
+ allowedStatuses: {
152
+ type: "string[]",
153
+ descriptionKey: "ui.agent.appointmentDetailsPanel.state.allowedStatuses",
154
+ description: "The statuses set_status accepts now, in menu order. Empty when the status is read-only.",
155
+ read: (t) => t.getAllowedStatuses()
156
+ },
157
+ offeredActions: {
158
+ type: "string[]",
159
+ descriptionKey: "ui.agent.appointmentDetailsPanel.state.offeredActions",
160
+ description: "The footer actions on offer, as their data-action values (for example edit-appointment, delete-appointment), in footer order, including any folded into More.",
161
+ read: (t) => t.getOfferedActions()
162
+ },
163
+ historyOpen: {
164
+ type: "boolean",
165
+ descriptionKey: "ui.agent.appointmentDetailsPanel.state.historyOpen",
166
+ description: "Whether the History sub-view covers the details.",
167
+ read: (t) => t.isHistoryOpen()
168
+ },
169
+ privacy: {
170
+ type: "boolean",
171
+ descriptionKey: "ui.agent.appointmentDetailsPanel.state.privacy",
172
+ description: "Whether privacy mode is on. The patient identity and personal fields are then masked on screen.",
173
+ read: (t) => t.isPrivacy()
174
+ }
175
+ },
176
+ actions: {
177
+ open_history: {
178
+ safety: "read",
179
+ openWorld: !0,
180
+ idempotent: !0,
181
+ errors: ["No appointment is on screen, or History is not offered."],
182
+ descriptionKey: "ui.agent.appointmentDetailsPanel.actions.openHistory",
183
+ description: "Slide the appointment's history over the details, as its header button does; the host reads it then if it did not send it with the details. It lists who changed what, and when.",
184
+ invoke: (t) => t.openHistory()
185
+ },
186
+ close_history: {
187
+ safety: "read",
188
+ idempotent: !0,
189
+ descriptionKey: "ui.agent.appointmentDetailsPanel.actions.closeHistory",
190
+ description: "Return from History to the details.",
191
+ invoke: (t) => t.closeHistory()
192
+ },
193
+ set_status: {
194
+ safety: "phi",
195
+ openWorld: !0,
196
+ idempotent: !0,
197
+ argsType: "{ status: string }",
198
+ argsSchema: {
199
+ type: "object",
200
+ properties: {
201
+ status: {
202
+ type: "string",
203
+ enum: [
204
+ "confirmed",
205
+ "waiting",
206
+ "in_care",
207
+ "done",
208
+ "cancelled",
209
+ "absent"
210
+ ]
211
+ }
212
+ },
213
+ required: ["status"]
214
+ },
215
+ errors: [
216
+ "The status is read-only: no appointment on screen, no host save, readOnly, or no allowed statuses.",
217
+ "The status is not in allowedStatuses.",
218
+ "A status save is already in flight.",
219
+ "The host refused the change. The previous status stays and the panel shows the message."
220
+ ],
221
+ examples: [{ args: { status: "waiting" } }],
222
+ descriptionKey: "ui.agent.appointmentDetailsPanel.actions.setStatus",
223
+ description: "Save a new appointment status through the host, as the footer control does. Resolves once the host has saved it.",
224
+ invoke: (t, n) => t.setAppointmentStatus(
225
+ n.status
226
+ )
227
+ },
228
+ retry: {
229
+ safety: "read",
230
+ openWorld: !0,
231
+ errors: [
232
+ "Retry is not offered: the read has not failed or been refused as retryable, or the host offers no Retry."
233
+ ],
234
+ descriptionKey: "ui.agent.appointmentDetailsPanel.actions.retry",
235
+ description: "Ask the host to read the appointment again, after a failed read or a refusal it marked retryable.",
236
+ invoke: (t) => t.retry()
237
+ }
238
+ },
239
+ domHooks: {
240
+ root: {
241
+ attr: "data-component",
242
+ value: "appointment-details-panel",
243
+ description: `Marks the panel. It also carries data-event-id and data-status. Inside, cards carry data-card (patient, appointment, notes, treatments), footer actions data-action, and the History and description sub-views data-details-subview. An action in offeredActions with no data-action in the footer strip is folded into More: click the panel's ${On}, and its menu item carries the same data-action.`
244
+ },
245
+ instanceId: {
246
+ attr: "data-component-id",
247
+ sourceProp: "id",
248
+ description: "Sourced from the id prop, or generated."
249
+ }
250
+ }
251
+ };
252
+ function Je(t) {
253
+ const n = document.activeElement;
254
+ n && n !== document.body || t == null || t.focus({ preventScroll: !0 });
255
+ }
256
+ function Ae(t) {
257
+ const n = document.getElementById(t);
258
+ n && !n.hasAttribute("tabindex") && (n.tabIndex = -1), Je(n);
259
+ }
260
+ function Xe(t) {
261
+ return typeof t == "string" && /^\d{4}-\d{2}-\d{2}$/.test(t) ? /* @__PURE__ */ new Date(`${t}T00:00:00`) : new Date(t);
262
+ }
263
+ function ze(t, n) {
264
+ try {
265
+ return new Intl.DateTimeFormat(t, {
266
+ weekday: "long",
267
+ day: "numeric",
268
+ month: "long",
269
+ year: "numeric"
270
+ }).format(Xe(n));
271
+ } catch {
272
+ return "";
273
+ }
274
+ }
275
+ function $n(t, n, i) {
276
+ const o = new Date(n), r = i ? new Date(i) : o;
277
+ try {
278
+ const a = new Intl.DateTimeFormat(t, {
279
+ hour: "2-digit",
280
+ minute: "2-digit",
281
+ hour12: !1
282
+ });
283
+ return typeof a.formatRange == "function" ? a.formatRange(o, r) : `${a.format(o)} – ${a.format(r)}`;
284
+ } catch {
285
+ return "";
286
+ }
287
+ }
288
+ const $t = {
289
+ weekday: "short",
290
+ day: "numeric",
291
+ month: "short",
292
+ hour: "2-digit",
293
+ minute: "2-digit"
294
+ };
295
+ function Bn(t, n) {
296
+ const i = Xe(t), o = Xe(n);
297
+ let r = o.getFullYear() - i.getFullYear();
298
+ const a = o.getMonth() - i.getMonth();
299
+ return (a < 0 || a === 0 && o.getDate() < i.getDate()) && (r -= 1), Math.max(0, r);
300
+ }
301
+ const Fn = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})$/;
302
+ function Wn(t) {
303
+ const n = typeof t == "string" ? Fn.exec(t) : null;
304
+ if (!n) return;
305
+ const [i, o, r, a, d, u] = n.slice(1).map(Number), s = /* @__PURE__ */ new Date(0);
306
+ if (s.setFullYear(i, o, 0), o < 1 || o > 12 || r < 1 || r > s.getDate() || a > 23 || d > 59 || u > 59)
307
+ return;
308
+ const l = /* @__PURE__ */ new Date(0);
309
+ return l.setFullYear(i, o - 1, r), l.setHours(a, d, u, 0), l;
310
+ }
311
+ function jn(t) {
312
+ return t.map((n) => {
313
+ const i = Date.parse(n.atIso);
314
+ return { entry: n, time: Number.isFinite(i) ? i : -1 / 0 };
315
+ }).sort((n, i) => n.time === i.time ? 0 : i.time - n.time).map(({ entry: n }) => n);
316
+ }
317
+ const qn = {
318
+ daily: "recurrenceDaily",
319
+ weekly: "recurrenceWeekly",
320
+ monthly: "recurrenceMonthly",
321
+ quarterly: "recurrenceQuarterly",
322
+ semiannual: "recurrenceSemiannual",
323
+ yearly: "recurrenceYearly"
324
+ };
325
+ function Kn(t) {
326
+ return t.phones ? t.phones : t.phone ? [{ label: "mobile", number: t.phone }] : [];
327
+ }
328
+ function Bt(t) {
329
+ return [t.address, t.postalCode, t.city].filter((n) => !!n).join(", ");
330
+ }
331
+ function Un(t) {
332
+ return [t.address, t.city].filter((n) => !!n).join(", ");
333
+ }
334
+ function Gn(t) {
335
+ const n = Bt(t);
336
+ return `https://www.google.com/maps/search/?api=1&query=${encodeURIComponent(n)}`;
337
+ }
338
+ const V = (t) => `calendarWorkspace.details.${t}`;
339
+ function Vn({
340
+ history: t,
341
+ locale: n
342
+ }) {
343
+ const { t: i, i18n: o } = O(), { optionFor: r } = tt(null), a = n ?? o.language, d = (s) => {
344
+ try {
345
+ return new Intl.DateTimeFormat(a, $t).format(
346
+ new Date(s)
347
+ );
348
+ } catch {
349
+ return s;
350
+ }
351
+ }, u = (s) => {
352
+ switch (s.kind) {
353
+ case "created":
354
+ return {
355
+ type: "success",
356
+ icon: /* @__PURE__ */ e(rn, { size: 16, "aria-hidden": "true" })
357
+ };
358
+ case "moved":
359
+ return {
360
+ type: "info",
361
+ icon: /* @__PURE__ */ e(Ht, { size: 16, "aria-hidden": "true" }),
362
+ detail: i(V("history.movedDetail"), {
363
+ from: d(s.fromIso),
364
+ to: d(s.toIso)
365
+ })
366
+ };
367
+ case "resized":
368
+ return {
369
+ type: "info",
370
+ icon: /* @__PURE__ */ e(Mt, { size: 16, "aria-hidden": "true" }),
371
+ detail: i(V("history.resizedDetail"), {
372
+ from: s.fromMin,
373
+ to: s.toMin
374
+ })
375
+ };
376
+ case "status": {
377
+ const l = kt[s.to].Icon, p = r(s.from), g = r(s.to), I = i(V("history.statusDetail"), {
378
+ from: p.label,
379
+ to: g.label
380
+ });
381
+ return {
382
+ type: s.to === "cancelled" || s.to === "absent" ? "warning" : "neutral",
383
+ icon: /* @__PURE__ */ e(l, { size: 16, "aria-hidden": "true" }),
384
+ detail: /* @__PURE__ */ e("div", { role: "group", "aria-label": I, children: /* @__PURE__ */ m(
385
+ "div",
386
+ {
387
+ "aria-hidden": "true",
388
+ className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
389
+ children: [
390
+ /* @__PURE__ */ e(
391
+ Ye,
392
+ {
393
+ value: s.from,
394
+ option: p,
395
+ size: "sm"
396
+ }
397
+ ),
398
+ /* @__PURE__ */ e(
399
+ on,
400
+ {
401
+ className: "ds:size-4 ds:shrink-0 ds:rtl:rotate-180",
402
+ "aria-hidden": "true"
403
+ }
404
+ ),
405
+ /* @__PURE__ */ e(
406
+ Ye,
407
+ {
408
+ value: s.to,
409
+ option: g,
410
+ size: "sm"
411
+ }
412
+ )
413
+ ]
414
+ }
415
+ ) })
416
+ };
417
+ }
418
+ case "edited":
419
+ return {
420
+ type: "neutral",
421
+ icon: /* @__PURE__ */ e(Qe, { size: 16, "aria-hidden": "true" }),
422
+ /* The platform log carries no field list: no "Changed" line. */
423
+ detail: s.fields.length > 0 ? i(V("history.editedDetail"), {
424
+ fields: s.fields.map((l) => i(V(`history.fields.${l}`))).join(", ")
425
+ }) : void 0
426
+ };
427
+ case "confirmedByPatient": {
428
+ const l = kt.confirmed.Icon;
429
+ return {
430
+ type: "success",
431
+ icon: /* @__PURE__ */ e(l, { size: 16, "aria-hidden": "true" })
432
+ };
433
+ }
434
+ case "deleted":
435
+ return {
436
+ type: "error",
437
+ icon: /* @__PURE__ */ e(Lt, { size: 16, "aria-hidden": "true" })
438
+ };
439
+ }
440
+ };
441
+ return t.length === 0 ? /* @__PURE__ */ e(
442
+ sn,
443
+ {
444
+ variant: "first-use",
445
+ size: "sm",
446
+ title: i(V("historyEmpty"))
447
+ }
448
+ ) : /* @__PURE__ */ e(Ne, { order: "newest-first", "aria-label": i(V("historyTitle")), children: jn(t).map((s) => {
449
+ const l = u(s);
450
+ return /* @__PURE__ */ m(
451
+ Ne.Event,
452
+ {
453
+ eventId: s.id,
454
+ type: l.type,
455
+ className: "ds:[column-gap:var(--spacing-sm)] ds:[padding-block-end:var(--spacing-lg)] ds:before:bg-[var(--primary)]",
456
+ children: [
457
+ /* @__PURE__ */ e(Ne.Dot, { icon: l.icon }),
458
+ /* @__PURE__ */ e(
459
+ Ne.Content,
460
+ {
461
+ title: i(V(`history.${s.kind}`)),
462
+ description: l.detail,
463
+ className: "ds:[padding-block-end:0] ds:[&>[data-component=card]]:border-[color:var(--card-border)] ds:[&>[data-component=card]]:shadow-[var(--shadow-card)]",
464
+ actor: s.actor.trim() ? { name: s.actor } : void 0,
465
+ children: /* @__PURE__ */ m("span", { className: "ds:mt-[var(--spacing-sm)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
466
+ /* @__PURE__ */ e(
467
+ nt,
468
+ {
469
+ "aria-hidden": "true",
470
+ className: "ds:size-4 ds:shrink-0 ds:text-[color:var(--muted-foreground)]"
471
+ }
472
+ ),
473
+ /* @__PURE__ */ e(
474
+ Ne.Timestamp,
475
+ {
476
+ date: s.atIso,
477
+ relative: !1,
478
+ locale: a
479
+ }
480
+ )
481
+ ] })
482
+ }
483
+ )
484
+ ]
485
+ },
486
+ s.id
487
+ );
488
+ }) });
489
+ }
490
+ const Yn = {
491
+ confirmed: "success",
492
+ waiting: "info",
493
+ in_care: "accentSoft",
494
+ done: "success",
495
+ cancelled: "error",
496
+ absent: "warning"
497
+ };
498
+ function Qn({ event: t }) {
499
+ const { t: n } = O(), i = (r) => `calendarWorkspace.details.indicators.${r}`, o = [];
500
+ return t.isBookedOnline && o.push({
501
+ id: "online",
502
+ icon: /* @__PURE__ */ e(ln, { "aria-hidden": "true" }),
503
+ label: n(i("bookedOnline")),
504
+ variant: "info"
505
+ }), t.hasUnassignedPatient && o.push({
506
+ id: "unassigned",
507
+ icon: /* @__PURE__ */ e(dn, { "aria-hidden": "true" }),
508
+ label: n(i("unassignedPatient")),
509
+ variant: "warning"
510
+ }), t.hasHighlightedAnamnesis && o.push({
511
+ id: "anamnesis",
512
+ icon: /* @__PURE__ */ e(at, { "aria-hidden": "true" }),
513
+ label: n(i("anamnesis")),
514
+ variant: "accentSoft"
515
+ }), t.hasBillableAmount && o.push({
516
+ id: "billable",
517
+ icon: /* @__PURE__ */ e(cn, { "aria-hidden": "true" }),
518
+ label: n(i("billable")),
519
+ variant: "warning"
520
+ }), t.isTelehealth && o.push({
521
+ id: "telehealth",
522
+ icon: /* @__PURE__ */ e(it, { "aria-hidden": "true" }),
523
+ label: n(i("telehealth")),
524
+ variant: "info"
525
+ }), t.isRecurring && o.push({
526
+ id: "recurring",
527
+ icon: /* @__PURE__ */ e(zt, { "aria-hidden": "true" }),
528
+ label: n(i("recurring")),
529
+ variant: "info"
530
+ }), o.length === 0 ? null : /* @__PURE__ */ e("span", { className: "ds:flex ds:flex-wrap ds:gap-[var(--spacing-2xs)]", children: o.map((r) => /* @__PURE__ */ e(
531
+ He,
532
+ {
533
+ variant: r.variant,
534
+ size: "sm",
535
+ leading: r.icon,
536
+ children: r.label
537
+ },
538
+ r.id
539
+ )) });
540
+ }
541
+ function Jn({
542
+ name: t,
543
+ avatarSrc: n,
544
+ unresolved: i = !1,
545
+ status: o,
546
+ flags: r,
547
+ age: a,
548
+ onOpenPatient: d,
549
+ highlightedAnamnesisCount: u = 0,
550
+ expiredAnamnesisCount: s = 0,
551
+ anamnesisAnswers: l = [],
552
+ locale: p
553
+ }) {
554
+ const { t: g, i18n: I } = O(), v = (y) => `calendarWorkspace.details.${y}`, { optionFor: R } = tt(o), w = o ? R(o) : void 0, T = u, S = s;
555
+ return /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)] ds:pb-0", children: [
556
+ /* @__PURE__ */ m("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
557
+ /* @__PURE__ */ e(_t, { name: t, src: n }),
558
+ /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)] ds:[min-inline-size:0]", children: [
559
+ /* @__PURE__ */ m("span", { className: "ds:flex ds:flex-wrap ds:items-baseline ds:gap-[var(--spacing-2xs)] ds:text-start", children: [
560
+ d ? /* @__PURE__ */ e(L, { size: "sm", intent: "link", onClick: () => d(), children: t }) : /* @__PURE__ */ e("span", { className: "ds:font-[var(--font-weight-semibold)] ds:truncate", children: t }),
561
+ a !== void 0 ? /* @__PURE__ */ e("span", { className: "type-body-sm ds:text-[color:var(--muted-foreground)]", children: g(v("patientAge"), { n: a }) }) : null
562
+ ] }),
563
+ i ? /* @__PURE__ */ e("span", { className: "type-body-sm ds:text-start ds:text-[color:var(--muted-foreground)]", children: g(v("patientNotLoaded")) }) : null,
564
+ o && w ? /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(
565
+ He,
566
+ {
567
+ variant: Yn[o],
568
+ size: "sm",
569
+ leading: w.icon,
570
+ children: w.label
571
+ }
572
+ ) }) : null,
573
+ /* @__PURE__ */ e(Qn, { event: r })
574
+ ] })
575
+ ] }),
576
+ T + S > 0 ? /* @__PURE__ */ m(
577
+ z,
578
+ {
579
+ variant: "warning",
580
+ announce: "off",
581
+ icon: /* @__PURE__ */ e(at, { "aria-hidden": "true" }),
582
+ children: [
583
+ /* @__PURE__ */ e(z.Title, { as: "p", children: g(v("anamnesisTitle")) }),
584
+ /* @__PURE__ */ e(z.Description, { children: [
585
+ T > 0 ? g(v("anamnesisHighlighted"), { n: T }) : null,
586
+ S > 0 ? g(v("anamnesisExpired"), { n: S }) : null
587
+ ].filter((y) => y !== null).join(" · ") }),
588
+ l.length > 0 ? (
589
+ /* Question · yes or no · answer · interview date, as the
590
+ platform's details dialog lists them. A list, not a
591
+ Description, which renders a <p>. */
592
+ /* @__PURE__ */ e("ul", { className: "type-body-sm ds:m-0 ds:mt-[var(--spacing-xs)] ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-2xs)] ds:p-0", children: l.map((y) => /* @__PURE__ */ m("li", { className: "ds:text-start", children: [
593
+ /* @__PURE__ */ e("span", { className: "ds:font-[var(--font-weight-semibold)]", children: y.question }),
594
+ ` · ${g(v(y.yes ? "anamnesisYes" : "anamnesisNo"))}`,
595
+ y.answer ? ` · ${y.answer}` : "",
596
+ ` · ${ze(p ?? I.language, y.interviewIso)}`
597
+ ] }, y.question)) })
598
+ ) : null
599
+ ]
600
+ }
601
+ ) : null
602
+ ] });
603
+ }
604
+ function Ze({
605
+ eyebrow: t,
606
+ heading: n,
607
+ facts: i
608
+ }) {
609
+ return /* @__PURE__ */ m(Y, { children: [
610
+ /* @__PURE__ */ e(me.Eyebrow, { children: t }),
611
+ /* @__PURE__ */ e(me.Heading, { children: n }),
612
+ i && i.length > 0 ? /* @__PURE__ */ e(me.Body, { children: /* @__PURE__ */ e("ul", { className: "ds:m-0 ds:flex ds:list-none ds:flex-col ds:gap-[var(--spacing-2xs)] ds:p-0 type-body-sm", children: i.map((o, r) => /* @__PURE__ */ e(
613
+ "li",
614
+ {
615
+ className: o.muted ? "ds:text-[color:var(--muted-foreground)]" : void 0,
616
+ children: o.text
617
+ },
618
+ r
619
+ )) }) }) : null
620
+ ] });
621
+ }
622
+ const Xn = "ds:inline-flex ds:cursor-pointer ds:rounded-[var(--radius-full)] ds:p-0 ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]";
623
+ function At({
624
+ id: t,
625
+ eyebrow: n,
626
+ heading: i,
627
+ facts: o,
628
+ children: r
629
+ }) {
630
+ return /* @__PURE__ */ m(me, { children: [
631
+ /* @__PURE__ */ e(me.Trigger, { asChild: !0, children: /* @__PURE__ */ e("button", { type: "button", "data-chip-hover": t, className: Xn, children: r }) }),
632
+ /* @__PURE__ */ e(me.Content, { side: "bottom", align: "start", size: "sm", children: /* @__PURE__ */ e(Ze, { eyebrow: n, heading: i, facts: o }) })
633
+ ] });
634
+ }
635
+ const c = (t) => `calendarWorkspace.details.${t}`, Zn = "type-body-sm ds:text-[color:var(--muted-foreground)]", Ft = (t) => /* @__PURE__ */ e("a", { href: `tel:${t.replace(/\s/g, "")}`, dir: "ltr", children: t }), Wt = (t) => /* @__PURE__ */ e("a", { href: `mailto:${t}`, dir: "ltr", children: t }), jt = (t, n, i) => new Intl.NumberFormat(t, { style: "currency", currency: i }).format(n);
636
+ function Tt({ rows: t }) {
637
+ const n = t.filter((i) => !!i);
638
+ return n.length === 0 ? null : /* @__PURE__ */ e(_e, { layout: "inline", density: "compact", children: n.map((i) => /* @__PURE__ */ m(
639
+ _e.Row,
640
+ {
641
+ "data-row": i.id,
642
+ icon: i.icon,
643
+ children: [
644
+ /* @__PURE__ */ e(_e.Term, { children: i.label }),
645
+ /* @__PURE__ */ e(_e.Detail, { children: i.value })
646
+ ]
647
+ },
648
+ i.id
649
+ )) });
650
+ }
651
+ function ea({
652
+ details: t,
653
+ locale: n,
654
+ currency: i,
655
+ now: o,
656
+ mapsLink: r = !1
657
+ }) {
658
+ const { t: a } = O(), { patient: d, signing: u, money: s, booking: l } = t;
659
+ if (!d) return null;
660
+ const p = u && u.required > 0 ? u : void 0, g = ((p == null ? void 0 : p.toComplete) ?? 0) > 0, I = p ? [
661
+ {
662
+ text: g ? p.requestedVia === "sms" ? a(c("signingRequestedSms")) : p.requestedVia === "email" ? a(c("signingRequestedEmail")) : a(c("signingNotRequested")) : a(c("signingAllSigned"))
663
+ },
664
+ ...p.aesSetUp ? [] : [{ text: a(c("aesMissing")), muted: !0 }]
665
+ ] : [], v = d.highlightedAnamnesisCount ?? 0, R = d.expiredAnamnesisCount ?? 0, w = (d.highlightedAnamnesisAnswers ?? []).map((N) => ({
666
+ text: [
667
+ N.question,
668
+ a(c(N.yes ? "anamnesisYes" : "anamnesisNo")),
669
+ N.answer,
670
+ ze(n, N.interviewIso)
671
+ ].filter(Boolean).join(" · ")
672
+ })), T = Bt(d), S = Un(d) || T, y = [
673
+ ...d.dobIso ? [
674
+ {
675
+ id: "dob",
676
+ label: a(c("dob")),
677
+ icon: /* @__PURE__ */ e(Pn, {}),
678
+ value: `${ze(n, d.dobIso)} ${a(
679
+ c("patientAge"),
680
+ {
681
+ n: Bn(d.dobIso, o)
682
+ }
683
+ )}`
684
+ }
685
+ ] : [],
686
+ ...Kn(d).map((N, W) => {
687
+ const j = N.label === "mobile" || N.label === "home" || N.label === "work";
688
+ return {
689
+ id: `phone-${W}`,
690
+ label: a(j ? `calendarWorkspace.print.phoneLabels.${N.label}` : c("phone")),
691
+ icon: N.label === "mobile" ? /* @__PURE__ */ e(hn, {}) : /* @__PURE__ */ e(fn, {}),
692
+ value: Ft(N.number)
693
+ };
694
+ }),
695
+ ...d.email ? [
696
+ {
697
+ id: "email",
698
+ label: a(c("email")),
699
+ icon: /* @__PURE__ */ e(gn, {}),
700
+ value: Wt(d.email)
701
+ }
702
+ ] : [],
703
+ ...r ? [
704
+ {
705
+ id: "address",
706
+ label: a(c("address")),
707
+ icon: /* @__PURE__ */ e(vn, {}),
708
+ value: T ? /* @__PURE__ */ e(
709
+ "a",
710
+ {
711
+ href: Gn(d),
712
+ target: "_blank",
713
+ rel: "noopener noreferrer",
714
+ "aria-label": `${a(c("mapsLink"))}: ${S}`,
715
+ children: S
716
+ }
717
+ ) : /* @__PURE__ */ e("span", { className: Zn, children: a(c("noAddress")) })
718
+ }
719
+ ] : []
720
+ ], x = (s == null ? void 0 : s.unpaidAmount) ?? 0, D = (s == null ? void 0 : s.billableAmount) ?? 0, E = (l == null ? void 0 : l.paidOnlineAmount) ?? 0, Q = (N, W, j, U, ae, ie) => /* @__PURE__ */ e(
721
+ At,
722
+ {
723
+ id: j,
724
+ eyebrow: a(c("hoverBilling")),
725
+ heading: a(c(U), {
726
+ amount: jt(n, W, i)
727
+ }),
728
+ facts: [{ text: a(c(ae)) }],
729
+ children: /* @__PURE__ */ e(
730
+ mn,
731
+ {
732
+ "data-chip": j,
733
+ state: N,
734
+ amount: W,
735
+ currency: i,
736
+ locale: n,
737
+ size: "md",
738
+ showLabel: !0,
739
+ label: ie,
740
+ showIcon: !1
741
+ }
742
+ )
743
+ }
744
+ );
745
+ return /* @__PURE__ */ e(
746
+ Rt,
747
+ {
748
+ "data-card": "patient",
749
+ name: d.name,
750
+ avatarUrl: d.avatarSrc,
751
+ locale: n,
752
+ surface: "elevated",
753
+ density: "compact",
754
+ flags: {
755
+ unsignedDocumentsCount: (p == null ? void 0 : p.toComplete) ?? 0,
756
+ highlightedAnamnesisCount: v
757
+ },
758
+ flagHover: {
759
+ ...p ? {
760
+ unsignedDocuments: /* @__PURE__ */ e(
761
+ Ze,
762
+ {
763
+ eyebrow: a(c("sectionSigning")),
764
+ heading: p.toComplete === 1 ? a(c("signingToSignOne")) : a(c("signingToSignMany"), {
765
+ n: p.toComplete
766
+ }),
767
+ facts: I
768
+ }
769
+ )
770
+ } : {},
771
+ highlightedAnamnesis: /* @__PURE__ */ e(
772
+ Ze,
773
+ {
774
+ eyebrow: a(c("anamnesisTitle")),
775
+ heading: a(c("anamnesisHighlighted"), { n: v }),
776
+ facts: w
777
+ }
778
+ )
779
+ },
780
+ extraChips: x > 0 || D > 0 || E > 0 || R > 0 ? /* @__PURE__ */ m(Y, { children: [
781
+ /* @__PURE__ */ m("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
782
+ x > 0 ? Q(
783
+ "debt",
784
+ x,
785
+ "unpaid",
786
+ "hoverUnpaidHeading",
787
+ "hoverUnpaidFact"
788
+ ) : null,
789
+ D > 0 ? Q(
790
+ "to-invoice",
791
+ D,
792
+ "billable",
793
+ "hoverBillableHeading",
794
+ "hoverBillableFact"
795
+ ) : null,
796
+ E > 0 ? Q(
797
+ "settled",
798
+ E,
799
+ "paidOnline",
800
+ "hoverPaidOnlineHeading",
801
+ "hoverPaidOnlineFact",
802
+ /* A deposit is settled money, but "Settled" hides where
803
+ it came from: the chip says what its hover card says. */
804
+ a(c("paidOnline"))
805
+ ) : null
806
+ ] }),
807
+ R > 0 ? /* @__PURE__ */ e(
808
+ At,
809
+ {
810
+ id: "anamnesisExpired",
811
+ eyebrow: a(c("anamnesisTitle")),
812
+ heading: a(c("anamnesisExpired"), { n: R }),
813
+ facts: [{ text: a(c("hoverAnamnesisExpiredFact")) }],
814
+ children: /* @__PURE__ */ e(
815
+ He,
816
+ {
817
+ "data-chip": "anamnesisExpired",
818
+ variant: "warning",
819
+ size: "md",
820
+ leading: /* @__PURE__ */ e(at, {}),
821
+ children: a(c("anamnesisExpired"), { n: R })
822
+ }
823
+ )
824
+ }
825
+ ) : null
826
+ ] }) : void 0,
827
+ visibleFieldOrder: y.map((N) => N.id),
828
+ sections: y.length > 0 ? [{ id: "contact", heading: a(c("sectionPatient")), fields: y }] : void 0
829
+ }
830
+ );
831
+ }
832
+ function ta({
833
+ details: t,
834
+ locale: n,
835
+ currency: i,
836
+ operator: o,
837
+ chair: r,
838
+ description: a,
839
+ privacy: d = !1
840
+ }) {
841
+ const { t: u } = O(), { appointment: s, booking: l, patient: p } = t, g = (E) => u(`calendarWorkspace.editor.${E}`), I = new Date(s.startIso), v = new Date(I.getTime() + s.durationMin * 6e4), R = Number.isFinite(I.getTime()), { recurrence: w } = s, T = w && qn[w.frequency], S = T ? u(`calendarWorkspace.editor.${T}`) : void 0, y = l ? [
842
+ l.bookedAtIso && {
843
+ id: "bookedAt",
844
+ label: u(c("bookedAt")),
845
+ value: /* @__PURE__ */ e(
846
+ pn,
847
+ {
848
+ value: l.bookedAtIso,
849
+ format: "absolute",
850
+ shape: "bare",
851
+ locale: n,
852
+ absoluteFormat: $t
853
+ }
854
+ )
855
+ },
856
+ l.typedName && {
857
+ id: "bookingName",
858
+ label: u(c("bookingName")),
859
+ value: l.typedName
860
+ },
861
+ l.phone && {
862
+ id: "bookingPhone",
863
+ label: u(c("bookingPhone")),
864
+ value: Ft(l.phone)
865
+ },
866
+ l.email && {
867
+ id: "bookingEmail",
868
+ label: u(c("bookingEmail")),
869
+ value: Wt(l.email)
870
+ },
871
+ l.note && {
872
+ id: "bookingNote",
873
+ label: u(c("bookingNote")),
874
+ value: l.note
875
+ },
876
+ /* With a patient the amount is a chip on the patient card. */
877
+ !p && l.paidOnlineAmount !== void 0 && {
878
+ id: "paidOnline",
879
+ label: u(c("paidOnline")),
880
+ value: jt(n, l.paidOnlineAmount, i)
881
+ }
882
+ ] : [], x = d ? y.filter((E) => E && E.id === "bookedAt") : y, D = x.some(Boolean);
883
+ return /* @__PURE__ */ m(
884
+ ne,
885
+ {
886
+ "data-card": "appointment",
887
+ title: u(c("sectionAppointment")),
888
+ headingLevel: 3,
889
+ children: [
890
+ a,
891
+ /* @__PURE__ */ e(
892
+ Tt,
893
+ {
894
+ rows: [
895
+ R && {
896
+ id: "date",
897
+ label: g("date"),
898
+ icon: /* @__PURE__ */ e(yn, {}),
899
+ value: ze(n, I)
900
+ },
901
+ R && {
902
+ id: "time",
903
+ label: u(c("time")),
904
+ icon: /* @__PURE__ */ e(Mt, {}),
905
+ value: s.allDay ? g("allDay") : $n(n, I, v)
906
+ },
907
+ !s.allDay && {
908
+ id: "duration",
909
+ label: g("duration"),
910
+ icon: /* @__PURE__ */ e(bn, {}),
911
+ value: `${s.durationMin} ${g("durationUnit")}`
912
+ },
913
+ s.isTelehealth && {
914
+ id: "type",
915
+ label: g("type"),
916
+ icon: /* @__PURE__ */ e(it, {}),
917
+ value: g("typeTelehealth")
918
+ },
919
+ o && {
920
+ id: "operator",
921
+ label: u(c("operator")),
922
+ /* A person, as on the grid: the avatar fills the icon slot. */
923
+ icon: /* @__PURE__ */ e(_t, { name: o.name, src: o.avatarSrc, size: "xs" }),
924
+ value: o.name
925
+ },
926
+ r && {
927
+ id: "chair",
928
+ label: u(c("chair")),
929
+ icon: /* @__PURE__ */ e(wt, {}),
930
+ value: /* @__PURE__ */ e(He, { variant: "neutral", size: "sm", leading: /* @__PURE__ */ e(wt, {}), children: r.name })
931
+ },
932
+ s.branchLabel && {
933
+ id: "branch",
934
+ label: g("branch"),
935
+ icon: /* @__PURE__ */ e(kn, {}),
936
+ value: s.branchLabel
937
+ },
938
+ S && w && {
939
+ id: "series",
940
+ label: u(c("seriesLabel")),
941
+ icon: /* @__PURE__ */ e(zt, {}),
942
+ value: w.count === void 0 ? S : u(c("seriesRule"), {
943
+ frequency: S,
944
+ count: w.count
945
+ })
946
+ }
947
+ ]
948
+ }
949
+ ),
950
+ D ? /* @__PURE__ */ m(
951
+ "div",
952
+ {
953
+ "data-block": "booking",
954
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
955
+ children: [
956
+ /* @__PURE__ */ e("h4", { className: "ds:m-0 type-label ds:text-[color:var(--muted-foreground)]", children: u(c("sectionBooking")) }),
957
+ /* @__PURE__ */ e(Tt, { rows: x })
958
+ ]
959
+ }
960
+ ) : null
961
+ ]
962
+ }
963
+ );
964
+ }
965
+ function na({
966
+ details: t,
967
+ locale: n,
968
+ currency: i,
969
+ privacy: o = !1
970
+ }) {
971
+ const { t: r } = O(), { care: a } = t, d = o || a == null ? void 0 : a.plan;
972
+ return !a || !d && a.lines.length === 0 ? null : /* @__PURE__ */ m(
973
+ ne,
974
+ {
975
+ "data-card": "treatments",
976
+ title: r(c("sectionTreatments")),
977
+ headingLevel: 3,
978
+ children: [
979
+ d ? /* @__PURE__ */ m("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] type-title-item", children: [
980
+ /* @__PURE__ */ e(
981
+ Ot,
982
+ {
983
+ "aria-hidden": "true",
984
+ className: "ds:size-4 ds:shrink-0 ds:text-[color:var(--muted-foreground)]"
985
+ }
986
+ ),
987
+ d.number ? r(c("planLine"), { number: d.number, name: d.name }) : d.name
988
+ ] }) : null,
989
+ a.lines.length > 0 ? /* @__PURE__ */ e(
990
+ Pt,
991
+ {
992
+ lines: a.lines.map(({ entryId: u, careId: s, ...l }) => ({
993
+ id: u,
994
+ ...l
995
+ })),
996
+ locale: n,
997
+ currency: i
998
+ }
999
+ ) : null
1000
+ ]
1001
+ }
1002
+ );
1003
+ }
1004
+ const St = 3;
1005
+ function aa({
1006
+ preview: t,
1007
+ onOpenNotes: n,
1008
+ locale: i
1009
+ }) {
1010
+ const { t: o } = O(), r = Ue(), a = t.status ?? "ready", d = C(!1);
1011
+ te(() => {
1012
+ d.current && (a !== "loading" && (d.current = !1), Ae(r));
1013
+ }, [a, r]);
1014
+ const u = t.total ?? (a === "ready" ? t.notes.length : null), s = Math.max(0, (u ?? 0) - St), l = s > 0 ? o(c("notesMore"), { n: s }) : o(c("notesPreviewOpen"));
1015
+ return /* @__PURE__ */ m(
1016
+ ne,
1017
+ {
1018
+ "data-card": "notes",
1019
+ headingId: r,
1020
+ headingLevel: 3,
1021
+ title: u === null ? o("notesPanel.title") : o(c("notesPreviewTitle"), { count: u }),
1022
+ headerAction: n && (u ?? 0) > 0 ? /* @__PURE__ */ m("span", { className: "ds:relative ds:inline-flex", children: [
1023
+ /* @__PURE__ */ e(
1024
+ Dt,
1025
+ {
1026
+ icon: /* @__PURE__ */ e(wn, { "aria-hidden": "true" }),
1027
+ intent: "outline",
1028
+ size: "sm",
1029
+ "data-action": "open-patient-notes",
1030
+ "aria-label": l,
1031
+ tooltip: l,
1032
+ onClick: () => n()
1033
+ }
1034
+ ),
1035
+ s > 0 ? (
1036
+ /* Decorative: the button's name already says the count. */
1037
+ /* @__PURE__ */ e(
1038
+ un,
1039
+ {
1040
+ variant: "outline",
1041
+ size: "sm",
1042
+ background: "surface",
1043
+ count: s,
1044
+ "aria-hidden": "true",
1045
+ className: "ds:pointer-events-none ds:absolute ds:-top-[var(--spacing-2xs)] ds:-end-[var(--spacing-2xs)]"
1046
+ }
1047
+ )
1048
+ ) : null
1049
+ ] }) : void 0,
1050
+ children: [
1051
+ a === "error" ? /* @__PURE__ */ m(z, { variant: "error", children: [
1052
+ /* @__PURE__ */ e(z.Description, { children: o("notesPanel.loadError") }),
1053
+ t.onRetry ? /* @__PURE__ */ e(z.Action, { children: /* @__PURE__ */ e(
1054
+ L,
1055
+ {
1056
+ intent: "secondary",
1057
+ size: "sm",
1058
+ onClick: () => {
1059
+ var p;
1060
+ d.current = !0, (p = t.onRetry) == null || p.call(t);
1061
+ },
1062
+ children: o("notesPanel.retry")
1063
+ }
1064
+ ) }) : null
1065
+ ] }) : null,
1066
+ t.notes.length === 0 && a === "loading" ? /* @__PURE__ */ m(Y, { children: [
1067
+ /* @__PURE__ */ e("span", { role: "status", className: "ds:sr-only", children: o("notesPanel.loading") }),
1068
+ /* @__PURE__ */ e(Ve, { notes: [], loading: !0, loadingRows: 2 })
1069
+ ] }) : a !== "error" || t.notes.length > 0 ? (
1070
+ /* A note click, or Enter or Space on it, goes straight to that note
1071
+ in the Notes tool; the header button opens the tool at the top. */
1072
+ /* @__PURE__ */ e(
1073
+ Ve,
1074
+ {
1075
+ notes: t.notes,
1076
+ maxItems: St,
1077
+ locale: i,
1078
+ "aria-labelledby": r,
1079
+ onNoteActivate: n,
1080
+ emptyState: /* @__PURE__ */ e("p", { className: "ds:m-0 type-body-sm ds:text-[color:var(--muted-foreground)]", children: o(c("notesPreviewEmpty")) })
1081
+ }
1082
+ )
1083
+ ) : null
1084
+ ]
1085
+ }
1086
+ );
1087
+ }
1088
+ const ia = et("ds:flex ds:h-full ds:min-h-0 ds:flex-col"), sa = et(
1089
+ "ds:flex ds:shrink-0 ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:border-t ds:border-[color:var(--border)] ds:p-[var(--spacing-sm)]"
1090
+ ), oa = et(
1091
+ "ds:shrink-0 ds:rounded-[var(--radius-md)] ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
1092
+ ), K = "ds:[.theme-accessible_&]:[min-block-size:var(--min-target-size)]", ra = "ds:[.theme-accessible_&>button]:[min-block-size:var(--min-target-size)]", la = [
1093
+ "ds:[.theme-accessible_&_button:has(svg.lucide-ellipsis)]:[min-block-size:var(--min-target-size)]",
1094
+ "ds:[.theme-accessible_&_button:has(svg.lucide-ellipsis)]:[min-inline-size:var(--min-target-size)]"
1095
+ ].join(" "), qt = ["40%", "33%", "50%", "25%"], da = [
1096
+ "bill",
1097
+ "folder",
1098
+ "template",
1099
+ "empty",
1100
+ "identification",
1101
+ "webcam"
1102
+ ], ca = {
1103
+ bill: /* @__PURE__ */ e(Cn, { "aria-hidden": "true" }),
1104
+ folder: /* @__PURE__ */ e(En, { "aria-hidden": "true" }),
1105
+ template: /* @__PURE__ */ e(Dn, { "aria-hidden": "true" }),
1106
+ empty: /* @__PURE__ */ e(In, { "aria-hidden": "true" }),
1107
+ identification: /* @__PURE__ */ e(_n, { "aria-hidden": "true" }),
1108
+ webcam: /* @__PURE__ */ e(Sn, { "aria-hidden": "true" })
1109
+ }, k = (t) => `calendarWorkspace.details.${t}`;
1110
+ function It({
1111
+ children: t,
1112
+ startIcon: n,
1113
+ overflowItems: i,
1114
+ "data-action": o,
1115
+ intent: r,
1116
+ background: a,
1117
+ size: d,
1118
+ hideLabel: u
1119
+ }) {
1120
+ return /* @__PURE__ */ m(Me.Root, { children: [
1121
+ /* @__PURE__ */ e(tn, { label: t, side: "top", children: /* @__PURE__ */ e(Me.Trigger, { asChild: !0, children: /* @__PURE__ */ e(
1122
+ L,
1123
+ {
1124
+ intent: r,
1125
+ background: a,
1126
+ size: d,
1127
+ "data-action": o,
1128
+ className: K,
1129
+ startIcon: n,
1130
+ "aria-haspopup": "menu",
1131
+ endIcon: /* @__PURE__ */ e(Tn, { "aria-hidden": "true" }),
1132
+ children: u ? /* @__PURE__ */ e("span", { className: "ds:sr-only", children: t }) : t
1133
+ }
1134
+ ) }) }),
1135
+ /* @__PURE__ */ e(Me.Content, { align: "end", children: i.map((s) => /* @__PURE__ */ e(
1136
+ Me.Item,
1137
+ {
1138
+ "data-action": s.action,
1139
+ startIcon: s.icon,
1140
+ onSelect: s.onSelect,
1141
+ children: s.label
1142
+ },
1143
+ s.label
1144
+ )) })
1145
+ ] });
1146
+ }
1147
+ function ua() {
1148
+ const { t } = O();
1149
+ return /* @__PURE__ */ m(Y, { children: [
1150
+ /* @__PURE__ */ e("span", { role: "status", className: "ds:sr-only", children: t("common.loading") }),
1151
+ /* @__PURE__ */ m(
1152
+ "div",
1153
+ {
1154
+ "aria-hidden": "true",
1155
+ className: "ds:flex ds:min-h-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-sm)] ds:overflow-hidden ds:p-[var(--spacing-md)] ds:[&>*]:shrink-0",
1156
+ children: [
1157
+ /* @__PURE__ */ e(
1158
+ Rt,
1159
+ {
1160
+ name: "",
1161
+ loading: !0,
1162
+ surface: "elevated",
1163
+ density: "compact"
1164
+ }
1165
+ ),
1166
+ /* @__PURE__ */ m(ne, { title: t(k("sectionAppointment")), headingLevel: 3, children: [
1167
+ /* @__PURE__ */ e(Et, { loading: !0, maxLines: 2 }),
1168
+ /* @__PURE__ */ e("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: qt.map((n, i) => /* @__PURE__ */ m(
1169
+ "div",
1170
+ {
1171
+ className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
1172
+ children: [
1173
+ /* @__PURE__ */ e(
1174
+ ue,
1175
+ {
1176
+ variant: "rounded",
1177
+ stagger: i + 2,
1178
+ width: "var(--spacing-md)",
1179
+ height: "var(--spacing-md)",
1180
+ className: "ds:shrink-0"
1181
+ }
1182
+ ),
1183
+ /* @__PURE__ */ e(
1184
+ ue,
1185
+ {
1186
+ variant: "text",
1187
+ size: "sm",
1188
+ stagger: i + 2,
1189
+ width: n
1190
+ }
1191
+ )
1192
+ ]
1193
+ },
1194
+ n
1195
+ )) })
1196
+ ] }),
1197
+ /* @__PURE__ */ e(ne, { title: t("notesPanel.title"), headingLevel: 3, children: /* @__PURE__ */ e(Ve, { notes: [], loading: !0, loadingRows: 2 }) }),
1198
+ /* @__PURE__ */ e(ne, { title: t(k("sectionTreatments")), headingLevel: 3, children: /* @__PURE__ */ e(Pt, { lines: [], loading: !0 }) })
1199
+ ]
1200
+ }
1201
+ ),
1202
+ /* @__PURE__ */ m(
1203
+ "div",
1204
+ {
1205
+ "aria-hidden": "true",
1206
+ className: "ds:flex ds:shrink-0 ds:items-center ds:gap-[var(--spacing-sm)] ds:border-t ds:border-[color:var(--border)] ds:p-[var(--spacing-md)]",
1207
+ children: [
1208
+ /* @__PURE__ */ e(ue, { variant: "rounded", width: "33%", height: "var(--spacing-xl)" }),
1209
+ /* @__PURE__ */ e(
1210
+ ue,
1211
+ {
1212
+ variant: "rounded",
1213
+ stagger: 1,
1214
+ height: "var(--spacing-xl)",
1215
+ className: "ds:flex-1"
1216
+ }
1217
+ )
1218
+ ]
1219
+ }
1220
+ )
1221
+ ] });
1222
+ }
1223
+ function pa({
1224
+ history: t,
1225
+ locale: n,
1226
+ onRetry: i
1227
+ }) {
1228
+ var g;
1229
+ const { t: o } = O(), r = t.status ?? (t.entries ? "ready" : "loading"), a = r === "error" ? void 0 : t.entries, d = r === "loading" || r !== "error" && !a, [u, s] = _(!1);
1230
+ pe(() => s(!0), []);
1231
+ let l = "";
1232
+ d ? l = o("common.loading") : a && (l = a.length === 0 ? o(k("historyEmpty")) : o(k("historyLoaded"), { n: a.length }));
1233
+ let p;
1234
+ return r === "error" ? p = /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1235
+ /* @__PURE__ */ e(z, { variant: "error", children: /* @__PURE__ */ e(z.Description, { children: ((g = t.message) == null ? void 0 : g.trim()) || o("emptyState.error.description") }) }),
1236
+ i ? /* @__PURE__ */ e(
1237
+ L,
1238
+ {
1239
+ intent: "outline",
1240
+ "data-action": "retry-history",
1241
+ onClick: () => i(),
1242
+ children: o("emptyState.error.cta")
1243
+ }
1244
+ ) : null
1245
+ ] }) : d || !a ? p = /* @__PURE__ */ e(
1246
+ "div",
1247
+ {
1248
+ "aria-hidden": "true",
1249
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
1250
+ children: qt.slice(0, 3).map((I, v) => /* @__PURE__ */ m(
1251
+ "div",
1252
+ {
1253
+ className: "ds:flex ds:items-start ds:gap-[var(--spacing-sm)]",
1254
+ children: [
1255
+ /* @__PURE__ */ e(
1256
+ ue,
1257
+ {
1258
+ variant: "circular",
1259
+ stagger: v,
1260
+ width: "var(--spacing-xl)",
1261
+ height: "var(--spacing-xl)",
1262
+ className: "ds:shrink-0"
1263
+ }
1264
+ ),
1265
+ /* @__PURE__ */ e(
1266
+ ue,
1267
+ {
1268
+ variant: "rounded",
1269
+ stagger: v,
1270
+ width: I,
1271
+ height: "var(--spacing-2xl)"
1272
+ }
1273
+ )
1274
+ ]
1275
+ },
1276
+ I
1277
+ ))
1278
+ }
1279
+ ) : p = /* @__PURE__ */ e(Vn, { history: a, locale: n }), /* @__PURE__ */ m(Y, { children: [
1280
+ /* @__PURE__ */ e("span", { role: "status", className: "ds:sr-only", children: u ? l : "" }),
1281
+ p
1282
+ ] });
1283
+ }
1284
+ function ma({
1285
+ read: t,
1286
+ refreshing: n,
1287
+ currency: i,
1288
+ now: o,
1289
+ locale: r,
1290
+ shownTitle: a,
1291
+ headingId: d,
1292
+ enter: u,
1293
+ live: s,
1294
+ statusControl: l,
1295
+ patientId: p = ((De) => (De = t.patient) == null ? void 0 : De.id)(),
1296
+ operator: g,
1297
+ chair: I,
1298
+ privacy: v = !1,
1299
+ privacyTitle: R,
1300
+ mapsLink: w,
1301
+ notesPreview: T,
1302
+ onOpenNotes: S,
1303
+ history: y,
1304
+ onOpenHistory: x,
1305
+ readOnly: D = !1,
1306
+ onStatusChange: E,
1307
+ allowedStatuses: Q = bt,
1308
+ onDescriptionChange: N,
1309
+ onEdit: W,
1310
+ onMove: j,
1311
+ onCopy: U,
1312
+ onDelete: ae,
1313
+ onJoinTelehealth: ie,
1314
+ onWhatsApp: Te,
1315
+ whatsappUrl: Se,
1316
+ createTaskUrl: Ie,
1317
+ documents: J
1318
+ }) {
1319
+ var mt, ht;
1320
+ const { t: h } = O(), { eventId: P } = t, [$e] = _(u), se = { details: t, locale: r, currency: i }, A = y ? y.eventId !== void 0 && y.eventId !== P ? { status: "loading" } : y : t.history ? { entries: t.history } : void 0, Ee = (T == null ? void 0 : T.patientId) === void 0 || T.patientId === p, oe = T ? Ee ? T : p ? { notes: [], status: "loading", total: null } : void 0 : void 0, X = !!N && !D && !v, [he, G] = _(!1), [fe, q] = _(!1), Z = he && A !== void 0, Ce = fe && X, ge = () => {
1321
+ Z || !A || (G(!0), x == null || x(P));
1322
+ }, Re = C({ history: !1, editor: !1 });
1323
+ te(() => {
1324
+ const f = Re.current;
1325
+ Re.current = { history: Z, editor: Ce };
1326
+ const ce = f.history && A === void 0, ft = f.editor && !X;
1327
+ ce && G(!1), ft && q(!1), (ce || ft) && Ae(d);
1328
+ });
1329
+ const re = C(null), M = C(!1), ve = (A == null ? void 0 : A.status) ?? (A != null && A.entries ? "ready" : "loading");
1330
+ te(() => {
1331
+ M.current && (ve !== "loading" && (M.current = !1), Je(re.current));
1332
+ }, [ve]);
1333
+ const [F, ye] = _(t.appointment.name ?? "");
1334
+ pe(() => {
1335
+ ye(t.appointment.name ?? "");
1336
+ }, [t.appointment.name]);
1337
+ const [be, ee] = _(""), [le, ke] = _(!1), [b, H] = _(), de = C(null);
1338
+ pe(() => {
1339
+ fe && (ee(F), H(void 0));
1340
+ }, [fe]);
1341
+ const Pe = async () => {
1342
+ if (!N) return;
1343
+ const f = be.trim();
1344
+ ke(!0), H(void 0);
1345
+ try {
1346
+ await N(f, P), ye(f), q(!1);
1347
+ } catch (ce) {
1348
+ H(
1349
+ Ge(ce, h(k("descriptionSaveFailed")))
1350
+ );
1351
+ } finally {
1352
+ ke(!1);
1353
+ }
1354
+ }, [$, Be] = _(t.appointment.status);
1355
+ pe(() => {
1356
+ Be(t.appointment.status);
1357
+ }, [t.appointment.status]);
1358
+ const st = C(n);
1359
+ te(() => {
1360
+ const f = st.current && !n;
1361
+ st.current = n, f && (Be(t.appointment.status), ye(t.appointment.name ?? ""));
1362
+ }, [n]);
1363
+ const Le = bt.filter(
1364
+ (f) => Q.includes(f)
1365
+ ), we = tt($, {
1366
+ statuses: Le,
1367
+ /* Shown so the control can say it, but not a choice. */
1368
+ disabledStatuses: $ && !Le.includes($) ? [$] : []
1369
+ }), xe = !!E && !D && Le.some((f) => f !== $), Kt = async (f) => {
1370
+ if (!(!E || !an(f))) {
1371
+ try {
1372
+ await E(f, P);
1373
+ } catch (ce) {
1374
+ throw new Error(Ge(ce, h(k("statusSaveFailed"))));
1375
+ }
1376
+ Be(f);
1377
+ }
1378
+ }, ot = v ? void 0 : Se, rt = da.filter(
1379
+ (f) => J == null ? void 0 : J.kinds.includes(f)
1380
+ ), Ut = (((mt = t.care) == null ? void 0 : mt.lines.length) ?? 0) > 0, lt = p !== void 0 && p !== "", Fe = h(k("status")), dt = `${Fe}: ${we.option.label}`, We = C(null), ct = C(xe);
1381
+ te(() => {
1382
+ const f = ct.current && !xe;
1383
+ ct.current = xe, f && (We.current ? Je(We.current) : Ae(d));
1384
+ });
1385
+ const ut = xe ? /* @__PURE__ */ e(
1386
+ nn,
1387
+ {
1388
+ ref: l,
1389
+ value: we.value,
1390
+ options: we.options,
1391
+ size: "sm",
1392
+ workflowLabel: Fe,
1393
+ className: `ds:[&>button]:bg-[color:var(--background)] ${ra}`,
1394
+ "aria-label": dt,
1395
+ onValueChange: Kt
1396
+ }
1397
+ ) : $ ? (
1398
+ /* Named as the control is, "Status: Confirmed": the small display
1399
+ prints the value alone. */
1400
+ /* @__PURE__ */ e(
1401
+ "div",
1402
+ {
1403
+ ref: We,
1404
+ role: "group",
1405
+ "aria-label": dt,
1406
+ tabIndex: -1,
1407
+ "data-status-display": "",
1408
+ className: oa(),
1409
+ children: /* @__PURE__ */ e(
1410
+ Ye,
1411
+ {
1412
+ value: we.value,
1413
+ size: "sm",
1414
+ workflowLabel: Fe,
1415
+ option: we.option
1416
+ }
1417
+ )
1418
+ }
1419
+ )
1420
+ ) : null, B = [];
1421
+ ie && B.push([
1422
+ "join-telehealth",
1423
+ /* @__PURE__ */ e(
1424
+ L,
1425
+ {
1426
+ intent: "primary",
1427
+ "data-action": "join-telehealth",
1428
+ className: K,
1429
+ startIcon: /* @__PURE__ */ e(it, { "aria-hidden": "true" }),
1430
+ onClick: () => ie(P),
1431
+ children: h(k("joinTelehealth"))
1432
+ },
1433
+ "join"
1434
+ )
1435
+ ]), !D && W && B.push([
1436
+ "edit-appointment",
1437
+ /* @__PURE__ */ e(
1438
+ L,
1439
+ {
1440
+ "data-action": "edit-appointment",
1441
+ className: K,
1442
+ startIcon: /* @__PURE__ */ e(Qe, { "aria-hidden": "true" }),
1443
+ onClick: () => W(P),
1444
+ children: h("calendarWorkspace.editor.editTitle")
1445
+ },
1446
+ "edit"
1447
+ )
1448
+ ]), !D && j && B.push([
1449
+ "move-appointment",
1450
+ /* @__PURE__ */ e(
1451
+ L,
1452
+ {
1453
+ "data-action": "move-appointment",
1454
+ className: K,
1455
+ startIcon: /* @__PURE__ */ e(Ht, { "aria-hidden": "true" }),
1456
+ onClick: () => j(P),
1457
+ children: h(k("move"))
1458
+ },
1459
+ "move"
1460
+ )
1461
+ ]), !D && U && B.push([
1462
+ "copy-appointment",
1463
+ Ut ? /* @__PURE__ */ e(
1464
+ It,
1465
+ {
1466
+ "data-action": "copy-appointment",
1467
+ "data-overflow-tip": !1,
1468
+ startIcon: /* @__PURE__ */ e(Nt, { "aria-hidden": "true" }),
1469
+ overflowItems: [
1470
+ {
1471
+ label: h("calendarWorkspace.editor.duplicateAppointmentOnly"),
1472
+ icon: /* @__PURE__ */ e(xn, { "aria-hidden": "true" }),
1473
+ action: "copy-appointment-only",
1474
+ onSelect: () => U(!1, P)
1475
+ },
1476
+ {
1477
+ label: h("calendarWorkspace.editor.duplicateWithTreatments"),
1478
+ icon: /* @__PURE__ */ e(Ot, { "aria-hidden": "true" }),
1479
+ action: "copy-appointment-with-treatments",
1480
+ onSelect: () => U(!0, P)
1481
+ }
1482
+ ],
1483
+ children: h(k("copy"))
1484
+ },
1485
+ "copy"
1486
+ ) : /* @__PURE__ */ e(
1487
+ L,
1488
+ {
1489
+ "data-action": "copy-appointment",
1490
+ className: K,
1491
+ startIcon: /* @__PURE__ */ e(Nt, { "aria-hidden": "true" }),
1492
+ onClick: () => U(!1, P),
1493
+ children: h(k("copy"))
1494
+ },
1495
+ "copy"
1496
+ )
1497
+ ]), J && rt.length > 0 && B.push([
1498
+ "open-create-document",
1499
+ /* @__PURE__ */ e(
1500
+ It,
1501
+ {
1502
+ "data-action": "open-create-document",
1503
+ "data-overflow-tip": !1,
1504
+ startIcon: /* @__PURE__ */ e(Nn, { "aria-hidden": "true" }),
1505
+ overflowItems: rt.map((f) => ({
1506
+ label: h(k(`documents.${f}`)),
1507
+ icon: ca[f],
1508
+ action: `create-document-${f}`,
1509
+ onSelect: () => J.onCreate(f, P)
1510
+ })),
1511
+ children: h(k("documents.label"))
1512
+ },
1513
+ "documents"
1514
+ )
1515
+ ]), Te ? B.push([
1516
+ "open-whatsapp",
1517
+ /* @__PURE__ */ e(
1518
+ L,
1519
+ {
1520
+ "data-action": "open-whatsapp",
1521
+ className: K,
1522
+ startIcon: /* @__PURE__ */ e(yt, { "aria-hidden": "true" }),
1523
+ onClick: () => Te(P),
1524
+ children: h(k("remindWhatsApp"))
1525
+ },
1526
+ "whatsapp"
1527
+ )
1528
+ ]) : ot && B.push([
1529
+ "open-whatsapp",
1530
+ /* @__PURE__ */ e(
1531
+ L,
1532
+ {
1533
+ asChild: !0,
1534
+ "data-action": "open-whatsapp",
1535
+ className: K,
1536
+ startIcon: /* @__PURE__ */ e(yt, { "aria-hidden": "true" }),
1537
+ children: /* @__PURE__ */ e("a", { href: ot, target: "_blank", rel: "noopener noreferrer", children: h(k("remindWhatsApp")) })
1538
+ },
1539
+ "whatsapp"
1540
+ )
1541
+ ]), Ie && B.push([
1542
+ "create-task",
1543
+ /* @__PURE__ */ e(
1544
+ L,
1545
+ {
1546
+ asChild: !0,
1547
+ "data-action": "create-task",
1548
+ className: K,
1549
+ startIcon: /* @__PURE__ */ e(An, { "aria-hidden": "true" }),
1550
+ children: /* @__PURE__ */ e("a", { href: Ie, children: h(k("createTask")) })
1551
+ },
1552
+ "task"
1553
+ )
1554
+ ]), !D && ae && B.push([
1555
+ "delete-appointment",
1556
+ /* @__PURE__ */ e(
1557
+ L,
1558
+ {
1559
+ intent: "destructiveOutline",
1560
+ "data-action": "delete-appointment",
1561
+ className: K,
1562
+ startIcon: /* @__PURE__ */ e(Lt, { "aria-hidden": "true" }),
1563
+ onClick: () => ae(P),
1564
+ children: h("calendarWorkspace.editor.delete")
1565
+ },
1566
+ "delete"
1567
+ )
1568
+ ]);
1569
+ const je = B.map(([, f]) => f);
1570
+ s.current = {
1571
+ status: $ ?? null,
1572
+ allowed: xe ? Le : [],
1573
+ offered: B.map(([f]) => f),
1574
+ historyAvailable: A !== void 0,
1575
+ historyOpen: Z,
1576
+ openHistory: ge,
1577
+ closeHistory: () => G(!1)
1578
+ };
1579
+ const pt = h(k("historyBack"));
1580
+ return /* @__PURE__ */ e(
1581
+ "div",
1582
+ {
1583
+ className: `ds:flex ds:min-h-0 ds:flex-1 ds:flex-col ${$e ? Zt : ""}`,
1584
+ children: /* @__PURE__ */ m(Ke.Host, { children: [
1585
+ /* @__PURE__ */ e(
1586
+ Ct,
1587
+ {
1588
+ title: a,
1589
+ headingId: d,
1590
+ icon: /* @__PURE__ */ e(nt, { "aria-hidden": "true" }),
1591
+ sticky: !0,
1592
+ divider: !0,
1593
+ actions: A ? /* @__PURE__ */ e(
1594
+ Dt,
1595
+ {
1596
+ size: "sm",
1597
+ intent: "ghost",
1598
+ icon: /* @__PURE__ */ e(xt, { "aria-hidden": "true" }),
1599
+ "aria-label": h(k("historyAction")),
1600
+ tooltip: h(k("historyAction")),
1601
+ "data-action": "open-history",
1602
+ onClick: ge
1603
+ }
1604
+ ) : void 0
1605
+ }
1606
+ ),
1607
+ /* @__PURE__ */ e(
1608
+ "div",
1609
+ {
1610
+ tabIndex: 0,
1611
+ "aria-busy": n || void 0,
1612
+ className: "ds:[min-block-size:0] ds:flex-1 ds:overflow-y-auto",
1613
+ children: /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: [
1614
+ v ? /* @__PURE__ */ e(Jt, { mask: R }) : t.patient ? /* @__PURE__ */ e(ea, { ...se, now: o, mapsLink: w }) : (
1615
+ /* No patient card to carry the identity: a patient-less, an
1616
+ unassigned or an unresolved booking keeps the strip. */
1617
+ /* @__PURE__ */ e(
1618
+ Jn,
1619
+ {
1620
+ name: t.appointment.title.trim() ? t.appointment.title : h(k("patientNotLoaded")),
1621
+ unresolved: lt,
1622
+ status: $,
1623
+ flags: {
1624
+ isTelehealth: t.appointment.isTelehealth,
1625
+ isBookedOnline: t.appointment.bookedOnline,
1626
+ isRecurring: t.appointment.recurrence !== void 0,
1627
+ hasUnassignedPatient: t.appointment.bookedOnline && !lt,
1628
+ hasHighlightedAnamnesis: !1,
1629
+ hasBillableAmount: (((ht = t.money) == null ? void 0 : ht.billableAmount) ?? 0) > 0
1630
+ },
1631
+ locale: r
1632
+ }
1633
+ )
1634
+ ),
1635
+ /* @__PURE__ */ e(
1636
+ ta,
1637
+ {
1638
+ ...se,
1639
+ operator: g,
1640
+ chair: I,
1641
+ privacy: v,
1642
+ description: (
1643
+ /* Not keyed on the text: the pencil must survive a save,
1644
+ so the sub-view can hand focus back to it. An empty
1645
+ read-only description prints nothing. Privacy hides the
1646
+ text and the pencil. */
1647
+ v ? F ? /* @__PURE__ */ e(vt, { block: "description" }) : void 0 : F || N && !D ? /* @__PURE__ */ e(
1648
+ Et,
1649
+ {
1650
+ "data-block": "description",
1651
+ role: "group",
1652
+ "aria-label": h("calendarWorkspace.editor.description"),
1653
+ value: F,
1654
+ editLabel: h(k("editDescription")),
1655
+ onEdit: N && !D ? () => q(!0) : void 0
1656
+ }
1657
+ ) : void 0
1658
+ )
1659
+ }
1660
+ ),
1661
+ oe && v ? /* @__PURE__ */ e(
1662
+ ne,
1663
+ {
1664
+ "data-card": "notes",
1665
+ title: h("notesPanel.title"),
1666
+ headingLevel: 3,
1667
+ children: /* @__PURE__ */ e(vt, {})
1668
+ }
1669
+ ) : oe ? /* @__PURE__ */ e(
1670
+ aa,
1671
+ {
1672
+ preview: oe,
1673
+ onOpenNotes: Ee ? S : void 0,
1674
+ locale: r
1675
+ }
1676
+ ) : null,
1677
+ /* @__PURE__ */ e(na, { ...se, privacy: v })
1678
+ ] })
1679
+ }
1680
+ ),
1681
+ ut || je.length > 0 ? (
1682
+ /* The body scrolls; the status and the actions stay put. The
1683
+ status keeps its own segment and never folds. The actions fold
1684
+ to icons, then into More, never onto a second line. */
1685
+ /* @__PURE__ */ m("div", { className: sa(), children: [
1686
+ ut,
1687
+ je.length > 0 ? /* @__PURE__ */ e(
1688
+ Xt,
1689
+ {
1690
+ label: h(k("actionsLabel")),
1691
+ overflow: "menu",
1692
+ collapseToIcons: !0,
1693
+ background: "surface",
1694
+ size: "sm",
1695
+ className: `ds:min-w-0 ds:flex-1 ds:text-end ${la}`,
1696
+ children: je
1697
+ }
1698
+ ) : null
1699
+ ] })
1700
+ ) : null,
1701
+ A ? /* @__PURE__ */ e(
1702
+ Ke,
1703
+ {
1704
+ ref: re,
1705
+ open: Z,
1706
+ icon: /* @__PURE__ */ e(xt, { "aria-hidden": "true" }),
1707
+ title: h(k("historyTitle")),
1708
+ backLabel: pt,
1709
+ headingLevel: 3,
1710
+ onBack: () => G(!1),
1711
+ "data-details-subview": "history",
1712
+ children: /* @__PURE__ */ e("div", { className: "ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ e(
1713
+ pa,
1714
+ {
1715
+ history: A,
1716
+ locale: r,
1717
+ onRetry: A.onRetry ? () => {
1718
+ var f;
1719
+ M.current = !0, (f = A.onRetry) == null || f.call(A);
1720
+ } : void 0
1721
+ }
1722
+ ) })
1723
+ }
1724
+ ) : null,
1725
+ X ? /* @__PURE__ */ e(
1726
+ Ke,
1727
+ {
1728
+ open: Ce,
1729
+ icon: /* @__PURE__ */ e(Qe, { "aria-hidden": "true" }),
1730
+ title: h(k("editDescription")),
1731
+ backLabel: pt,
1732
+ headingLevel: 3,
1733
+ initialFocusRef: de,
1734
+ onBack: () => {
1735
+ le || q(!1);
1736
+ },
1737
+ "data-details-subview": "description",
1738
+ footer: /* @__PURE__ */ m(Y, { children: [
1739
+ /* @__PURE__ */ e(
1740
+ L,
1741
+ {
1742
+ intent: "secondary",
1743
+ disabled: le,
1744
+ onClick: () => q(!1),
1745
+ children: h(k("noteCancel"))
1746
+ }
1747
+ ),
1748
+ /* @__PURE__ */ e(
1749
+ L,
1750
+ {
1751
+ intent: "primary",
1752
+ "data-action": "save-description",
1753
+ loading: le,
1754
+ onClick: () => void Pe(),
1755
+ children: h(k("descriptionSave"))
1756
+ }
1757
+ )
1758
+ ] }),
1759
+ children: /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: [
1760
+ b ? /* @__PURE__ */ e(z, { variant: "error", children: /* @__PURE__ */ e(z.Description, { children: b }) }) : null,
1761
+ /* @__PURE__ */ e(
1762
+ en,
1763
+ {
1764
+ ref: de,
1765
+ value: be,
1766
+ minRows: 6,
1767
+ autoResize: !0,
1768
+ "aria-label": h("calendarWorkspace.editor.description"),
1769
+ onChange: (f) => ee(f.target.value)
1770
+ }
1771
+ )
1772
+ ] })
1773
+ }
1774
+ ) : null
1775
+ ] })
1776
+ }
1777
+ );
1778
+ }
1779
+ const ha = Gt(function({
1780
+ state: n,
1781
+ onRetry: i,
1782
+ patientId: o,
1783
+ operator: r,
1784
+ chair: a,
1785
+ currency: d = "EUR",
1786
+ now: u,
1787
+ locale: s,
1788
+ title: l,
1789
+ privacy: p = !1,
1790
+ privacyTitle: g,
1791
+ mapsLink: I,
1792
+ notesPreview: v,
1793
+ onOpenNotes: R,
1794
+ history: w,
1795
+ onOpenHistory: T,
1796
+ readOnly: S = !1,
1797
+ onStatusChange: y,
1798
+ allowedStatuses: x,
1799
+ onDescriptionChange: D,
1800
+ onEdit: E,
1801
+ onMove: Q,
1802
+ onCopy: N,
1803
+ onDelete: W,
1804
+ onJoinTelehealth: j,
1805
+ onWhatsApp: U,
1806
+ whatsappUrl: ae,
1807
+ createTaskUrl: ie,
1808
+ documents: Te,
1809
+ id: Se,
1810
+ className: Ie,
1811
+ ...J
1812
+ }, De) {
1813
+ var le, ke;
1814
+ const { t: h, i18n: P } = O(), $e = Ue(), se = Se ?? $e, A = Ue(), Ee = s ?? P.language, oe = !p && (l != null && l.trim()) ? l : h(k("region")), X = n.status === "ready" ? n.read : void 0, he = n.status === "ready" ? n.read.eventId : n.eventId, G = C(
1815
+ void 0
1816
+ ), fe = G.current !== void 0 && G.current !== "ready";
1817
+ pe(() => {
1818
+ G.current = n.status;
1819
+ }, [n.status]);
1820
+ const q = !!i && (n.status === "error" || n.status === "refused" && n.retryable === !0), Z = C(null), Ce = gt(() => Qt(De, Z), [De]), ge = C(!1);
1821
+ typeof document < "u" && (ge.current = ((le = Z.current) == null ? void 0 : le.contains(document.activeElement)) ?? !1);
1822
+ const Re = X ? `ready:${X.eventId}` : n.status, re = C(!1);
1823
+ te(() => {
1824
+ re.current ? (n.status !== "loading" && (re.current = !1), Ae(A)) : ge.current && Ae(A);
1825
+ }, [Re, A]);
1826
+ const M = C(null);
1827
+ X || (M.current = null);
1828
+ const ve = C(null), F = C({ state: n, eventId: he, privacy: p, retryOffered: q, onRetry: i });
1829
+ F.current = { state: n, eventId: he, privacy: p, retryOffered: q, onRetry: i };
1830
+ const ye = gt(
1831
+ () => ({
1832
+ getEventId: () => F.current.eventId ?? null,
1833
+ getLoadStatus: () => F.current.state.status,
1834
+ getAppointmentStatus: () => {
1835
+ var b;
1836
+ return ((b = M.current) == null ? void 0 : b.status) ?? null;
1837
+ },
1838
+ getAllowedStatuses: () => {
1839
+ var b;
1840
+ return [...((b = M.current) == null ? void 0 : b.allowed) ?? []];
1841
+ },
1842
+ getOfferedActions: () => {
1843
+ var b;
1844
+ return [...((b = M.current) == null ? void 0 : b.offered) ?? []];
1845
+ },
1846
+ isHistoryOpen: () => {
1847
+ var b;
1848
+ return ((b = M.current) == null ? void 0 : b.historyOpen) ?? !1;
1849
+ },
1850
+ isPrivacy: () => F.current.privacy,
1851
+ openHistory: () => {
1852
+ var b;
1853
+ if (!((b = M.current) != null && b.historyAvailable))
1854
+ throw new Error("AppointmentDetailsPanel: History is not offered.");
1855
+ M.current.openHistory();
1856
+ },
1857
+ closeHistory: () => {
1858
+ var b;
1859
+ (b = M.current) == null || b.closeHistory();
1860
+ },
1861
+ setAppointmentStatus: (b) => {
1862
+ const H = M.current, de = ve.current;
1863
+ if (!H || !de || H.allowed.length === 0)
1864
+ return qe(
1865
+ new Error("AppointmentDetailsPanel: the status is read-only.")
1866
+ );
1867
+ if (b === H.status) return Promise.resolve();
1868
+ if (!H.allowed.includes(b))
1869
+ return qe(
1870
+ new Error(`AppointmentDetailsPanel: "${b}" is not allowed.`)
1871
+ );
1872
+ const Pe = () => qe(
1873
+ new Error("AppointmentDetailsPanel: a status save is in flight.")
1874
+ );
1875
+ if (de.getIsSaving()) return Pe();
1876
+ const $ = de.setValue(b);
1877
+ return $ === void 0 ? Pe() : $;
1878
+ },
1879
+ retry: () => {
1880
+ const { retryOffered: b, onRetry: H } = F.current;
1881
+ if (!b || !H)
1882
+ throw new Error("AppointmentDetailsPanel: Retry is not offered.");
1883
+ H();
1884
+ }
1885
+ }),
1886
+ []
1887
+ );
1888
+ Yt(Hn, ye, se);
1889
+ const be = /* @__PURE__ */ e(
1890
+ Ct,
1891
+ {
1892
+ title: oe,
1893
+ headingId: A,
1894
+ icon: /* @__PURE__ */ e(nt, { "aria-hidden": "true" }),
1895
+ sticky: !0,
1896
+ divider: !0
1897
+ }
1898
+ );
1899
+ let ee;
1900
+ return n.status === "ready" ? ee = /* @__PURE__ */ e(
1901
+ ma,
1902
+ {
1903
+ read: n.read,
1904
+ refreshing: n.refreshing === !0,
1905
+ currency: d,
1906
+ now: u ?? /* @__PURE__ */ new Date(),
1907
+ locale: Ee,
1908
+ shownTitle: oe,
1909
+ headingId: A,
1910
+ enter: fe,
1911
+ live: M,
1912
+ statusControl: ve,
1913
+ patientId: o,
1914
+ operator: r,
1915
+ chair: a,
1916
+ privacy: p,
1917
+ privacyTitle: g,
1918
+ mapsLink: I,
1919
+ notesPreview: v,
1920
+ onOpenNotes: R,
1921
+ history: w,
1922
+ onOpenHistory: T,
1923
+ readOnly: S,
1924
+ onStatusChange: y,
1925
+ allowedStatuses: x,
1926
+ onDescriptionChange: D,
1927
+ onEdit: E,
1928
+ onMove: Q,
1929
+ onCopy: N,
1930
+ onDelete: W,
1931
+ onJoinTelehealth: j,
1932
+ onWhatsApp: U,
1933
+ whatsappUrl: ae,
1934
+ createTaskUrl: ie,
1935
+ documents: Te
1936
+ },
1937
+ n.read.eventId
1938
+ ) : n.status === "loading" ? ee = /* @__PURE__ */ m(Y, { children: [
1939
+ be,
1940
+ /* @__PURE__ */ e(ua, {})
1941
+ ] }) : ee = /* @__PURE__ */ m(Y, { children: [
1942
+ be,
1943
+ /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)]", children: [
1944
+ /* @__PURE__ */ e(z, { variant: n.status === "error" ? "error" : "warning", children: /* @__PURE__ */ e(z.Description, { children: n.status === "error" ? ((ke = n.message) == null ? void 0 : ke.trim()) || h("emptyState.error.description") : n.reason }) }),
1945
+ q ? /* @__PURE__ */ e(
1946
+ L,
1947
+ {
1948
+ intent: "outline",
1949
+ "data-action": "retry-load",
1950
+ onClick: () => {
1951
+ re.current = !0, i == null || i();
1952
+ },
1953
+ children: h("emptyState.error.cta")
1954
+ }
1955
+ ) : null
1956
+ ] })
1957
+ ] }), /* @__PURE__ */ e(
1958
+ "div",
1959
+ {
1960
+ ref: Ce,
1961
+ id: Se,
1962
+ "data-component": "appointment-details-panel",
1963
+ "data-component-id": se,
1964
+ "data-event-id": he,
1965
+ "data-status": n.status,
1966
+ "aria-busy": n.status === "loading" || void 0,
1967
+ className: ia({ className: Ie }),
1968
+ ...J,
1969
+ children: ee
1970
+ }
1971
+ );
1972
+ });
1973
+ ha.displayName = "AppointmentDetailsPanel";
1974
+ function Ri({
1975
+ eventId: t,
1976
+ load: n,
1977
+ reloadKey: i
1978
+ }) {
1979
+ const { t: o } = O(), r = C("");
1980
+ r.current = o("emptyState.error.description");
1981
+ const a = C(n);
1982
+ te(() => {
1983
+ a.current = n;
1984
+ });
1985
+ const [d, u] = _(0), [s, l] = _(), p = JSON.stringify([i ?? null, d]), [g, I] = _({ eventId: t, count: 0 }), v = g.eventId === t ? g.count : g.count + 1;
1986
+ g.eventId !== t && I({ eventId: t, count: v }), pe(() => {
1987
+ if (t === null) {
1988
+ l(void 0);
1989
+ return;
1990
+ }
1991
+ const S = new AbortController(), y = (x) => {
1992
+ S.signal.aborted || l({ eventId: t, selection: v, request: p, value: x });
1993
+ };
1994
+ return Promise.resolve().then(() => a.current(t, { signal: S.signal })).then((x) => {
1995
+ var D, E;
1996
+ if (x.status !== "ready") {
1997
+ y({
1998
+ status: "refused",
1999
+ eventId: t,
2000
+ reason: x.reason,
2001
+ retryable: x.retryable
2002
+ });
2003
+ return;
2004
+ }
2005
+ if (((D = x.details) == null ? void 0 : D.eventId) !== t || !Wn((E = x.details.appointment) == null ? void 0 : E.startIso))
2006
+ throw new Error(r.current);
2007
+ y({ status: "ready", read: x.details });
2008
+ }).catch((x) => {
2009
+ y({
2010
+ status: "error",
2011
+ eventId: t,
2012
+ message: Ge(x, r.current)
2013
+ });
2014
+ }), () => S.abort();
2015
+ }, [t, v, p]);
2016
+ const R = Vt(() => u((S) => S + 1), []);
2017
+ if (t === null) return { state: null, retry: R };
2018
+ const w = (s == null ? void 0 : s.eventId) === t && s.selection === v ? s : void 0;
2019
+ let T = { status: "loading", eventId: t };
2020
+ return (w == null ? void 0 : w.request) === p ? T = w.value : (w == null ? void 0 : w.value.status) === "ready" && (T = { status: "ready", read: w.value.read, refreshing: !0 }), { state: T, retry: R };
2021
+ }
2022
+ export {
2023
+ ha as A,
2024
+ Nt as C,
2025
+ $t as D,
2026
+ Qn as I,
2027
+ Ht as M,
2028
+ qn as R,
2029
+ Hn as a,
2030
+ Xe as b,
2031
+ Bn as c,
2032
+ Kn as d,
2033
+ Yn as e,
2034
+ ze as f,
2035
+ Vn as g,
2036
+ Bt as h,
2037
+ Un as i,
2038
+ Gn as j,
2039
+ Jn as k,
2040
+ $n as l,
2041
+ Wn as p,
2042
+ jn as s,
2043
+ Ri as u
2044
+ };
2045
+ //# sourceMappingURL=use-appointment-details-read-D2FH-cHF.js.map