@parallelworks/tandem-web 0.171.2 → 0.172.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.
package/pages/triage.js CHANGED
@@ -3,34 +3,32 @@ import { issueQuery as n, teamsQuery as r, triageVisitsQuery as i } from "../api
3
3
  import { ActorAvatar as a } from "../components/ActorAvatar.js";
4
4
  import { Editor as o } from "../components/Editor.js";
5
5
  import { EntityIcon as s } from "../components/EntityIcon.js";
6
- import { AddIcon as c, PriorityIcon as l, StatusIcon as u, TriageIcon as d, usePriorityNames as f } from "../components/icons.js";
6
+ import { PriorityIcon as c, StatusIcon as l, TriageIcon as u, usePriorityNames as d } from "../components/icons.js";
7
+ import { TriageButtons as f } from "../components/TriageButtons.js";
7
8
  import { actorAvatar as p } from "../lib/avatar.js";
8
9
  import { usePageTitle as m } from "../lib/pageTitle.js";
9
10
  import { usePeople as h } from "../lib/people.js";
10
11
  import { useCanTriage as g } from "../lib/roles.js";
11
12
  import { Link as _, useNavigate as v } from "../lib/router.js";
12
- import { useShortcuts as ee } from "../lib/shortcuts.js";
13
- import { useTime as y } from "../lib/time.js";
14
- import { triageQuery as b, useVisitTriage as x } from "../lib/triage.js";
15
- import { unseen as S } from "../lib/triageSeen.js";
16
- import { Avatar as C, Button as w, EmptyState as T, RelativeTime as E, buttonClasses as D, toast as O } from "@parallelworks/ui";
17
- import { useParams as te, useSearch as k } from "@tanstack/react-router";
18
- import { useCallback as A, useEffect as j, useRef as M, useState as N } from "react";
19
- import { useErrorMessage as P } from "@parallelworks/problem/react";
20
- import { useTranslations as F } from "use-intl";
21
- import { Fragment as I, jsx as L, jsxs as R } from "react/jsx-runtime";
22
- import { useMutation as z, useQuery as B, useQueryClient as V, useSuspenseQuery as H } from "@tanstack/react-query";
13
+ import { useShortcuts as y } from "../lib/shortcuts.js";
14
+ import { useTime as b } from "../lib/time.js";
15
+ import { triageQuery as x, useVisitTriage as S } from "../lib/triage.js";
16
+ import { hasOpened as C } from "../lib/triageSeen.js";
17
+ import { Avatar as w, Button as T, EmptyState as E, RelativeTime as D, Tooltip as O, buttonClasses as k, toast as A } from "@parallelworks/ui";
18
+ import { useParams as j, useSearch as M } from "@tanstack/react-router";
19
+ import { useCallback as N, useEffect as P, useRef as F, useState as I } from "react";
20
+ import { useErrorMessage as L } from "@parallelworks/problem/react";
21
+ import { useTranslations as R } from "use-intl";
22
+ import { jsx as z, jsxs as B } from "react/jsx-runtime";
23
+ import { useMutation as ee, useQuery as V, useQueryClient as te, useSuspenseQuery as H } from "@tanstack/react-query";
23
24
  // src/pages/triage.tsx
24
25
  function U() {
25
- let n = F("triage"), { workspace: r, key: a } = te({ strict: !1 }), { issue: o } = k({ strict: !1 }), { data: s } = H(b(r, a));
26
+ let n = R("triage"), { workspace: r, key: a } = j({ strict: !1 }), { issue: o } = M({ strict: !1 }), { data: s } = H(x(r, a));
26
27
  m(n("title"));
27
- let c = s.issues, l = P(), u = V(), [f, p] = N(/* @__PURE__ */ new Set()), [h, g] = N(/* @__PURE__ */ new Set()), _ = A((e, t) => {
28
+ let c = s.issues, l = L(), d = te(), [f, p] = I(/* @__PURE__ */ new Set()), [h, g] = I(/* @__PURE__ */ new Set()), _ = N((e, t) => {
28
29
  p((n) => n.has(e) === t ? n : t ? new Set(n).add(e) : G(n, e));
29
- }, []), y = c.filter((e) => f.has(e.id)), C = y.filter((e) => h.has(e.id)), E = v(), D = c.findIndex((e) => e.identifier === o?.toUpperCase()), I = M(null), U = c[D], { data: K, isError: ie } = B(i(r)), ae = {
30
- data: K,
31
- failed: ie
32
- }, { mutate: q } = x(r), J = M(/* @__PURE__ */ new Set());
33
- j(() => {
30
+ }, []), b = c.filter((e) => f.has(e.id)), w = b.filter((e) => h.has(e.id)), D = v(), O = c.findIndex((e) => e.identifier === o?.toUpperCase()), k = F(null), U = c[O], { data: K } = V(i(r)), { mutate: q } = S(r), J = F(/* @__PURE__ */ new Set());
31
+ P(() => {
34
32
  U && K && !K.includes(U.id) && !J.current.has(U.id) && (J.current.add(U.id), q({
35
33
  id: U.id,
36
34
  identifier: U.identifier
@@ -40,7 +38,7 @@ function U() {
40
38
  K,
41
39
  q
42
40
  ]);
43
- let Y = (e) => E({
41
+ let Y = (e) => D({
44
42
  to: ".",
45
43
  search: e ? { issue: e.identifier.toLowerCase() } : {},
46
44
  replace: !0
@@ -49,18 +47,18 @@ function U() {
49
47
  }, Z = (e, t) => {
50
48
  let [n, r] = e < t ? [e, t] : [t, e];
51
49
  g(new Set(c.slice(n, r + 1).filter((e) => f.has(e.id)).map((e) => e.id)));
52
- }, oe = (e, t) => {
50
+ }, ie = (e, t) => {
53
51
  let n = c[t];
54
- n && (e.metaKey || e.ctrlKey ? (e.preventDefault(), X(n), I.current = t) : e.shiftKey && (e.preventDefault(), Z(I.current ?? (D >= 0 ? D : t), t)));
52
+ n && (e.metaKey || e.ctrlKey ? (e.preventDefault(), X(n), k.current = t) : e.shiftKey && (e.preventDefault(), Z(k.current ?? (O >= 0 ? O : t), t)));
55
53
  }, Q = (e, t) => {
56
54
  if (c.length === 0) return;
57
- let n = D < 0 ? 0 : Math.min(Math.max(D + e, 0), c.length - 1);
58
- t && ((I.current === null || h.size === 0) && (I.current = Math.max(D, 0)), Z(I.current, n)), Y(c[n]);
59
- }, se = (e) => {
55
+ let n = O < 0 ? 0 : Math.min(Math.max(O + e, 0), c.length - 1);
56
+ t && ((k.current === null || h.size === 0) && (k.current = Math.max(O, 0)), Z(k.current, n)), Y(c[n]);
57
+ }, ae = (e) => {
60
58
  let t = c.findIndex((t) => t.id === e.id);
61
59
  e.id === U?.id && Y(c[t + 1] ?? c[t - 1]);
62
60
  };
63
- ee({
61
+ y({
64
62
  j: () => Q(1, !1),
65
63
  k: () => Q(-1, !1),
66
64
  J: () => Q(1, !0),
@@ -68,9 +66,9 @@ function U() {
68
66
  ArrowDown: (e) => Q(1, e.shiftKey),
69
67
  ArrowUp: (e) => Q(-1, e.shiftKey),
70
68
  x: () => {
71
- U && (X(U), I.current = D);
69
+ U && (X(U), k.current = O);
72
70
  },
73
- Enter: () => U && E({
71
+ Enter: () => U && D({
74
72
  to: "/$workspace/issues/$identifier",
75
73
  params: {
76
74
  workspace: r,
@@ -80,12 +78,12 @@ function U() {
80
78
  "Mod+a": () => g(new Set(c.map((e) => e.id))),
81
79
  "Shift+Mod+a": () => g(/* @__PURE__ */ new Set()),
82
80
  Escape: () => h.size > 0 ? g(/* @__PURE__ */ new Set()) : Y(void 0)
83
- }), j(() => {
81
+ }), P(() => {
84
82
  let e = U && document.getElementById(`triage-${U.id}`);
85
83
  e && (e.scrollIntoView({ block: "nearest" }), e.parentElement?.contains(document.activeElement) && e.querySelector("a")?.focus({ preventScroll: !0 }));
86
84
  }, [U]);
87
- let $ = z({
88
- mutationFn: async (n) => (await Promise.allSettled(C.map(async (i) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
85
+ let $ = ee({
86
+ mutationFn: async (n) => (await Promise.allSettled(w.map(async (i) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
89
87
  params: { path: {
90
88
  workspace: r,
91
89
  identifier: i.identifier
@@ -95,105 +93,105 @@ function U() {
95
93
  onSuccess: (e) => {
96
94
  if (U && h.has(U.id)) {
97
95
  let e = (e) => !h.has(e.id);
98
- Y(c.slice(D + 1).find(e) ?? c.slice(0, D).findLast(e));
96
+ Y(c.slice(O + 1).find(e) ?? c.slice(0, O).findLast(e));
99
97
  }
100
98
  g(/* @__PURE__ */ new Set());
101
99
  let t = e[0];
102
- t && O.error(n("bulkFailed", {
100
+ t && A.error(n("bulkFailed", {
103
101
  count: e.length,
104
102
  reason: l(t.reason)
105
103
  }));
106
104
  },
107
- onSettled: () => u.invalidateQueries({ queryKey: [
105
+ onSettled: () => d.invalidateQueries({ queryKey: [
108
106
  "workspace",
109
107
  r,
110
108
  "issues"
111
109
  ] })
112
110
  });
113
- return /* @__PURE__ */ R("div", {
111
+ return /* @__PURE__ */ B("div", {
114
112
  className: "flex h-full flex-col",
115
- children: [/* @__PURE__ */ R("header", {
113
+ children: [/* @__PURE__ */ B("header", {
116
114
  className: "flex h-12 shrink-0 items-center gap-3 border-b border-border px-4 md:px-5",
117
115
  children: [
118
- /* @__PURE__ */ L("h1", {
116
+ /* @__PURE__ */ z("h1", {
119
117
  className: "text-sm font-semibold",
120
118
  children: n("title")
121
119
  }),
122
- /* @__PURE__ */ L("span", {
120
+ /* @__PURE__ */ z("span", {
123
121
  className: "text-xs text-muted-foreground tabular-nums",
124
122
  children: c.length
125
123
  }),
126
- C.length > 0 && /* @__PURE__ */ R("div", {
124
+ w.length > 0 && /* @__PURE__ */ B("div", {
127
125
  className: "ml-auto flex items-center gap-2",
128
126
  children: [
129
- /* @__PURE__ */ L("span", {
127
+ /* @__PURE__ */ z("span", {
130
128
  className: "text-xs font-medium text-human",
131
- children: n("selected", { count: C.length })
129
+ children: n("selected", { count: w.length })
132
130
  }),
133
- C.length < y.length && /* @__PURE__ */ L("button", {
131
+ w.length < b.length && /* @__PURE__ */ z("button", {
134
132
  type: "button",
135
- onClick: () => g(new Set(y.map((e) => e.id))),
133
+ onClick: () => g(new Set(b.map((e) => e.id))),
136
134
  className: "text-xs hover:underline",
137
135
  children: n("selectAll")
138
136
  }),
139
- /* @__PURE__ */ L("button", {
137
+ /* @__PURE__ */ z("button", {
140
138
  type: "button",
141
139
  onClick: () => g(/* @__PURE__ */ new Set()),
142
140
  className: "text-xs hover:underline",
143
141
  children: n("clear")
144
142
  }),
145
- /* @__PURE__ */ L(w, {
143
+ /* @__PURE__ */ z(T, {
146
144
  variant: "outline",
147
145
  size: "sm",
148
146
  title: n("declineHelp"),
149
147
  loading: $.isPending && $.variables === "decline",
150
148
  disabled: $.isPending,
151
149
  onClick: () => $.mutate("decline"),
152
- children: n("declineCount", { count: C.length })
150
+ children: n("declineCount", { count: w.length })
153
151
  }),
154
- /* @__PURE__ */ L(w, {
152
+ /* @__PURE__ */ z(T, {
155
153
  variant: "primary",
156
154
  size: "sm",
157
155
  title: n("acceptHelp"),
158
156
  loading: $.isPending && $.variables === "accept",
159
157
  disabled: $.isPending,
160
158
  onClick: () => $.mutate("accept"),
161
- children: n("acceptCount", { count: C.length })
159
+ children: n("acceptCount", { count: w.length })
162
160
  })
163
161
  ]
164
162
  })
165
163
  ]
166
- }), c.length === 0 ? /* @__PURE__ */ L("div", {
164
+ }), c.length === 0 ? /* @__PURE__ */ z("div", {
167
165
  className: "min-h-0 flex-1 overflow-y-auto p-6",
168
- children: /* @__PURE__ */ L(T, {
169
- icon: /* @__PURE__ */ L(d, {}),
166
+ children: /* @__PURE__ */ z(E, {
167
+ icon: /* @__PURE__ */ z(u, {}),
170
168
  title: n("empty"),
171
169
  description: n("emptyDescription")
172
170
  })
173
- }) : /* @__PURE__ */ R("div", {
171
+ }) : /* @__PURE__ */ B("div", {
174
172
  className: "flex min-h-0 flex-1",
175
- children: [/* @__PURE__ */ L("ul", {
173
+ children: [/* @__PURE__ */ z("ul", {
176
174
  "aria-label": n("title"),
177
175
  className: W("min-h-0 min-w-0 flex-1 flex-col overflow-y-auto px-2 py-2 md:flex md:max-w-md md:border-r md:border-border", U ? "hidden" : "flex"),
178
- children: c.map((e, t) => /* @__PURE__ */ L(ne, {
176
+ children: c.map((e, t) => /* @__PURE__ */ z(ne, {
179
177
  workspace: r,
180
178
  issue: e,
181
179
  onEligible: _,
182
180
  picked: h.has(e.id) && f.has(e.id),
183
- current: t === D,
184
- unread: S(e.id, ae),
185
- onClick: (e) => oe(e, t)
181
+ current: t === O,
182
+ opened: C(e.id, { data: K }),
183
+ onClick: (e) => ie(e, t)
186
184
  }, e.id))
187
- }), /* @__PURE__ */ L("div", {
185
+ }), /* @__PURE__ */ z("div", {
188
186
  className: W("min-w-0 flex-1 overflow-y-auto md:block", U ? "block" : "hidden"),
189
- children: U ? /* @__PURE__ */ L(re, {
187
+ children: U ? /* @__PURE__ */ z(re, {
190
188
  workspace: r,
191
189
  issue: U,
192
190
  onBack: () => Y(void 0),
193
- onDecided: se
194
- }, U.id) : /* @__PURE__ */ L("div", {
191
+ onDecided: ae
192
+ }, U.id) : /* @__PURE__ */ z("div", {
195
193
  className: "px-6 py-24",
196
- children: /* @__PURE__ */ L(T, {
194
+ children: /* @__PURE__ */ z(E, {
197
195
  title: n("noneSelected"),
198
196
  description: n("shortcuts")
199
197
  })
@@ -207,18 +205,18 @@ function G(e, t) {
207
205
  let n = new Set(e);
208
206
  return n.delete(t), n;
209
207
  }
210
- function ne({ workspace: e, issue: t, onEligible: n, picked: r, current: i, unread: o, onClick: s }) {
211
- let l = F("triage"), { actorName: d, avatarOf: f } = h(e), p = g(e, t.teamId);
212
- j(() => n(t.id, p), [
208
+ function ne({ workspace: e, issue: t, onEligible: n, picked: r, current: i, opened: o, onClick: s }) {
209
+ let c = R("triage"), { actorName: u, avatarOf: d } = h(e), f = g(e, t.teamId);
210
+ P(() => n(t.id, f), [
213
211
  n,
214
212
  t.id,
215
- p
213
+ f
216
214
  ]);
217
- let m = t.creator;
218
- return /* @__PURE__ */ L("li", {
215
+ let p = t.creator;
216
+ return /* @__PURE__ */ z("li", {
219
217
  id: `triage-${t.id}`,
220
218
  "data-picked": r || void 0,
221
- children: /* @__PURE__ */ R(_, {
219
+ children: /* @__PURE__ */ B(_, {
222
220
  to: ".",
223
221
  search: { issue: t.identifier.toLowerCase() },
224
222
  replace: !0,
@@ -226,51 +224,42 @@ function ne({ workspace: e, issue: t, onEligible: n, picked: r, current: i, unre
226
224
  "aria-current": i || void 0,
227
225
  className: W("flex gap-3 px-2 py-2.5 select-none", r ? "bg-human-soft" : W("rounded-md", i ? "bg-muted" : "hover:bg-muted")),
228
226
  children: [
229
- /* @__PURE__ */ L("span", {
230
- className: "flex w-2 shrink-0 justify-center pt-2.5",
231
- children: o && /* @__PURE__ */ L("span", {
232
- role: "img",
233
- "aria-label": l("unseen"),
234
- className: "size-2 rounded-full bg-primary"
235
- })
236
- }),
237
- /* @__PURE__ */ L("span", {
227
+ /* @__PURE__ */ z("span", {
238
228
  className: W("h-fit shrink-0 rounded-full", r && "ring-1 ring-human/40"),
239
- children: /* @__PURE__ */ L(a, {
240
- actor: m,
241
- name: d(m),
242
- src: f(m.kind, m.handle),
243
- badge: /* @__PURE__ */ L(c, {})
229
+ children: /* @__PURE__ */ z(a, {
230
+ actor: p,
231
+ name: u(p),
232
+ src: d(p.kind, p.handle)
244
233
  })
245
234
  }),
246
- /* @__PURE__ */ R("span", {
235
+ /* @__PURE__ */ B("span", {
247
236
  className: "min-w-0 flex-1",
248
- children: [/* @__PURE__ */ R("span", {
237
+ children: [/* @__PURE__ */ B("span", {
249
238
  className: "flex items-baseline gap-2 text-sm",
250
- children: [/* @__PURE__ */ L("span", {
251
- className: W("shrink-0 text-xs tabular-nums", o ? "font-medium text-foreground" : "text-muted-foreground"),
239
+ children: [/* @__PURE__ */ z("span", {
240
+ className: W("shrink-0 text-xs tabular-nums", o ? "text-muted-foreground" : "font-medium text-foreground"),
252
241
  children: t.identifier
253
- }), /* @__PURE__ */ L("span", {
254
- className: W("min-w-0 flex-1 truncate", o ? "font-medium text-foreground" : "text-muted-foreground"),
242
+ }), /* @__PURE__ */ z("span", {
243
+ className: W("min-w-0 flex-1 truncate", o ? "text-muted-foreground" : "font-medium text-foreground"),
255
244
  children: t.title
256
245
  })]
257
- }), /* @__PURE__ */ L("span", {
246
+ }), /* @__PURE__ */ z("span", {
258
247
  className: "mt-0.5 block truncate text-xs text-muted-foreground",
259
- children: l("from", { name: d(m) })
248
+ children: c("from", { name: u(p) })
260
249
  })]
261
250
  }),
262
- /* @__PURE__ */ R("span", {
251
+ /* @__PURE__ */ B("span", {
263
252
  className: "flex shrink-0 flex-col items-end gap-1 pt-0.5",
264
- children: [/* @__PURE__ */ R("span", {
253
+ children: [/* @__PURE__ */ B("span", {
265
254
  className: "flex h-4 items-center",
266
- children: [/* @__PURE__ */ L(u, {
255
+ children: [/* @__PURE__ */ z(l, {
267
256
  category: t.status.category,
268
257
  step: t.status.step
269
- }), /* @__PURE__ */ L("span", {
258
+ }), /* @__PURE__ */ z("span", {
270
259
  className: "sr-only",
271
260
  children: t.status.name
272
261
  })]
273
- }), /* @__PURE__ */ L(E, {
262
+ }), /* @__PURE__ */ z(D, {
274
263
  value: t.createdAt,
275
264
  format: "compact",
276
265
  exact: "medium",
@@ -281,152 +270,123 @@ function ne({ workspace: e, issue: t, onEligible: n, picked: r, current: i, unre
281
270
  })
282
271
  });
283
272
  }
284
- function re({ workspace: i, issue: a, onBack: c, onDecided: d }) {
285
- let m = F("triage"), v = y(), ee = P(), b = V(), x = f(), { data: S } = H(r(i)), { data: T } = B(n(i, a.identifier)), E = T ?? a, { actorName: O, avatarOf: te } = h(i), k = S.find((e) => e.id === E.teamId), A = g(i, E.teamId), j = z({
286
- mutationFn: async (n) => t(await e.POST("/api/v1/workspaces/{workspace}/issues/{identifier}/triage", {
287
- params: { path: {
288
- workspace: i,
289
- identifier: E.identifier
290
- } },
291
- body: { decision: n }
292
- })),
293
- onSuccess: () => {
294
- d(a), b.invalidateQueries({ queryKey: [
295
- "workspace",
296
- i,
297
- "issues"
298
- ] });
299
- }
300
- }), M = E.creator;
301
- return /* @__PURE__ */ R("article", {
273
+ function re({ workspace: e, issue: t, onBack: i, onDecided: a }) {
274
+ let u = R("triage"), m = b(), g = d(), { data: v } = H(r(e)), { data: y } = V(n(e, t.identifier)), x = y ?? t, { actorName: S, avatarOf: C } = h(e), T = v.find((e) => e.id === x.teamId), E = x.creator;
275
+ return /* @__PURE__ */ B("article", {
302
276
  className: "mx-auto w-full max-w-3xl px-4 py-5 md:px-8",
303
277
  children: [
304
- /* @__PURE__ */ L("button", {
278
+ /* @__PURE__ */ z("button", {
305
279
  type: "button",
306
- onClick: c,
280
+ onClick: i,
307
281
  className: "mb-3 text-xs text-muted-foreground hover:text-foreground md:hidden",
308
- children: m("back")
282
+ children: u("back")
309
283
  }),
310
- /* @__PURE__ */ R("p", {
284
+ /* @__PURE__ */ B("p", {
311
285
  className: "flex items-center gap-1.5 text-xs text-muted-foreground",
312
286
  children: [
313
- k && /* @__PURE__ */ L(s, {
314
- icon: k.icon,
315
- name: k.name,
287
+ T && /* @__PURE__ */ z(s, {
288
+ icon: T.icon,
289
+ name: T.name,
316
290
  className: "size-3.5"
317
291
  }),
318
- /* @__PURE__ */ L("span", {
292
+ /* @__PURE__ */ z("span", {
319
293
  className: "tabular-nums",
320
- children: E.identifier
294
+ children: x.identifier
321
295
  }),
322
- /* @__PURE__ */ L("span", {
296
+ /* @__PURE__ */ z("span", {
323
297
  "aria-hidden": "true",
324
298
  children: "·"
325
299
  }),
326
- /* @__PURE__ */ L(C, {
327
- ...p(M.kind),
328
- name: O(M),
329
- src: te(M.kind, M.handle),
300
+ /* @__PURE__ */ z(w, {
301
+ ...p(E.kind),
302
+ name: S(E),
303
+ src: C(E.kind, E.handle),
330
304
  size: "xs"
331
305
  }),
332
- /* @__PURE__ */ L("span", {
306
+ /* @__PURE__ */ z("span", {
333
307
  className: "truncate",
334
- children: m("from", { name: O(M) })
308
+ children: u("from", { name: S(E) })
335
309
  }),
336
- /* @__PURE__ */ L("span", {
310
+ /* @__PURE__ */ z("span", {
337
311
  "aria-hidden": "true",
338
312
  children: "·"
339
313
  }),
340
- /* @__PURE__ */ L("time", {
341
- dateTime: E.createdAt,
342
- title: v.full(E.createdAt),
343
- children: v.relative(E.createdAt)
314
+ /* @__PURE__ */ z(O, {
315
+ content: m.full(x.createdAt),
316
+ children: /* @__PURE__ */ z("time", {
317
+ dateTime: x.createdAt,
318
+ children: m.relative(x.createdAt)
319
+ })
344
320
  })
345
321
  ]
346
322
  }),
347
- /* @__PURE__ */ L("h2", {
323
+ /* @__PURE__ */ z("h2", {
348
324
  className: "mt-1 text-xl font-semibold text-balance",
349
- children: /* @__PURE__ */ L(_, {
325
+ children: /* @__PURE__ */ z(_, {
350
326
  to: "/$workspace/issues/$identifier",
351
327
  params: {
352
- workspace: i,
353
- identifier: E.identifier
328
+ workspace: e,
329
+ identifier: x.identifier
354
330
  },
355
331
  className: "hover:underline",
356
- children: E.title
332
+ children: x.title
357
333
  })
358
334
  }),
359
- /* @__PURE__ */ R("div", {
335
+ /* @__PURE__ */ B("div", {
360
336
  className: "mt-4 flex flex-wrap items-center gap-2",
361
- children: [A && /* @__PURE__ */ R(I, { children: [/* @__PURE__ */ L(w, {
362
- variant: "primary",
363
- size: "sm",
364
- title: m("acceptHelp"),
365
- loading: j.isPending && j.variables === "accept",
366
- disabled: j.isPending,
367
- onClick: () => j.mutate("accept"),
368
- children: m("accept")
369
- }), /* @__PURE__ */ L(w, {
370
- variant: "outline",
371
- size: "sm",
372
- title: m("declineHelp"),
373
- loading: j.isPending && j.variables === "decline",
374
- disabled: j.isPending,
375
- onClick: () => j.mutate("decline"),
376
- children: m("decline")
377
- })] }), /* @__PURE__ */ L(_, {
337
+ children: [/* @__PURE__ */ z(f, {
338
+ workspace: e,
339
+ issue: x,
340
+ onDecided: () => a(t)
341
+ }), /* @__PURE__ */ z(_, {
378
342
  to: "/$workspace/issues/$identifier",
379
343
  params: {
380
- workspace: i,
381
- identifier: E.identifier
344
+ workspace: e,
345
+ identifier: x.identifier
382
346
  },
383
- className: D({
347
+ className: k({
384
348
  size: "sm",
385
349
  variant: "ghost"
386
350
  }),
387
- children: m("openIssue")
351
+ children: u("openIssue")
388
352
  })]
389
353
  }),
390
- j.error && /* @__PURE__ */ L("p", {
391
- className: "mt-2 text-xs text-danger",
392
- children: ee(j.error)
393
- }),
394
- /* @__PURE__ */ L("p", {
354
+ /* @__PURE__ */ z("p", {
395
355
  className: "mt-3 text-xs text-muted-foreground",
396
- children: m("duplicateHint")
356
+ children: u("duplicateHint")
397
357
  }),
398
- /* @__PURE__ */ R("div", {
358
+ /* @__PURE__ */ B("div", {
399
359
  className: "mt-5 flex flex-wrap items-center gap-x-4 gap-y-1 border-y border-border py-2.5 text-xs text-muted-foreground",
400
360
  children: [
401
- /* @__PURE__ */ R("span", {
361
+ /* @__PURE__ */ B("span", {
402
362
  className: "inline-flex items-center gap-1.5",
403
- children: [/* @__PURE__ */ L(u, {
404
- category: E.status.category,
405
- step: E.status.step
406
- }), E.status.name]
363
+ children: [/* @__PURE__ */ z(l, {
364
+ category: x.status.category,
365
+ step: x.status.step
366
+ }), x.status.name]
407
367
  }),
408
- /* @__PURE__ */ R("span", {
368
+ /* @__PURE__ */ B("span", {
409
369
  className: "inline-flex items-center gap-1.5",
410
- children: [/* @__PURE__ */ L(l, { priority: E.priority }), x[E.priority]]
370
+ children: [/* @__PURE__ */ z(c, { priority: x.priority }), g[x.priority]]
411
371
  }),
412
- E.labels.map((e) => /* @__PURE__ */ R("span", {
372
+ x.labels.map((e) => /* @__PURE__ */ B("span", {
413
373
  className: "inline-flex items-center gap-1.5",
414
- children: [/* @__PURE__ */ L("span", {
374
+ children: [/* @__PURE__ */ z("span", {
415
375
  className: "size-2 rounded-full",
416
376
  style: { background: e.color }
417
377
  }), e.name]
418
378
  }, e.id))
419
379
  ]
420
380
  }),
421
- E.body.trim() ? /* @__PURE__ */ L("div", {
381
+ x.body.trim() ? /* @__PURE__ */ z("div", {
422
382
  className: "mt-5 text-sm",
423
- children: /* @__PURE__ */ L(o, {
424
- value: E.body,
383
+ children: /* @__PURE__ */ z(o, {
384
+ value: x.body,
425
385
  editable: !1
426
386
  })
427
- }) : /* @__PURE__ */ L("p", {
387
+ }) : /* @__PURE__ */ z("p", {
428
388
  className: "mt-5 text-sm text-muted-foreground",
429
- children: m("noDescription")
389
+ children: u("noDescription")
430
390
  })
431
391
  ]
432
392
  });