@bahmni/widgets 0.0.1-dev.453 → 0.0.1-dev.456

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.
@@ -1,5 +1,5 @@
1
1
  import { jsx as o, jsxs as _, Fragment as Ee } from "react/jsx-runtime";
2
- import { p as fe, a as Ae, u as ge, b as Ne, c as Ce, d as De, Q as Ie, N as Le, i as Oe, v as be, X as ye, _ as X, e as Se, f as ve, x as we, W as Ue, g as Me, h as J, r as te } from "./index-ClqkhB6j.js";
2
+ import { p as fe, a as Ae, u as ge, b as Ce, c as Ne, i as De, X as Ie, A as Le, d as Oe, M as be, Q as ye, _ as X, N as Se, e as ve, x as we, W as Me, f as Ue, h as J, g as te } from "./index-BSjeukzT.js";
3
3
  import { useQuery as Re } from "@tanstack/react-query";
4
4
  import { useState as p, useRef as Pe, useEffect as f, useMemo as A, useCallback as E } from "react";
5
5
  import { useTranslation as ke } from "react-i18next";
@@ -89,27 +89,27 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
89
89
  ], ht = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, ee = (n) => n.attachments.length > 0 ? n.attachments : n.documentUrl ? [{ url: n.documentUrl, contentType: n.contentType }] : [], At = ({ config: n, encounterUuids: d }) => {
90
90
  const [l, D] = p(!1), [r, g] = p(
91
91
  null
92
- ), [y, U] = p(
92
+ ), [y, M] = p(
93
93
  /* @__PURE__ */ new Set()
94
- ), [S, M] = p(
94
+ ), [S, U] = p(
95
95
  /* @__PURE__ */ new Set()
96
96
  ), I = Pe(null), [R, V] = p(
97
97
  null
98
98
  ), W = R !== null;
99
99
  f(() => () => I.current?.abort(), []);
100
- const N = ge(), { t: s } = ke(), { addNotification: v } = Ne(), h = A(
100
+ const C = ge(), { t: s } = ke(), { addNotification: v } = Ce(), h = A(
101
101
  () => n?.actions?.find(
102
102
  (e) => e.type === lt
103
103
  ),
104
104
  [n?.actions]
105
- ), ae = Ce(h?.requiredPrivilege), oe = !!h && ae, se = Number(n?.pageSize) || 5, [P, k] = p(1), [L, re] = p(se), [ce, H] = p(void 0), z = E((e) => {
105
+ ), ae = Ne(h?.requiredPrivilege), oe = !!h && ae, se = Number(n?.pageSize) || 5, [P, k] = p(1), [L, re] = p(se), [ce, H] = p(void 0), z = E((e) => {
106
106
  g(e), D(!0);
107
107
  }, []), le = E(() => {
108
- I.current?.abort(), M(/* @__PURE__ */ new Set()), D(!1), g(null), U(/* @__PURE__ */ new Set());
108
+ I.current?.abort(), U(/* @__PURE__ */ new Set()), D(!1), g(null), M(/* @__PURE__ */ new Set());
109
109
  }, []), Y = E((e) => {
110
- M((t) => new Set(t).add(e));
111
- }, []), G = E((e) => {
112
110
  U((t) => new Set(t).add(e));
111
+ }, []), G = E((e) => {
112
+ M((t) => new Set(t).add(e));
113
113
  }, []), de = E(() => {
114
114
  h && globalThis.dispatchEvent(
115
115
  new CustomEvent(ct, {
@@ -123,14 +123,14 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
123
123
  }, [h]), { data: O, isLoading: ie, isError: B, error: $, refetch: q } = Re({
124
124
  queryKey: [
125
125
  "documents",
126
- N,
126
+ C,
127
127
  d,
128
128
  P,
129
129
  L
130
130
  ],
131
- enabled: !!N,
131
+ enabled: !!C,
132
132
  queryFn: () => De(
133
- N,
133
+ C,
134
134
  d,
135
135
  L,
136
136
  P
@@ -138,14 +138,14 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
138
138
  });
139
139
  Ie(
140
140
  (e) => {
141
- e.patientUUID === N && e.updatedResources.documents && q();
141
+ e.patientUUID === C && e.updatedResources.documents && q();
142
142
  },
143
- [N, q]
143
+ [C, q]
144
144
  ), f(() => {
145
145
  O && H(O.total);
146
146
  }, [O]), f(() => {
147
147
  k(1), H(void 0);
148
- }, [N]), f(() => {
148
+ }, [C]), f(() => {
149
149
  B && v({
150
150
  title: s("ERROR_DEFAULT_TITLE"),
151
151
  message: $?.message ?? "",
@@ -157,9 +157,9 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
157
157
  if (!l || !r) return;
158
158
  const a = /* @__PURE__ */ new Set(), u = ee(r);
159
159
  for (let i = 0; i < u.length; i++) {
160
- const C = b(u[i].url);
160
+ const N = b(u[i].url);
161
161
  try {
162
- (await fetch(C, {
162
+ (await fetch(N, {
163
163
  method: "HEAD",
164
164
  signal: e.signal
165
165
  })).ok || a.add(i);
@@ -167,7 +167,7 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
167
167
  T instanceof Error && T.name !== "AbortError" && a.add(i);
168
168
  }
169
169
  }
170
- e.signal.aborted || U(a);
170
+ e.signal.aborted || M(a);
171
171
  })(), () => e.abort();
172
172
  }, [l, r]), f(() => {
173
173
  if (!l || !r) return;
@@ -183,11 +183,11 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
183
183
  }, i = (T) => {
184
184
  const pe = T.target;
185
185
  it.has(T.key) && !pe?.closest("button, input, textarea, select, a") && a();
186
- }, C = () => {
186
+ }, N = () => {
187
187
  !t && e.scrollTop !== 0 && (e.scrollTop = 0);
188
188
  };
189
- return e.addEventListener("wheel", a, { passive: !0 }), e.addEventListener("touchmove", a, { passive: !0 }), e.addEventListener("mousedown", u), e.addEventListener("keydown", i), e.addEventListener("scroll", C), () => {
190
- e.removeEventListener("wheel", a), e.removeEventListener("touchmove", a), e.removeEventListener("mousedown", u), e.removeEventListener("keydown", i), e.removeEventListener("scroll", C);
189
+ return e.addEventListener("wheel", a, { passive: !0 }), e.addEventListener("touchmove", a, { passive: !0 }), e.addEventListener("mousedown", u), e.addEventListener("keydown", i), e.addEventListener("scroll", N), () => {
190
+ e.removeEventListener("wheel", a), e.removeEventListener("touchmove", a), e.removeEventListener("mousedown", u), e.removeEventListener("keydown", i), e.removeEventListener("scroll", N);
191
191
  };
192
192
  }, [l, r]);
193
193
  const me = E(
@@ -213,7 +213,7 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
213
213
  f(() => {
214
214
  if (!l || m.length === 0) return;
215
215
  const e = setTimeout(
216
- () => M(new Set(m.keys())),
216
+ () => U(new Set(m.keys())),
217
217
  mt
218
218
  );
219
219
  return () => clearTimeout(e);
@@ -324,7 +324,7 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
324
324
  }
325
325
  ) }),
326
326
  l && r && /* @__PURE__ */ o(
327
- Ue,
327
+ Me,
328
328
  {
329
329
  id: "modalIdForActionAreaLayout",
330
330
  portalId: "main-display-area",
@@ -336,7 +336,7 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
336
336
  testId: "document-view-modal",
337
337
  children: /* @__PURE__ */ _("div", { className: c.documentViewerContainer, children: [
338
338
  j.length > 1 && /* @__PURE__ */ o(
339
- Me,
339
+ Ue,
340
340
  {
341
341
  kind: "tertiary",
342
342
  size: "sm",
@@ -349,8 +349,8 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
349
349
  }
350
350
  ),
351
351
  m.map((e, t) => {
352
- const a = b(e.url), u = e.contentType?.toLowerCase().includes("pdf"), i = (e.contentType?.toLowerCase().includes("image") ?? !1) || ht.test(e.url ?? ""), C = y.has(t);
353
- return a === "#" || C ? /* @__PURE__ */ _(
352
+ const a = b(e.url), u = e.contentType?.toLowerCase().includes("pdf"), i = (e.contentType?.toLowerCase().includes("image") ?? !1) || ht.test(e.url ?? ""), N = y.has(t);
353
+ return a === "#" || N ? /* @__PURE__ */ _(
354
354
  "div",
355
355
  {
356
356
  className: c.attachmentError,
@@ -1,46 +1,46 @@
1
- import { jsx as n, jsxs as x, Fragment as ie } from "react/jsx-runtime";
2
- import { u as de, c as le, j as me, C as ce, k as ue, l as fe, m as Ne, Q as be, n as he, o as ye, J as Oe, i as ge, _ as q, P as V, N as Te, x as $, q as pe, s as Ee, W as Ie, O as Fe, t as Ae } from "./index-ClqkhB6j.js";
3
- import { useQueryClient as _e, useQuery as F } from "@tanstack/react-query";
1
+ import { jsx as n, jsxs as q, Fragment as ie } from "react/jsx-runtime";
2
+ import { u as de, c as le, j as me, C as ce, k as ue, l as fe, m as be, X as he, n as Ne, o as ye, J as Oe, d as ge, _ as x, P as V, A as pe, x as $, q as Te, r as Ee, W as Ie, O as Ae, s as Fe } from "./index-BSjeukzT.js";
3
+ import { useQueryClient as _e, useQuery as A } from "@tanstack/react-query";
4
4
  import { useState as j, useMemo as i, useCallback as d } from "react";
5
5
  import { useTranslation as ve } from "react-i18next";
6
6
  const Re = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_modalHeading__wnTmA", De = "FormsTable-module_customAccordianItem__isszs", y = {
7
7
  formsTableBody: Re,
8
8
  modalHeading: Ce,
9
9
  customAccordianItem: De
10
- }, Le = "startConsultation", ke = ({
11
- episodeOfCareUuids: A,
10
+ }, Le = "startConsultation", Ue = ({
11
+ episodeOfCareUuids: F,
12
12
  encounterUuids: m,
13
13
  config: G,
14
- disableActions: Q = !1,
15
- activeEncounterUuid: N = null
14
+ disableActions: z = !1,
15
+ activeEncounterUuid: b = null
16
16
  }) => {
17
17
  const { t: o } = ve(), c = de(), [O, _] = j(!1), [a, v] = j(null), {
18
- numberOfVisits: z,
19
- hideThumbnail: K = !1,
20
- forms: b
18
+ numberOfVisits: K,
19
+ hideThumbnail: Q = !1,
20
+ forms: h
21
21
  } = G ?? {}, W = le(
22
- Ae.EDIT_OBSERVATIONS
23
- ), { userPrivileges: h } = me(), g = W && !Q && !!N, R = ce(
24
- A,
22
+ Fe.EDIT_OBSERVATIONS
23
+ ), { userPrivileges: N } = me(), g = W && !z && !!b, R = ce(
24
+ F,
25
25
  m
26
26
  ), J = _e(), {
27
27
  data: C = [],
28
28
  isLoading: D,
29
29
  isError: L,
30
- error: Y,
31
- refetch: X
32
- } = F({
33
- queryKey: ["forms", c, A],
34
- queryFn: () => ue(c, void 0, z),
30
+ error: X,
31
+ refetch: Y
32
+ } = A({
33
+ queryKey: ["forms", c, F],
34
+ queryFn: () => ue(c, void 0, K),
35
35
  enabled: !!c && !R
36
36
  }), S = i(() => {
37
37
  let e = C;
38
38
  return m && m.length > 0 && (e = e.filter(
39
39
  (t) => m.includes(t.encounterUuid)
40
- )), Array.isArray(b) && b.length > 0 && (e = e.filter(
41
- (t) => b.some((s) => s.toLowerCase() === t.formName.toLowerCase())
40
+ )), Array.isArray(h) && h.length > 0 && (e = e.filter(
41
+ (t) => h.some((s) => s.toLowerCase() === t.formName.toLowerCase())
42
42
  )), e;
43
- }, [C, m, b]), { data: B = [] } = F({
43
+ }, [C, m, h]), { data: B = [] } = A({
44
44
  queryKey: ["observationForms"],
45
45
  queryFn: () => fe()
46
46
  }), M = d(
@@ -49,36 +49,36 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
49
49
  (r) => r.name.toLowerCase() === e.toLowerCase()
50
50
  );
51
51
  if (!t?.privileges || t.privileges.length === 0) return !0;
52
- if (!h || h.length === 0) return !1;
53
- const s = new Set(h.map((r) => r.name));
52
+ if (!N || N.length === 0) return !1;
53
+ const s = new Set(N.map((r) => r.name));
54
54
  return t.privileges.some(
55
55
  (r) => s.has(r.privilegeName) && r.editable
56
56
  );
57
57
  },
58
- [B, h]
58
+ [B, N]
59
59
  ), u = d(
60
- (e) => !N || e.encounterUuid !== N ? !1 : M(e.formName),
61
- [N, M]
60
+ (e) => !b || e.encounterUuid !== b ? !1 : M(e.formName),
61
+ [b, M]
62
62
  ), {
63
- data: T,
63
+ data: p,
64
64
  isLoading: Z,
65
65
  isError: ee,
66
- error: p
67
- } = F({
66
+ error: T
67
+ } = A({
68
68
  queryKey: ["formsEncounterFHIR", a?.encounterUuid],
69
- queryFn: () => Ne(a.encounterUuid),
69
+ queryFn: () => be(a.encounterUuid),
70
70
  enabled: !!a?.encounterUuid && O
71
71
  });
72
- be(
72
+ he(
73
73
  (e) => {
74
- e.patientUUID === c && (X(), J.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
74
+ e.patientUUID === c && (Y(), J.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
75
75
  },
76
76
  [c]
77
77
  );
78
- const re = i(() => !T?.entry || !a?.formName ? [] : T.entry.filter((t) => t.resource?.resourceType === "Observation").map((t) => t.resource).filter((t) => he(t) ? ye(t)?.toLowerCase() === a.formName.toLowerCase() : !0), [T, a?.formName]), te = i(() => {
79
- if (p)
80
- return Oe(p).message;
81
- }, [p]), f = i(
78
+ const re = i(() => !p?.entry || !a?.formName ? [] : p.entry.filter((t) => t.resource?.resourceType === "Observation").map((t) => t.resource).filter((t) => Ne(t) ? ye(t)?.toLowerCase() === a.formName.toLowerCase() : !0), [p, a?.formName]), te = i(() => {
79
+ if (T)
80
+ return Oe(T).message;
81
+ }, [T]), f = i(
82
82
  () => [
83
83
  { key: "recordedOn", header: o("RECORDED_ON") },
84
84
  { key: "recordedBy", header: o("RECORDED_BY") }
@@ -96,7 +96,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
96
96
  { key: "recordedBy", sortable: !0 }
97
97
  ],
98
98
  []
99
- ), U = i(() => {
99
+ ), k = i(() => {
100
100
  const e = S.reduce(
101
101
  (s, r) => {
102
102
  const l = r.formName;
@@ -121,7 +121,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
121
121
  )
122
122
  })
123
123
  ).sort((s, r) => s.formName.localeCompare(r.formName));
124
- }, [S, o]), k = d((e) => {
124
+ }, [S, o]), U = d((e) => {
125
125
  v(e), _(!0);
126
126
  }, []), H = d(() => {
127
127
  _(!1), v(null);
@@ -141,12 +141,12 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
141
141
  (e, t) => {
142
142
  switch (t) {
143
143
  case "recordedOn":
144
- return /* @__PURE__ */ n(Te, { onClick: () => k(e), children: e.recordedOn });
144
+ return /* @__PURE__ */ n(pe, { onClick: () => U(e), children: e.recordedOn });
145
145
  case "recordedBy":
146
146
  return e.recordedBy;
147
147
  case "actions":
148
148
  return u(e) ? /* @__PURE__ */ n(
149
- q,
149
+ x,
150
150
  {
151
151
  label: o("EDIT_OBSERVATION_FORM"),
152
152
  kind: "ghost",
@@ -160,23 +160,23 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
160
160
  return null;
161
161
  }
162
162
  },
163
- [k, E, u, o]
163
+ [U, E, u, o]
164
164
  );
165
- return /* @__PURE__ */ x(ie, { children: [
166
- /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: D || L || U.length === 0 || R ? /* @__PURE__ */ n(
165
+ return /* @__PURE__ */ q(ie, { children: [
166
+ /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: D || L || k.length === 0 || R ? /* @__PURE__ */ n(
167
167
  $,
168
168
  {
169
169
  headers: oe,
170
170
  ariaLabel: o("FORMS_HEADING"),
171
171
  rows: [],
172
172
  loading: D,
173
- errorStateMessage: L ? Y?.message : void 0,
173
+ errorStateMessage: L ? X?.message : void 0,
174
174
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
175
175
  renderCell: P,
176
176
  className: y.formsTableBody,
177
177
  dataTestId: "forms-table"
178
178
  }
179
- ) : /* @__PURE__ */ n(pe, { align: "start", children: U.map((e, t) => {
179
+ ) : /* @__PURE__ */ n(Te, { align: "start", children: k.map((e, t) => {
180
180
  const { formName: s, records: r } = e, l = se(r);
181
181
  return /* @__PURE__ */ n(
182
182
  Ee,
@@ -211,10 +211,10 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
211
211
  portalId: "main-display-area",
212
212
  open: O,
213
213
  onRequestClose: H,
214
- modalHeading: /* @__PURE__ */ x("div", { className: y.modalHeading, children: [
214
+ modalHeading: /* @__PURE__ */ q("div", { className: y.modalHeading, children: [
215
215
  /* @__PURE__ */ n("span", { children: a.formName }),
216
216
  g && u(a) && /* @__PURE__ */ n(
217
- q,
217
+ x,
218
218
  {
219
219
  label: o("EDIT_OBSERVATION_FORM"),
220
220
  kind: "ghost",
@@ -232,7 +232,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
232
232
  size: "md",
233
233
  testId: "form-details-modal",
234
234
  children: /* @__PURE__ */ n(
235
- Fe,
235
+ Ae,
236
236
  {
237
237
  observations: re,
238
238
  isLoading: Z,
@@ -240,7 +240,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
240
240
  errorMessage: te,
241
241
  emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
242
242
  testIdPrefix: a.formName,
243
- hideThumbnail: K,
243
+ hideThumbnail: Q,
244
244
  formName: a.formName
245
245
  }
246
246
  )
@@ -249,5 +249,5 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
249
249
  ] });
250
250
  };
251
251
  export {
252
- ke as default
252
+ Ue as default
253
253
  };
@@ -1,7 +1,7 @@
1
1
  import { jsx as i, jsxs as N } from "react/jsx-runtime";
2
- import { w as q, I as F, y as x, G as z, i as H, z as P, A as j, B as X, F as J, u as W, b as Y, D as Z, C as ee, E as se, H as te, Q as re, K as ae, L as oe, M as ne, R as ie, X as ce, x as le } from "./index-ClqkhB6j.js";
2
+ import { t as G, v as F, w as x, K as z, d as H, y as P, F as j, z as X, B as J, u as W, b as Y, D as Z, C as ee, E as se, G as te, X as re, H as ae, I as oe, L as ne, R as ie, Q as ce, x as le } from "./index-BSjeukzT.js";
3
3
  import { useQueries as de, useQuery as ue } from "@tanstack/react-query";
4
- import { useRef as pe, useEffect as C, useMemo as T } from "react";
4
+ import { useRef as pe, useEffect as C, useMemo as I } from "react";
5
5
  import { useTranslation as w } from "react-i18next";
6
6
  const be = "Observations-module_observations__RKSyo", me = "Observations-module_title__TJL3z", ve = "Observations-module_wrapper__muk2L", ye = "Observations-module_secondary__14nuS", y = {
7
7
  observations: be,
@@ -72,7 +72,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
72
72
  hideThumbnail: n
73
73
  }) => {
74
74
  const { t: c } = w(), u = (r, a, e) => {
75
- const p = q(r.encounterDetails, c);
75
+ const p = G(r.encounterDetails, c);
76
76
  return /* @__PURE__ */ N(
77
77
  F,
78
78
  {
@@ -148,7 +148,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
148
148
  type: "error"
149
149
  }), p.current.add(0)) : !s && R && p.current.clear();
150
150
  }, [m, b, d]);
151
- const _ = T(() => m.map((s) => s.data?.uuid).filter((s) => !!s), [m]), v = T(() => [.../* @__PURE__ */ new Set([..._, ...r])], [_, r]), f = T(() => u.length === 0 ? !0 : m.every((s) => !s.isLoading), [m, u.length]), g = e === "latest" || e === "latest-encounter", O = ee(
151
+ const _ = I(() => m.map((s) => s.data?.uuid).filter((s) => !!s), [m]), v = I(() => [.../* @__PURE__ */ new Set([..._, ...r])], [_, r]), f = I(() => u.length === 0 ? !0 : m.every((s) => !s.isLoading), [m, u.length]), g = e === "latest" || e === "latest-encounter", O = ee(
152
152
  l,
153
153
  n
154
154
  ), {
@@ -188,7 +188,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
188
188
  type: "error"
189
189
  });
190
190
  }, [S]);
191
- const A = T(() => {
191
+ const A = I(() => {
192
192
  if (!E) return [];
193
193
  let s = ae(E);
194
194
  e === "latest-encounter" && (s = oe(s));
@@ -198,12 +198,12 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
198
198
  { key: "name", header: "name" },
199
199
  { key: "value", header: "value" },
200
200
  { key: "form", header: "form" }
201
- ], B = V || !f, L = S && f, M = (!E || E.entry?.length === 0 || v.length === 0) && f, Q = L ? d("ERROR_FETCHING_OBSERVATIONS") : null, G = M ? d("NO_OBSERVATIONS_FOUND") : void 0, k = A.length > 0 && !B && !L, I = c.titleTranslationKey, h = I ? d(I) : "";
201
+ ], B = V || !f, L = S && f, Q = (!E || E.entry?.length === 0 || v.length === 0) && f, M = L ? d("ERROR_FETCHING_OBSERVATIONS") : null, k = Q ? d("NO_OBSERVATIONS_FOUND") : void 0, q = A.length > 0 && !B && !L, T = c.titleTranslationKey, h = T ? d(T) : "";
202
202
  return /* @__PURE__ */ N(
203
203
  "div",
204
204
  {
205
205
  id: "observations",
206
- "data-testid": I ? `observations-${h}` : "observations",
206
+ "data-testid": T ? `observations-${h}` : "observations",
207
207
  "aria-label": "observations-aria-label",
208
208
  className: y.observations,
209
209
  children: [
@@ -211,13 +211,13 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
211
211
  ce,
212
212
  {
213
213
  id: "observations-title",
214
- testId: I ? `observations-title-${h}` : "observations-title",
214
+ testId: T ? `observations-title-${h}` : "observations-title",
215
215
  title: h,
216
216
  className: y.title,
217
217
  children: /* @__PURE__ */ i("p", { children: h })
218
218
  }
219
219
  ),
220
- k ? /* @__PURE__ */ i(
220
+ q ? /* @__PURE__ */ i(
221
221
  Oe,
222
222
  {
223
223
  groupedData: A,
@@ -231,8 +231,8 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
231
231
  rows: [],
232
232
  ariaLabel: d("OBSERVATIONS"),
233
233
  loading: B,
234
- errorStateMessage: Q,
235
- emptyStateMessage: G ?? d("NO_OBSERVATIONS_AVAILABLE"),
234
+ errorStateMessage: M,
235
+ emptyStateMessage: k ?? d("NO_OBSERVATIONS_AVAILABLE"),
236
236
  dataTestId: "observations-table"
237
237
  }
238
238
  )