@alfadocs/ui-kit 0.47.0 → 0.49.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 (280) hide show
  1. package/dist/_chunks/{address-autocomplete-CSjMrBvu.js → address-autocomplete-CT-9AOli.js} +2 -2
  2. package/dist/_chunks/{agenda-card-CFyWSX7Z.js → agenda-card-BaSfVfrL.js} +25 -29
  3. package/dist/_chunks/{agenda-tray-Dyj9ChHC.js → agenda-tray-DQayYmQ0.js} +50 -67
  4. package/dist/_chunks/ai-consent-banner-F2md5JD3.js +169 -0
  5. package/dist/_chunks/ai-tools-rail-CYLWrRmm.js +280 -0
  6. package/dist/_chunks/{alert-ywPR59NE.js → alert-CUTxnym2.js} +56 -35
  7. package/dist/_chunks/{alia-sidebar-CVIPrdc9.js → alia-sidebar-DlvyXgVC.js} +3 -2
  8. package/dist/_chunks/anamnesis-card-CmkBVAln.js +156 -0
  9. package/dist/_chunks/antenatal-schedule-timeline-Dg0m0yFl.js +412 -0
  10. package/dist/_chunks/appointment-tray-BwDHhWWC.js +419 -0
  11. package/dist/_chunks/{ar-DEz65ZJW.js → ar-C68WKG5a.js} +2 -2
  12. package/dist/_chunks/{audio-recorder-DC-v9YFW.js → audio-recorder-DVJXV7_k.js} +2 -2
  13. package/dist/_chunks/bishop-score-2MzAz8NE.js +185 -0
  14. package/dist/_chunks/{bmi-calculator-CQqXTVNL.js → bmi-calculator-DdylQzT6.js} +2 -2
  15. package/dist/_chunks/{booking-DlDVuWMd.js → booking-DljH0JkS.js} +294 -306
  16. package/dist/_chunks/{calculator-dialog-D-nfvteH.js → calculator-dialog-CFk4I91b.js} +2 -2
  17. package/dist/_chunks/calendar-days-C4BmpCZg.js +23 -0
  18. package/dist/_chunks/{calendar-YHFknAGv.js → calendar-oYWOCrnf.js} +195 -210
  19. package/dist/_chunks/care-plan-card-QmNpGggC.js +252 -0
  20. package/dist/_chunks/care-plan-entry-card-Cnra7vUc.js +318 -0
  21. package/dist/_chunks/{chat-message-B5JpFj0F.js → chat-message-Dm8U2RY1.js} +36 -35
  22. package/dist/_chunks/circle-arrow-up-CC_85SuH.js +16 -0
  23. package/dist/_chunks/clinical-note-card-BYo437dU.js +333 -0
  24. package/dist/_chunks/{contact-profile-card-DHyuAPXM.js → contact-profile-card-DvvVfAA2.js} +102 -115
  25. package/dist/_chunks/cycle-calculator-oOkj5wlB.js +252 -0
  26. package/dist/_chunks/{date-picker-Bq7xhMA-.js → date-picker-BfHblqwA.js} +2 -2
  27. package/dist/_chunks/{date-picker-variants-DLi1Va_e.js → date-picker-variants-CXEAx3O_.js} +22 -22
  28. package/dist/_chunks/{date-range-picker-DcXuI9y7.js → date-range-picker-hcAMs1wO.js} +3 -3
  29. package/dist/_chunks/{date-time-picker-RimumeLR.js → date-time-picker-H-3Pwqlb.js} +9 -9
  30. package/dist/_chunks/{de-bTBGdjPS.js → de-DK4A9_a8.js} +2 -2
  31. package/dist/_chunks/{dialog-BTpZV6It.js → dialog-DMGnSelc.js} +55 -55
  32. package/dist/_chunks/{document-scanner-BqLsGs4Y.js → document-scanner-Cxqvq7GR.js} +2 -2
  33. package/dist/_chunks/due-date-calculator-tDqZXPWO.js +256 -0
  34. package/dist/_chunks/{editable-currency-cell-renderer-CLil9B29.js → editable-currency-cell-renderer-Bh48OHRv.js} +2 -2
  35. package/dist/_chunks/{el-BWG5RXxa.js → el-B29HXhG5.js} +2 -2
  36. package/dist/_chunks/entity-card-COhmqHly.js +69 -0
  37. package/dist/_chunks/{es-DfO_G435.js → es-BOwPVwWn.js} +2 -2
  38. package/dist/_chunks/fetal-weight-Da-B4P4k.js +122 -0
  39. package/dist/_chunks/{fr-BTn24bs8.js → fr-DoDBtn0T.js} +2 -2
  40. package/dist/_chunks/{freemium-paywall-DzpD63WY.js → freemium-paywall-BWaLWje-.js} +2 -2
  41. package/dist/_chunks/gestational-age-calculator-DbDfTJU2.js +311 -0
  42. package/dist/_chunks/hcg-doubling-DAnpbale.js +170 -0
  43. package/dist/_chunks/{hi-Dj3oYd84.js → hi-DGByrKby.js} +2 -2
  44. package/dist/_chunks/{insert-result-C5ABnzDl.js → insert-result-DNdi_JYW.js} +140 -168
  45. package/dist/_chunks/is-safe-url-DkETxeHz.js +7 -0
  46. package/dist/_chunks/{isSameWeek-HfxKk6Lz.js → isSameWeek-B1odL2vR.js} +2 -2
  47. package/dist/_chunks/{it-Y85ofIQQ.js → it-B16rEecm.js} +3 -3
  48. package/dist/_chunks/{ja-CQ7J6YoA.js → ja-B0viOgft.js} +2 -2
  49. package/dist/_chunks/languages-DsVf_WzT.js +19 -0
  50. package/dist/_chunks/layers-pzGcbLPj.js +34 -0
  51. package/dist/_chunks/{marketplace-app-shell-Gfsf78ge.js → marketplace-app-shell-UKSLx9K_.js} +3 -3
  52. package/dist/_chunks/{message-card-DSPw5ghw.js → message-card-Dvl1TgaN.js} +15 -19
  53. package/dist/_chunks/{message-tray-hSQff9u4.js → message-tray-Dl6GQaaV.js} +2 -2
  54. package/dist/_chunks/{nl-D9kHCmp3.js → nl-cBxEX2QU.js} +2 -2
  55. package/dist/_chunks/operator-hero-CM8949Hd.js +198 -0
  56. package/dist/_chunks/{patient-search-CocVcGJ3.js → patient-search-BJOmTmDA.js} +2 -2
  57. package/dist/_chunks/{patient-shell-CnT4L8gn.js → patient-shell-DUmhXnFq.js} +2 -2
  58. package/dist/_chunks/patient-summary-card-BnTqxcTr.js +443 -0
  59. package/dist/_chunks/{payment-form-BNTx4876.js → payment-form-xmeCkxas.js} +2 -2
  60. package/dist/_chunks/payment-request-card-B_lyobd0.js +478 -0
  61. package/dist/_chunks/{pdf-viewer-CWEXTlwq.js → pdf-viewer-q1D3Uion.js} +4 -4
  62. package/dist/_chunks/periodontal-chart-card-BYs9hax1.js +455 -0
  63. package/dist/_chunks/phone-Bi5yUm4I.js +20 -0
  64. package/dist/_chunks/{pl-B3Smqpkr.js → pl-DtS08ioY.js} +3 -3
  65. package/dist/_chunks/{practice-results-DDi-kvaD.js → practice-results-Cq1y8JFD.js} +4 -3
  66. package/dist/_chunks/pregnancy-weight-gain-CCGrvarh.js +322 -0
  67. package/dist/_chunks/product-hub-panel-CkfZBA3t.js +620 -0
  68. package/dist/_chunks/{pt-D3J-1c_7.js → pt-yFXs1VvH.js} +2 -2
  69. package/dist/_chunks/{ro-BKAbbEA3.js → ro-DsCzSrzR.js} +2 -2
  70. package/dist/_chunks/{ru-BeG8f0Ep.js → ru-DgDxL0pc.js} +3 -3
  71. package/dist/_chunks/scan-line-lGioFwLC.js +18 -0
  72. package/dist/_chunks/shield-check-BjCGH_Sr.js +21 -0
  73. package/dist/_chunks/{sidebar-_vJXI9rB.js → sidebar-h78cTNLh.js} +440 -338
  74. package/dist/_chunks/{sign-document-BCyLpFHJ.js → sign-document-CZkAf28g.js} +2 -2
  75. package/dist/_chunks/{sq-_hRPaeUy.js → sq-DHlCYN67.js} +2 -2
  76. package/dist/_chunks/subDays-Bs00akhK.js +8 -0
  77. package/dist/_chunks/{sv-g009fSpe.js → sv-O0QaQs_s.js} +2 -2
  78. package/dist/_chunks/{tr-OKUOuhMW.js → tr-BmNDRuio.js} +2 -2
  79. package/dist/_chunks/{transaction-chip-B8ujzowA.js → transaction-chip-BZCa6XDn.js} +8 -6
  80. package/dist/_chunks/{unit-converter-u3CwNDpP.js → unit-converter-jWp3Z85y.js} +2 -2
  81. package/dist/_chunks/user-cog-BS_qc8nA.js +24 -0
  82. package/dist/_chunks/video-BAeICxCT.js +21 -0
  83. package/dist/_chunks/warning-stack-CXfoAT-_.js +220 -0
  84. package/dist/_chunks/{workflow-map-Djn1QMJc.js → workflow-map-DzX_LI4y.js} +139 -157
  85. package/dist/_chunks/{zh-CN-De4zwEhx.js → zh-CN-CgVJZEzz.js} +3 -3
  86. package/dist/agent-catalog.json +367 -1
  87. package/dist/components/_shared/antenatal-schedule-timeline.d.ts +18 -0
  88. package/dist/components/_shared/antenatal-schedule.d.ts +68 -0
  89. package/dist/components/_shared/entity-card/entity-card.d.ts +40 -0
  90. package/dist/components/_shared/entity-card/index.d.ts +3 -0
  91. package/dist/components/_shared/index.d.ts +5 -0
  92. package/dist/components/_shared/is-safe-url.d.ts +13 -0
  93. package/dist/components/_shared/obstetrics.d.ts +138 -0
  94. package/dist/components/address-autocomplete/index.js +1 -1
  95. package/dist/components/agenda-card/agenda-card.d.ts +1 -2
  96. package/dist/components/agenda-card/index.d.ts +2 -1
  97. package/dist/components/agenda-card/index.js +6 -5
  98. package/dist/components/agenda-tray/index.js +1 -1
  99. package/dist/components/ai-consent-banner/ai-consent-banner.agent.d.ts +4 -0
  100. package/dist/components/ai-consent-banner/ai-consent-banner.d.ts +45 -0
  101. package/dist/components/ai-consent-banner/index.d.ts +4 -0
  102. package/dist/components/ai-consent-banner/index.js +6 -0
  103. package/dist/components/ai-tools-rail/ai-tools-rail.agent.d.ts +4 -0
  104. package/dist/components/ai-tools-rail/ai-tools-rail.d.ts +60 -0
  105. package/dist/components/ai-tools-rail/index.d.ts +4 -0
  106. package/dist/components/ai-tools-rail/index.js +6 -0
  107. package/dist/components/alert/alert.d.ts +2 -2
  108. package/dist/components/alert/index.js +1 -1
  109. package/dist/components/anamnesis-card/anamnesis-card.d.ts +68 -0
  110. package/dist/components/anamnesis-card/index.d.ts +3 -0
  111. package/dist/components/anamnesis-card/index.js +5 -0
  112. package/dist/components/appointment-card/appointment-card.agent.d.ts +3 -0
  113. package/dist/components/appointment-card/appointment-card.d.ts +93 -0
  114. package/dist/components/appointment-card/appointment-tray.agent.d.ts +4 -0
  115. package/dist/components/appointment-card/appointment-tray.d.ts +48 -0
  116. package/dist/components/appointment-card/index.d.ts +8 -0
  117. package/dist/components/appointment-card/index.js +10 -0
  118. package/dist/components/audio-recorder/index.js +1 -1
  119. package/dist/components/badge/badge.d.ts +1 -1
  120. package/dist/components/bishop-score/bishop-score.d.ts +27 -0
  121. package/dist/components/bishop-score/bishop.d.ts +30 -0
  122. package/dist/components/bishop-score/index.d.ts +4 -0
  123. package/dist/components/bishop-score/index.js +10 -0
  124. package/dist/components/bmi-calculator/index.js +1 -1
  125. package/dist/components/booking/index.js +1 -1
  126. package/dist/components/calculator-dialog/index.js +1 -1
  127. package/dist/components/calendar/index.js +1 -1
  128. package/dist/components/card/card.d.ts +1 -1
  129. package/dist/components/care-plan-card/care-plan-card.agent.d.ts +4 -0
  130. package/dist/components/care-plan-card/care-plan-card.d.ts +102 -0
  131. package/dist/components/care-plan-card/index.d.ts +4 -0
  132. package/dist/components/care-plan-card/index.js +6 -0
  133. package/dist/components/care-plan-entry-card/care-plan-entry-card.agent.d.ts +4 -0
  134. package/dist/components/care-plan-entry-card/care-plan-entry-card.d.ts +110 -0
  135. package/dist/components/care-plan-entry-card/index.d.ts +4 -0
  136. package/dist/components/care-plan-entry-card/index.js +6 -0
  137. package/dist/components/chat-message/chat-message.d.ts +7 -0
  138. package/dist/components/chat-message/index.js +1 -1
  139. package/dist/components/clinical-note-card/clinical-note-card.agent.d.ts +4 -0
  140. package/dist/components/clinical-note-card/clinical-note-card.d.ts +98 -0
  141. package/dist/components/clinical-note-card/index.d.ts +4 -0
  142. package/dist/components/clinical-note-card/index.js +6 -0
  143. package/dist/components/contact-profile-card/index.js +1 -1
  144. package/dist/components/cycle-calculator/cycle.d.ts +5 -0
  145. package/dist/components/cycle-calculator/index.js +1 -1
  146. package/dist/components/data-table/index.js +1 -1
  147. package/dist/components/date-picker/index.js +1 -1
  148. package/dist/components/date-range-picker/index.js +1 -1
  149. package/dist/components/date-time-picker/index.js +1 -1
  150. package/dist/components/dialog/dialog.d.ts +7 -0
  151. package/dist/components/dialog/index.js +1 -1
  152. package/dist/components/document-scanner/index.js +1 -1
  153. package/dist/components/due-date-calculator/due-date-calculator.d.ts +13 -1
  154. package/dist/components/due-date-calculator/gestation.d.ts +1 -59
  155. package/dist/components/due-date-calculator/index.d.ts +1 -1
  156. package/dist/components/due-date-calculator/index.js +16 -10
  157. package/dist/components/fetal-weight/efw.d.ts +25 -0
  158. package/dist/components/fetal-weight/fetal-weight.d.ts +27 -0
  159. package/dist/components/fetal-weight/index.d.ts +4 -0
  160. package/dist/components/fetal-weight/index.js +6 -0
  161. package/dist/components/freemium-paywall/index.js +1 -1
  162. package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +25 -1
  163. package/dist/components/gestational-age-calculator/index.js +1 -1
  164. package/dist/components/hcg-doubling/hcg-doubling.d.ts +31 -0
  165. package/dist/components/hcg-doubling/hcg.d.ts +33 -0
  166. package/dist/components/hcg-doubling/index.d.ts +4 -0
  167. package/dist/components/hcg-doubling/index.js +7 -0
  168. package/dist/components/index.d.ts +14 -0
  169. package/dist/components/message-card/index.js +5 -4
  170. package/dist/components/message-card/message-card.d.ts +1 -2
  171. package/dist/components/message-tray/index.js +1 -1
  172. package/dist/components/operator-hero/index.js +1 -1
  173. package/dist/components/operator-hero/operator-hero.d.ts +9 -0
  174. package/dist/components/patient-search/index.js +1 -1
  175. package/dist/components/patient-summary-card/index.d.ts +4 -0
  176. package/dist/components/patient-summary-card/index.js +6 -0
  177. package/dist/components/patient-summary-card/patient-summary-card.agent.d.ts +4 -0
  178. package/dist/components/patient-summary-card/patient-summary-card.d.ts +120 -0
  179. package/dist/components/payment-card/index.d.ts +7 -0
  180. package/dist/components/payment-card/index.js +8 -0
  181. package/dist/components/payment-card/payment-card.agent.d.ts +4 -0
  182. package/dist/components/payment-card/payment-card.d.ts +71 -0
  183. package/dist/components/payment-card/payment-request-card.agent.d.ts +4 -0
  184. package/dist/components/payment-card/payment-request-card.d.ts +43 -0
  185. package/dist/components/payment-form/index.js +1 -1
  186. package/dist/components/pdf-viewer/index.js +1 -1
  187. package/dist/components/periodontal-chart-card/index.d.ts +4 -0
  188. package/dist/components/periodontal-chart-card/index.js +7 -0
  189. package/dist/components/periodontal-chart-card/periodontal-chart-card.agent.d.ts +4 -0
  190. package/dist/components/periodontal-chart-card/periodontal-chart-card.d.ts +74 -0
  191. package/dist/components/practice-results/index.js +1 -1
  192. package/dist/components/pregnancy-weight-gain/index.js +1 -1
  193. package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +7 -0
  194. package/dist/components/pregnancy-weight-gain/weight-gain.d.ts +33 -8
  195. package/dist/components/product-hub-tray/index.d.ts +8 -0
  196. package/dist/components/product-hub-tray/index.js +10 -0
  197. package/dist/components/product-hub-tray/product-hub-panel.agent.d.ts +4 -0
  198. package/dist/components/product-hub-tray/product-hub-panel.d.ts +54 -0
  199. package/dist/components/product-hub-tray/product-hub-tray.agent.d.ts +4 -0
  200. package/dist/components/product-hub-tray/product-hub-tray.d.ts +115 -0
  201. package/dist/components/public-header/public-header.d.ts +1 -1
  202. package/dist/components/sidebar/index.d.ts +2 -2
  203. package/dist/components/sidebar/index.js +12 -11
  204. package/dist/components/sidebar/sidebar.d.ts +14 -1
  205. package/dist/components/sign-document/index.js +1 -1
  206. package/dist/components/stat/stat.d.ts +1 -1
  207. package/dist/components/transaction-chip/index.js +1 -1
  208. package/dist/components/unit-converter/index.js +1 -1
  209. package/dist/components/warning-stack/index.js +1 -1
  210. package/dist/components/workflow/index.js +1 -1
  211. package/dist/i18n/locales/ar.d.ts +561 -1
  212. package/dist/i18n/locales/ar.js +560 -2
  213. package/dist/i18n/locales/de.d.ts +561 -1
  214. package/dist/i18n/locales/de.js +560 -2
  215. package/dist/i18n/locales/el.d.ts +561 -1
  216. package/dist/i18n/locales/el.js +560 -2
  217. package/dist/i18n/locales/en.d.ts +561 -1
  218. package/dist/i18n/locales/en.js +560 -2
  219. package/dist/i18n/locales/es.d.ts +561 -1
  220. package/dist/i18n/locales/es.js +560 -2
  221. package/dist/i18n/locales/fr.d.ts +561 -1
  222. package/dist/i18n/locales/fr.js +560 -2
  223. package/dist/i18n/locales/hi.d.ts +561 -1
  224. package/dist/i18n/locales/hi.js +560 -2
  225. package/dist/i18n/locales/it.d.ts +561 -1
  226. package/dist/i18n/locales/it.js +560 -2
  227. package/dist/i18n/locales/ja.d.ts +561 -1
  228. package/dist/i18n/locales/ja.js +560 -2
  229. package/dist/i18n/locales/nl.d.ts +561 -1
  230. package/dist/i18n/locales/nl.js +560 -2
  231. package/dist/i18n/locales/pl.d.ts +561 -1
  232. package/dist/i18n/locales/pl.js +560 -2
  233. package/dist/i18n/locales/pt.d.ts +561 -1
  234. package/dist/i18n/locales/pt.js +560 -2
  235. package/dist/i18n/locales/ro.d.ts +561 -1
  236. package/dist/i18n/locales/ro.js +560 -2
  237. package/dist/i18n/locales/ru.d.ts +561 -1
  238. package/dist/i18n/locales/ru.js +560 -2
  239. package/dist/i18n/locales/sq.d.ts +561 -1
  240. package/dist/i18n/locales/sq.js +560 -2
  241. package/dist/i18n/locales/sv.d.ts +561 -1
  242. package/dist/i18n/locales/sv.js +560 -2
  243. package/dist/i18n/locales/tr.d.ts +561 -1
  244. package/dist/i18n/locales/tr.js +560 -2
  245. package/dist/i18n/locales/zh.d.ts +561 -1
  246. package/dist/i18n/locales/zh.js +560 -2
  247. package/dist/index.js +663 -600
  248. package/dist/locales/ar.json +562 -2
  249. package/dist/locales/de.json +562 -2
  250. package/dist/locales/el.json +562 -2
  251. package/dist/locales/en.json +562 -2
  252. package/dist/locales/es.json +562 -2
  253. package/dist/locales/fr.json +562 -2
  254. package/dist/locales/hi.json +562 -2
  255. package/dist/locales/it.json +562 -2
  256. package/dist/locales/ja.json +562 -2
  257. package/dist/locales/nl.json +562 -2
  258. package/dist/locales/pl.json +562 -2
  259. package/dist/locales/pt.json +562 -2
  260. package/dist/locales/ro.json +562 -2
  261. package/dist/locales/ru.json +562 -2
  262. package/dist/locales/sq.json +562 -2
  263. package/dist/locales/sv.json +562 -2
  264. package/dist/locales/tr.json +562 -2
  265. package/dist/locales/zh.json +562 -2
  266. package/dist/patterns/alia-assistant/alia-types.d.ts +15 -0
  267. package/dist/patterns/alia-assistant/index.js +1 -1
  268. package/dist/patterns/marketplace-app-shell/index.js +1 -1
  269. package/dist/patterns/patient-shell/index.js +1 -1
  270. package/dist/tokens.css +1 -1
  271. package/package.json +58 -1
  272. package/dist/_chunks/cycle-calculator-KxA8dqDf.js +0 -211
  273. package/dist/_chunks/due-date-calculator-mFxpHLml.js +0 -216
  274. package/dist/_chunks/gestation-mWF4AXea.js +0 -50
  275. package/dist/_chunks/gestational-age-calculator-gWI_uRA1.js +0 -203
  276. package/dist/_chunks/operator-hero-7LiiP7zi.js +0 -171
  277. package/dist/_chunks/pregnancy-weight-gain-BtEHaSqy.js +0 -246
  278. package/dist/_chunks/shield-check-C73ma9Cs.js +0 -36
  279. package/dist/_chunks/subDays-Dv7q9S7u.js +0 -8
  280. package/dist/_chunks/warning-stack-DNR3-IbP.js +0 -180
@@ -0,0 +1,280 @@
1
+ import { jsxs as j, jsx as f } from "react/jsx-runtime";
2
+ import { forwardRef as M, useRef as v, useState as O, useMemo as k, useCallback as D, useEffect as G, useImperativeHandle as J } from "react";
3
+ import { c as b } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as Q } from "react-i18next";
5
+ import { I as X } from "./icon-button-CKEOrN37.js";
6
+ import { S as Y } from "./scroll-area-BWqCkEGz.js";
7
+ import { a as Z } from "./tooltip-DvmfrNvB.js";
8
+ import { u as $ } from "./use-controllable-state-BiY4xTzM.js";
9
+ import { u as ee } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
10
+ import { u as ae } from "./registry-nPAVE19X.js";
11
+ const te = {
12
+ id: "ai-tools-rail",
13
+ capabilities: ["open", "close", "select_single"],
14
+ state: {
15
+ activeToolId: {
16
+ type: "string | null",
17
+ descriptionKey: "ui.aiToolsRail.agent.state.activeToolId",
18
+ description: "Id of the tool whose panel is currently open, or null when the rail is collapsed to its strip. No panel content is ever exposed.",
19
+ read: (n) => n.getActiveToolId()
20
+ }
21
+ },
22
+ actions: {
23
+ open: {
24
+ safety: "read",
25
+ argsType: "{ id: string }",
26
+ descriptionKey: "ui.aiToolsRail.agent.actions.open",
27
+ description: "Open the given tool's panel.",
28
+ invoke: (n, a) => {
29
+ n.open(a.id);
30
+ }
31
+ },
32
+ close: {
33
+ safety: "read",
34
+ descriptionKey: "ui.aiToolsRail.agent.actions.close",
35
+ description: "Collapse the rail to its strip (no active tool).",
36
+ invoke: (n) => {
37
+ n.close();
38
+ }
39
+ },
40
+ select_tool: {
41
+ safety: "read",
42
+ argsType: "{ id: string | null }",
43
+ descriptionKey: "ui.aiToolsRail.agent.actions.selectTool",
44
+ description: "Set the active tool by id (opens its panel), or pass null to collapse.",
45
+ invoke: (n, a) => {
46
+ n.setActiveTool(a.id);
47
+ }
48
+ }
49
+ },
50
+ domHooks: {
51
+ root: {
52
+ attr: "data-component",
53
+ value: "ai-tools-rail",
54
+ description: "Marks the AiToolsRail wrapper."
55
+ },
56
+ instanceId: {
57
+ attr: "data-component-id",
58
+ sourceProp: "id",
59
+ description: "Sourced from the id prop. Required to address a specific rail from the agent."
60
+ },
61
+ item: {
62
+ attr: "data-tool-id",
63
+ description: "Stable tool id emitted on each strip IconButton. The active icon also carries data-active set to its id."
64
+ }
65
+ }
66
+ }, se = "ds:[inline-size:3rem]", ne = "ds:[inline-size:var(--ai-tools-rail-panel-inline-size,22rem)]", ie = b(
67
+ ["ds:flex ds:shrink-0 ds:h-full", "ds:bg-[var(--background)]"].join(" "),
68
+ {
69
+ variants: {
70
+ side: {
71
+ // Strip docks inline-end; the panel mounts inline-start of it
72
+ // (flex-row, panel rendered first). Shadow faces the main area.
73
+ end: "ds:flex-row ds:shadow-[var(--shadow-chrome-start)]",
74
+ // Strip docks inline-start; the panel mounts inline-end of it.
75
+ start: "ds:flex-row-reverse ds:shadow-[var(--shadow-chrome-end)]"
76
+ }
77
+ },
78
+ defaultVariants: { side: "end" }
79
+ }
80
+ ), oe = b(
81
+ [
82
+ "ds:flex ds:shrink-0 ds:flex-col ds:items-center",
83
+ "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]",
84
+ "ds:gap-[var(--spacing-xs)]",
85
+ se
86
+ ].join(" ")
87
+ ), re = b(
88
+ [
89
+ "ds:flex ds:min-h-0 ds:flex-col ds:h-full",
90
+ "ds:bg-[var(--background)]",
91
+ ne
92
+ ].join(" ")
93
+ ), le = b(
94
+ [
95
+ "ds:absolute ds:-top-[var(--spacing-xs)] ds:-end-[var(--spacing-xs)]",
96
+ "ds:inline-flex ds:items-center ds:justify-center",
97
+ "ds:min-w-[calc(var(--spacing-md)+var(--spacing-xs))]",
98
+ "ds:h-[calc(var(--spacing-md)+var(--spacing-xs))]",
99
+ "ds:ps-[calc(var(--spacing-xs)/1.5)] ds:pe-[calc(var(--spacing-xs)/1.5)]",
100
+ "ds:rounded-[var(--radius-full)]",
101
+ "ds:bg-[color:var(--destructive)] ds:text-[color:var(--destructive-foreground)]",
102
+ "ds:text-[length:var(--font-size-xs)] ds:font-semibold ds:leading-none",
103
+ "ds:pointer-events-none ds:select-none",
104
+ "ds:forced-colors:outline ds:forced-colors:outline-1 ds:forced-colors:outline-[CanvasText]"
105
+ ].join(" ")
106
+ );
107
+ function de(n, a) {
108
+ return n > 99 ? a : String(n);
109
+ }
110
+ const ce = M(
111
+ ({
112
+ id: n,
113
+ tools: a,
114
+ activeToolId: S,
115
+ defaultActiveToolId: L = null,
116
+ onActiveToolChange: B,
117
+ side: R = "end",
118
+ railLabel: z,
119
+ className: H
120
+ }, _) => {
121
+ var E;
122
+ const { t: m } = Q(), [F, l] = $({
123
+ value: S,
124
+ defaultValue: L,
125
+ onChange: B
126
+ }), d = F ?? null, h = v([]), I = v(null), [y, x] = O(0), u = v(!1), T = v(!1), c = k(
127
+ () => a.findIndex((e) => e.id === d),
128
+ [a, d]
129
+ ), p = c >= 0 ? a[c] : null, P = k(
130
+ () => a.findIndex((e) => !e.disabled),
131
+ [a]
132
+ ), g = c >= 0 ? c : y >= 0 && !((E = a[y]) != null && E.disabled) ? y : P, U = D(
133
+ (e, t) => {
134
+ const s = a.find((r) => r.id === e);
135
+ !s || s.disabled || (u.current = t, l(d === e ? null : e));
136
+ },
137
+ [a, d, l]
138
+ ), W = D(
139
+ (e) => {
140
+ var K, N, V;
141
+ const t = a.length;
142
+ if (t === 0) return;
143
+ let s = null;
144
+ if (e.key === "ArrowDown" ? s = (g + 1) % t : e.key === "ArrowUp" ? s = (g - 1 + t) % t : e.key === "Home" ? s = 0 : e.key === "End" && (s = t - 1), s === null) return;
145
+ const r = e.key === "ArrowUp" || e.key === "End";
146
+ let i = s, o = 0;
147
+ for (; o < t && ((K = a[i]) != null && K.disabled); )
148
+ i = r ? (i - 1 + t) % t : (i + 1) % t, o += 1;
149
+ (N = a[i]) != null && N.disabled || (e.preventDefault(), x(i), (V = h.current[i]) == null || V.focus());
150
+ },
151
+ [a, g]
152
+ ), A = v(null);
153
+ G(() => {
154
+ const e = A.current;
155
+ if (!e) return;
156
+ const t = (s) => {
157
+ if (s.key !== "Escape" || c < 0) return;
158
+ s.preventDefault();
159
+ const r = c;
160
+ l(null), x(r), requestAnimationFrame(() => {
161
+ var i;
162
+ (i = h.current[r]) == null || i.focus();
163
+ });
164
+ };
165
+ return e.addEventListener("keydown", t), () => e.removeEventListener("keydown", t);
166
+ }, [c, l]), ee(() => {
167
+ var e;
168
+ p && u.current && ((e = I.current) == null || e.focus()), u.current = !1;
169
+ }, [p]);
170
+ const C = v(d);
171
+ C.current = d;
172
+ const w = k(
173
+ () => ({
174
+ getActiveToolId: () => C.current,
175
+ setActiveTool: (e) => {
176
+ u.current = !1, l(e);
177
+ },
178
+ open: (e) => {
179
+ const t = a.find((s) => s.id === e);
180
+ !t || t.disabled || (u.current = !1, l(e));
181
+ },
182
+ close: () => {
183
+ u.current = !1, l(null);
184
+ }
185
+ }),
186
+ [a, l]
187
+ );
188
+ J(_, () => w, [w]), ae(te, w, n);
189
+ const q = m("aiToolsRail.badgeCountOverflow", {
190
+ defaultValue: "99+"
191
+ });
192
+ return /* @__PURE__ */ j(
193
+ "div",
194
+ {
195
+ ref: A,
196
+ "data-component": "ai-tools-rail",
197
+ "data-component-id": n,
198
+ "data-side": R,
199
+ className: [ie({ side: R }), H].filter(Boolean).join(" "),
200
+ children: [
201
+ p ? /* @__PURE__ */ f(
202
+ "aside",
203
+ {
204
+ ref: I,
205
+ tabIndex: -1,
206
+ "aria-label": m("aiToolsRail.panelLabel", {
207
+ tool: p.label,
208
+ defaultValue: "{{tool}} panel"
209
+ }),
210
+ "data-ai-tools-rail-state": "expanded",
211
+ "data-active-tool": p.id,
212
+ className: [re(), "ds:focus-visible:outline-none"].join(
213
+ " "
214
+ ),
215
+ children: /* @__PURE__ */ f(Y, { orientation: "vertical", className: "ds:flex-1 ds:min-h-0", children: p.panel })
216
+ }
217
+ ) : null,
218
+ /* @__PURE__ */ f(Z, { children: /* @__PURE__ */ f(
219
+ "div",
220
+ {
221
+ role: "toolbar",
222
+ "aria-orientation": "vertical",
223
+ "aria-label": z ?? m("aiToolsRail.railLabel", { defaultValue: "AI tools" }),
224
+ className: oe(),
225
+ onKeyDown: W,
226
+ children: a.map((e, t) => {
227
+ const s = e.id === d, r = typeof e.badgeCount == "number" && e.badgeCount > 0, i = r ? m("aiToolsRail.toolWithCount", {
228
+ tool: e.label,
229
+ count: e.badgeCount,
230
+ defaultValue: "{{tool}}, {{count}} updates"
231
+ }) : e.label;
232
+ return /* @__PURE__ */ j("div", { className: "ds:relative", children: [
233
+ /* @__PURE__ */ f(
234
+ X,
235
+ {
236
+ ref: (o) => {
237
+ h.current[t] = o;
238
+ },
239
+ icon: e.icon,
240
+ tooltip: e.label,
241
+ "aria-label": i,
242
+ intent: "ghost",
243
+ size: "sm",
244
+ disabled: e.disabled,
245
+ "aria-pressed": s,
246
+ "aria-expanded": s,
247
+ "data-active": s ? e.id : void 0,
248
+ "data-tool-id": e.id,
249
+ tabIndex: t === g ? 0 : -1,
250
+ onFocus: () => {
251
+ e.disabled || x(t);
252
+ },
253
+ onClick: () => U(e.id, T.current),
254
+ onKeyDown: (o) => {
255
+ (o.key === "Enter" || o.key === " ") && (T.current = !0);
256
+ },
257
+ onKeyUp: (o) => {
258
+ (o.key === "Enter" || o.key === " ") && (T.current = !1);
259
+ }
260
+ }
261
+ ),
262
+ r ? /* @__PURE__ */ f("span", { "aria-hidden": "true", className: le(), children: de(
263
+ e.badgeCount,
264
+ q
265
+ ) }) : null
266
+ ] }, e.id);
267
+ })
268
+ }
269
+ ) })
270
+ ]
271
+ }
272
+ );
273
+ }
274
+ );
275
+ ce.displayName = "AiToolsRail";
276
+ export {
277
+ ce as A,
278
+ te as a
279
+ };
280
+ //# sourceMappingURL=ai-tools-rail-CYLWrRmm.js.map
@@ -2,13 +2,14 @@ import { jsxs as E, jsx as t } from "react/jsx-runtime";
2
2
  import { forwardRef as a, useState as R, useRef as V, useCallback as z, Children as B, isValidElement as D } from "react";
3
3
  import { c as F } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as L } from "react-i18next";
5
- import { u as W } from "./use-controllable-state-BiY4xTzM.js";
6
- import { X } from "./x-CCcI3eJp.js";
5
+ import { u as U } from "./use-controllable-state-BiY4xTzM.js";
6
+ import { X as W } from "./x-CCcI3eJp.js";
7
+ import { C as X } from "./circle-arrow-up-CC_85SuH.js";
7
8
  import { C as G } from "./circle-x-Du2CmjaU.js";
8
9
  import { T as H } from "./triangle-alert-CBPUIzQo.js";
9
10
  import { C as M } from "./circle-check-9AeSgJD_.js";
10
11
  import { I as P } from "./info-B9XNKn05.js";
11
- const U = F(
12
+ const $ = F(
12
13
  [
13
14
  // Default `items-center` keeps the icon + dismiss optically aligned
14
15
  // with a single-line description. The `data-[has-title=true]`
@@ -58,6 +59,19 @@ const U = F(
58
59
  "ds:text-[var(--error-foreground)]",
59
60
  "ds:[&_[data-intent=tonal]]:bg-[color:var(--error-foreground)]",
60
61
  "ds:[&_[data-intent=tonal]]:text-[color:var(--background)]"
62
+ ].join(" "),
63
+ // Sales / marketing upsell — accent magenta via the --promo
64
+ // semantic pair so marketing pushes (product hub → warning
65
+ // stack) read as offers, not operational warnings. Surface is
66
+ // the same subtle accent gradient as SidebarUpgradeChip (it
67
+ // flattens in the accessible themes and follows Canvas in
68
+ // forced-colors), keeping the two upsell affordances kin.
69
+ promo: [
70
+ "ds:border-[color:var(--promo)]",
71
+ "ds:bg-[image:var(--gradient-surface-subtle-accent)]",
72
+ "ds:text-[var(--promo-foreground)]",
73
+ "ds:[&_[data-intent=tonal]]:bg-[color:var(--promo-foreground)]",
74
+ "ds:[&_[data-intent=tonal]]:text-[color:var(--background)]"
61
75
  ].join(" ")
62
76
  }
63
77
  },
@@ -65,7 +79,7 @@ const U = F(
65
79
  variant: "info"
66
80
  }
67
81
  }
68
- ), h = "ds:shrink-0 ds:size-5", $ = `${h} ds:mt-0.5`, q = [
82
+ ), h = "ds:shrink-0 ds:size-5", q = `${h} ds:mt-0.5`, J = [
69
83
  // Default (no title): the alert root uses `items-center` and the
70
84
  // button centres in the cross-axis. A centred 16×16 glyph inside a
71
85
  // 44×44 button aligns optically with a single-line description.
@@ -89,7 +103,7 @@ const U = F(
89
103
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
90
104
  "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
91
105
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
92
- ].join(" "), J = {
106
+ ].join(" "), K = {
93
107
  info: { icon: /* @__PURE__ */ t(P, { "aria-hidden": "true" }), role: "status", live: "polite" },
94
108
  success: {
95
109
  icon: /* @__PURE__ */ t(M, { "aria-hidden": "true" }),
@@ -105,70 +119,76 @@ const U = F(
105
119
  icon: /* @__PURE__ */ t(G, { "aria-hidden": "true" }),
106
120
  role: "alert",
107
121
  live: "assertive"
122
+ },
123
+ // Promotions never interrupt — same polite semantics as info.
124
+ promo: {
125
+ icon: /* @__PURE__ */ t(X, { "aria-hidden": "true" }),
126
+ role: "status",
127
+ live: "polite"
108
128
  }
109
129
  }, c = a(
110
- ({ as: e = "h5", className: s, ...o }, n) => /* @__PURE__ */ t(
130
+ ({ as: e = "h5", className: o, ...r }, n) => /* @__PURE__ */ t(
111
131
  e,
112
132
  {
113
133
  ref: n,
114
- className: ["type-title-item", s].filter(Boolean).join(" "),
115
- ...o
134
+ className: ["type-title-item", o].filter(Boolean).join(" "),
135
+ ...r
116
136
  }
117
137
  )
118
138
  );
119
139
  c.displayName = "Alert.Title";
120
- const x = a(({ className: e, ...s }, o) => /* @__PURE__ */ t(
140
+ const x = a(({ className: e, ...o }, r) => /* @__PURE__ */ t(
121
141
  "p",
122
142
  {
123
- ref: o,
143
+ ref: r,
124
144
  className: [
125
145
  "ds:[[data-has-title=true]_&]:mt-[var(--spacing-xs)] type-body-sm",
126
146
  e
127
147
  ].filter(Boolean).join(" "),
128
- ...s
148
+ ...o
129
149
  }
130
150
  ));
131
151
  x.displayName = "Alert.Description";
132
152
  const _ = a(
133
- ({ className: e, ...s }, o) => /* @__PURE__ */ t(
153
+ ({ className: e, ...o }, r) => /* @__PURE__ */ t(
134
154
  "div",
135
155
  {
136
- ref: o,
156
+ ref: r,
137
157
  className: [
138
158
  "ds:mt-[var(--spacing-sm)] ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
139
159
  e
140
160
  ].filter(Boolean).join(" "),
141
- ...s
161
+ ...o
142
162
  }
143
163
  )
144
164
  );
145
165
  _.displayName = "Alert.Action";
146
- const w = a(
166
+ const C = a(
147
167
  ({
148
168
  variant: e = "info",
149
- dismissible: s = !1,
150
- open: o,
169
+ dismissible: o = !1,
170
+ open: r,
151
171
  onOpenChange: n,
152
172
  icon: m,
153
- live: C,
173
+ live: w,
154
174
  className: A,
155
175
  children: u,
156
176
  ...N
157
177
  }, y) => {
158
- const { t: T } = L(), [j, k] = W({
159
- value: o,
178
+ const { t: T } = L(), [j, k] = U({
179
+ value: r,
160
180
  defaultValue: !0,
161
181
  onChange: n
162
182
  }), I = j ?? !0, [f, g] = R(!1), i = V(null), O = z(() => {
163
183
  if (typeof window > "u") return 200;
164
- const r = window.getComputedStyle(document.documentElement).getPropertyValue("--animation-duration");
165
- if (!r) return 200;
166
- const b = r.trim(), l = parseFloat(b);
184
+ const s = window.getComputedStyle(document.documentElement).getPropertyValue("--animation-duration");
185
+ if (!s) return 200;
186
+ const b = s.trim(), l = parseFloat(b);
167
187
  return Number.isFinite(l) ? b.endsWith("ms") ? l : l * 1e3 : 200;
168
188
  }, []);
169
189
  if (!I) return null;
170
- const d = J[e], v = m !== void 0 ? m : d.icon, p = B.toArray(u).some(
171
- (r) => D(r) && r.type === c
190
+ const d = K[e], v = m !== void 0 ? m : d.icon, p = B.toArray(u).some(
191
+ (s) => D(s) && s.type === c
172
192
  ), S = () => {
173
193
  f || (g(!0), i.current && clearTimeout(i.current), i.current = setTimeout(() => {
174
194
  g(!1), k(!1);
@@ -179,12 +199,12 @@ const w = a(
179
199
  {
180
200
  ref: y,
181
201
  role: d.role,
182
- "aria-live": C ?? d.live,
202
+ "aria-live": w ?? d.live,
183
203
  "data-component": "alert",
184
204
  "data-has-title": p ? "true" : "false",
185
205
  "data-state": f ? "closing" : "open",
186
206
  className: [
187
- U({ variant: e, className: A }),
207
+ $({ variant: e, className: A }),
188
208
  // Entry: fade + slide-down on mount. Exit: fade + slide-up + slight
189
209
  // scale when dismissed. Driven by `tw-animate-css`. Respects
190
210
  // `prefers-reduced-motion` via `motion-safe:` and zeroes under the
@@ -200,16 +220,17 @@ const w = a(
200
220
  ].join(" "),
201
221
  ...N,
202
222
  children: [
203
- v ? /* @__PURE__ */ t("span", { className: p ? $ : h, children: v }) : null,
223
+ v ? /* @__PURE__ */ t("span", { className: p ? q : h, children: v }) : null,
204
224
  /* @__PURE__ */ t("div", { className: "ds:flex-1 ds:min-w-0", children: u }),
205
- s ? /* @__PURE__ */ t(
225
+ o ? /* @__PURE__ */ t(
206
226
  "button",
207
227
  {
208
228
  type: "button",
209
229
  "aria-label": T("common.close", "Close"),
210
230
  onClick: S,
211
- className: q,
212
- children: /* @__PURE__ */ t(X, { "aria-hidden": "true", className: "ds:size-4" })
231
+ "data-alert-dismiss": "",
232
+ className: J,
233
+ children: /* @__PURE__ */ t(W, { "aria-hidden": "true", className: "ds:size-4" })
213
234
  }
214
235
  ) : null
215
236
  ]
@@ -217,13 +238,13 @@ const w = a(
217
238
  );
218
239
  }
219
240
  );
220
- w.displayName = "Alert";
221
- const nt = Object.assign(w, {
241
+ C.displayName = "Alert";
242
+ const dt = Object.assign(C, {
222
243
  Title: c,
223
244
  Description: x,
224
245
  Action: _
225
246
  });
226
247
  export {
227
- nt as A
248
+ dt as A
228
249
  };
229
- //# sourceMappingURL=alert-ywPR59NE.js.map
250
+ //# sourceMappingURL=alert-CUTxnym2.js.map
@@ -10,7 +10,7 @@ import { S as Y } from "./sparkles-CuYXqQLg.js";
10
10
  import { A as F } from "./avatar-BNQNhoyL.js";
11
11
  import { B as S } from "./button-DD_0Xdmr.js";
12
12
  import { C as Ie } from "./chat-container-ogB4OskO.js";
13
- import { C as Ee } from "./chat-message-B5JpFj0F.js";
13
+ import { C as Ee } from "./chat-message-Dm8U2RY1.js";
14
14
  import { C as ne, P as _e } from "./chat-input-CFwc7JxL.js";
15
15
  import { S as Re } from "./spinner-OjQNn8oN.js";
16
16
  import { S as Pe } from "./streaming-text-CfhDqtIT.js";
@@ -618,6 +618,7 @@ const O = D(
618
618
  {
619
619
  role: u.role,
620
620
  content: u.content,
621
+ body: u.body,
621
622
  avatar: K,
622
623
  timestamp: u.timestamp,
623
624
  status: u.status,
@@ -1122,4 +1123,4 @@ export {
1122
1123
  us as b,
1123
1124
  vs as c
1124
1125
  };
1125
- //# sourceMappingURL=alia-sidebar-CVIPrdc9.js.map
1126
+ //# sourceMappingURL=alia-sidebar-DlvyXgVC.js.map
@@ -0,0 +1,156 @@
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ import { forwardRef as M, useId as C, useMemo as R } from "react";
3
+ import { c as q } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as z } from "react-i18next";
5
+ import { B as n } from "./badge-zsf5i5bH.js";
6
+ import { C as N } from "./card-DPmk26CL.js";
7
+ import { A as G, b as O, c as Q, a as S } from "./accordion-9lJSMMsZ.js";
8
+ import { D as t } from "./description-list-BEbK2g93.js";
9
+ import { T as w } from "./timestamp-BV2lC-wV.js";
10
+ import { T as y } from "./triangle-alert-CBPUIzQo.js";
11
+ const H = q("ds:w-full ds:text-[color:var(--foreground)]", {
12
+ variants: {
13
+ // Matches the kit's other `surface` props. `'elevated'` (default)
14
+ // wraps in `<Card variant="elevated">`; `'flat'` drops the chrome
15
+ // for use inside an existing Card / Sheet.
16
+ surface: {
17
+ flat: "",
18
+ elevated: ""
19
+ }
20
+ },
21
+ defaultVariants: { surface: "elevated" }
22
+ }), J = M(
23
+ ({
24
+ dateIso: V,
25
+ createdAtIso: u,
26
+ formName: T,
27
+ highlightedAnswerCount: o = 0,
28
+ status: s,
29
+ answers: d,
30
+ surface: p = "elevated",
31
+ "aria-label": A,
32
+ id: f,
33
+ className: D,
34
+ ...F
35
+ }, I) => {
36
+ const { t: a } = z(), h = C(), L = C(), v = T ?? a("anamnesisCard.defaultFormName", { defaultValue: "Medical history" }), B = A ?? v, i = o > 0, c = (s == null ? void 0 : s.expired) === !0, m = (s == null ? void 0 : s.corrupted) === !0, g = (d == null ? void 0 : d.length) ?? 0, x = R(() => !i && !c && !m ? null : /* @__PURE__ */ r(
37
+ "div",
38
+ {
39
+ role: "list",
40
+ "aria-label": a("anamnesisCard.statusGroupLabel", {
41
+ defaultValue: "Questionnaire status"
42
+ }),
43
+ className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-2xs)]",
44
+ children: [
45
+ i ? /* @__PURE__ */ e(
46
+ n,
47
+ {
48
+ variant: "error",
49
+ withDot: !0,
50
+ leading: /* @__PURE__ */ e(y, { "aria-hidden": "true" }),
51
+ role: "listitem",
52
+ children: a("anamnesisCard.status.highlighted", {
53
+ count: o,
54
+ defaultValue: "{{count}} flagged answers"
55
+ })
56
+ }
57
+ ) : null,
58
+ c ? /* @__PURE__ */ e(n, { variant: "warning", withDot: !0, role: "listitem", children: a("anamnesisCard.status.expired", { defaultValue: "Expired" }) }) : null,
59
+ m ? /* @__PURE__ */ e(n, { variant: "error", withDot: !0, role: "listitem", children: a("anamnesisCard.status.corrupted", {
60
+ defaultValue: "Corrupted"
61
+ }) }) : null
62
+ ]
63
+ }
64
+ ), [i, c, m, o, a]), j = /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
65
+ /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-wrap ds:items-start ds:gap-[var(--spacing-sm)]", children: [
66
+ /* @__PURE__ */ e(
67
+ "h3",
68
+ {
69
+ id: h,
70
+ className: "type-title-card ds:m-0 ds:text-[color:var(--foreground)]",
71
+ children: v
72
+ }
73
+ ),
74
+ x ? /* @__PURE__ */ e("div", { className: "ds:ms-auto ds:flex ds:shrink-0 ds:items-center", children: x }) : null
75
+ ] }),
76
+ /* @__PURE__ */ r("p", { className: "type-body-sm ds:m-0 ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
77
+ /* @__PURE__ */ r("span", { children: [
78
+ a("anamnesisCard.compiledOn", { defaultValue: "Compiled" }),
79
+ " ",
80
+ /* @__PURE__ */ e(w, { value: V, format: "absolute", shape: "bare" })
81
+ ] }),
82
+ u ? /* @__PURE__ */ r("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
83
+ /* @__PURE__ */ e("span", { "aria-hidden": "true", children: "·" }),
84
+ /* @__PURE__ */ r("span", { children: [
85
+ a("anamnesisCard.submitted", { defaultValue: "Submitted" }),
86
+ " ",
87
+ /* @__PURE__ */ e(
88
+ w,
89
+ {
90
+ value: u,
91
+ format: "relative",
92
+ shape: "bare"
93
+ }
94
+ )
95
+ ] })
96
+ ] }) : null
97
+ ] })
98
+ ] }), k = g > 0 ? /* @__PURE__ */ e(t, { layout: "stacked", density: "compact", divider: "between", children: d.map((l, E) => /* @__PURE__ */ r(
99
+ t.Row,
100
+ {
101
+ className: l.highlight ? "ds:border ds:border-[color:var(--destructive)] ds:rounded-[var(--radius-sm)] ds:p-[var(--spacing-sm)]" : void 0,
102
+ children: [
103
+ /* @__PURE__ */ e(t.Term, { children: /* @__PURE__ */ r("span", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
104
+ /* @__PURE__ */ e("span", { children: l.question }),
105
+ l.highlight ? /* @__PURE__ */ e(
106
+ n,
107
+ {
108
+ variant: "error",
109
+ size: "sm",
110
+ withDot: !0,
111
+ leading: /* @__PURE__ */ e(y, { "aria-hidden": "true" }),
112
+ "aria-label": a("anamnesisCard.answerFlagLabel", {
113
+ defaultValue: "Flagged answer"
114
+ })
115
+ }
116
+ ) : null
117
+ ] }) }),
118
+ /* @__PURE__ */ e(t.Detail, { children: l.answer })
119
+ ]
120
+ },
121
+ E
122
+ )) }) : /* @__PURE__ */ e("p", { className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]", children: a("anamnesisCard.empty", {
123
+ defaultValue: "No answers were recorded."
124
+ }) }), b = /* @__PURE__ */ r("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
125
+ j,
126
+ /* @__PURE__ */ e(G, { type: "single", collapsible: !0, variant: "separated", children: /* @__PURE__ */ r(O, { value: L, children: [
127
+ /* @__PURE__ */ e(Q, { children: a("anamnesisCard.interviewToggle", {
128
+ count: g,
129
+ defaultValue: "Interview ({{count}} answers)"
130
+ }) }),
131
+ /* @__PURE__ */ e(S, { children: k })
132
+ ] }) })
133
+ ] });
134
+ return /* @__PURE__ */ e(
135
+ "div",
136
+ {
137
+ ref: I,
138
+ role: "region",
139
+ "aria-label": B,
140
+ "aria-labelledby": h,
141
+ "data-component": "anamnesis-card",
142
+ "data-component-id": f,
143
+ "data-has-flags": i || void 0,
144
+ id: f,
145
+ className: H({ surface: p, className: D }),
146
+ ...F,
147
+ children: p === "elevated" ? /* @__PURE__ */ e(N, { variant: "elevated", children: /* @__PURE__ */ e(N.Body, { children: b }) }) : b
148
+ }
149
+ );
150
+ }
151
+ );
152
+ J.displayName = "AnamnesisCard";
153
+ export {
154
+ J as A
155
+ };
156
+ //# sourceMappingURL=anamnesis-card-CmkBVAln.js.map