@burdenoff/microfe-support 2026.830.2 → 2026.902.1

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,31 +1,32 @@
1
- import { Button as e, Checkbox as t, Dialog as n, DialogContent as r, DialogDescription as ee, DialogFooter as i, DialogHeader as te, DialogTitle as ne, Label as a, Select as o, SelectContent as s, SelectItem as re, SelectTrigger as c, SelectValue as ie, Textarea as l } from "../ui.js";
2
- import { BulkEnsureInterviewRoundsDocument as u, BulkRandomizeAndSendAssignmentDocument as d, BulkSendRoundMessageDocument as f, NotifyDuplicateApplicantsDocument as p, useGetJobPostingQuery as m } from "../../../generated/global-operations.js";
3
- import { InterviewRoundType as h } from "../../../generated/global-types.js";
4
- import { nativeNotify as ae } from "../../../utils/nativeBridge.js";
5
- import { aggregateCandidateEmailResult as g, aggregateDuplicateNoticeResult as oe, aggregateEnsureRoundResult as _, assertCompleteCandidateEmailChunkResult as v, assertCompleteEnsureRoundChunkResult as y, createEmptyCandidateEmailAggregate as b, createEmptyDuplicateNoticeAggregate as x, createEmptyEnsureRoundAggregate as S, executeSequentialCandidateChunks as se, getBulkOperationNotificationSeverity as ce, getCandidateSelectionCount as le, getSelectedCandidateIds as C, hasCandidateEmailType as w, resolveExactCandidateRounds as T } from "../../utils/bulkCandidateOperations.js";
6
- import { BulkCandidateActionGuidance as E } from "./BulkCandidateActionGuidance.js";
7
- import { BulkOperationProgress as ue, CandidateEmailResultDetails as D, DuplicateNoticeResultDetails as O, EnsureRoundResultDetails as k, StoppedBulkOperationNotice as de } from "./BulkOperationFeedback.js";
8
- import { useEffect as fe, useMemo as pe, useState as A } from "react";
9
- import { AlertCircle as me, Loader2 as j, Mail as M, Send as N, UserPlus as he } from "lucide-react";
10
- import { graphqlFetch as P } from "@burdenoff/fe-libs/shared/graphql/fetch";
11
- import { jsx as F, jsxs as I } from "react/jsx-runtime";
12
- import { useApolloClient as ge } from "@apollo/client/react";
13
- import { print as L } from "graphql";
1
+ import { Button as e, Checkbox as t, Dialog as n, DialogContent as r, DialogDescription as ee, DialogFooter as i, DialogHeader as te, DialogTitle as ne, Label as a, Select as o, SelectContent as s, SelectItem as c, SelectTrigger as l, SelectValue as re, Textarea as u } from "../ui.js";
2
+ import { BulkEnsureInterviewRoundsDocument as d, BulkRandomizeAndSendAssignmentDocument as f, BulkSendCustomEmailDocument as p, BulkSendRoundMessageDocument as m, NotifyDuplicateApplicantsDocument as h, useGetJobPostingQuery as g } from "../../../generated/global-operations.js";
3
+ import { InterviewRoundType as _ } from "../../../generated/global-types.js";
4
+ import { nativeNotify as ie } from "../../../utils/nativeBridge.js";
5
+ import { RichTextEditor as v } from "./RichTextEditor.js";
6
+ import { aggregateBulkCustomEmailResult as y, aggregateCandidateEmailResult as b, aggregateDuplicateNoticeResult as x, aggregateEnsureRoundResult as S, assertCompleteBulkCustomEmailChunkResult as C, assertCompleteCandidateEmailChunkResult as w, assertCompleteEnsureRoundChunkResult as T, createEmptyBulkCustomEmailAggregate as E, createEmptyCandidateEmailAggregate as D, createEmptyDuplicateNoticeAggregate as O, createEmptyEnsureRoundAggregate as k, executeSequentialCandidateChunks as ae, getBulkOperationNotificationSeverity as oe, getCandidateSelectionCount as se, getSelectedCandidateIds as A, hasCandidateEmailType as j, resolveExactCandidateRounds as M } from "../../utils/bulkCandidateOperations.js";
7
+ import { BulkCandidateActionGuidance as N } from "./BulkCandidateActionGuidance.js";
8
+ import { BulkCustomEmailResultDetails as P, BulkOperationProgress as ce, CandidateEmailResultDetails as F, DuplicateNoticeResultDetails as I, EnsureRoundResultDetails as L, StoppedBulkOperationNotice as le } from "./BulkOperationFeedback.js";
9
+ import { useEffect as ue, useMemo as de, useState as R } from "react";
10
+ import { AlertCircle as fe, Loader2 as z, Mail as B, Send as V, UserPlus as pe } from "lucide-react";
11
+ import { graphqlFetch as H } from "@burdenoff/fe-libs/shared/graphql/fetch";
12
+ import { jsx as U, jsxs as W } from "react/jsx-runtime";
13
+ import { useApolloClient as me } from "@apollo/client/react";
14
+ import { print as G } from "graphql";
14
15
  //#region src/support/components/careers/BulkCandidateDialogs.tsx
15
- function R(e) {
16
- return e.isAssignmentRound || e.roundType === h.TakeHome;
16
+ function he(e) {
17
+ return e.isAssignmentRound || e.roundType === _.TakeHome;
17
18
  }
18
- var _e = {
19
+ var ge = {
19
20
  message: "ROUND_MESSAGE",
20
21
  assignment: "ASSIGNMENT"
21
22
  };
22
- function ve(e) {
23
+ function _e(e) {
23
24
  return e instanceof Error ? e.message : "The request failed without an error message.";
24
25
  }
25
- async function z(e, t, n) {
26
- let r = await P({
26
+ async function K(e, t, n) {
27
+ let r = await H({
27
28
  gateway: "global",
28
- query: L(e),
29
+ query: G(e),
29
30
  variables: t,
30
31
  operationName: n,
31
32
  skipAuthRetry: !0
@@ -34,39 +35,39 @@ async function z(e, t, n) {
34
35
  if (!r.data) throw Error(`${n} returned no data.`);
35
36
  return r.data;
36
37
  }
37
- function ye(e, t) {
38
- let n = C(t);
38
+ function ve(e, t) {
39
+ let n = A(t);
39
40
  return e.filter((e) => n.has(e.id));
40
41
  }
41
- function B({ mode: u, open: p, onClose: h, onOpenAddRound: oe, targets: _, selection: y, jobPostingId: x, previewLoading: S, previewError: C }) {
42
- let O = ge(), [k, M] = A(""), [P, L] = A(""), [B, V] = A(!1), [H, U] = A(null), [be, W] = A(b), [G, K] = A(null), [xe, q] = A(!1), [J, Se] = A(!1), { data: Ce, loading: we, error: Te } = m({
42
+ function q({ mode: d, open: p, onClose: h, onOpenAddRound: _, targets: v, selection: y, jobPostingId: x, previewLoading: S, previewError: C }) {
43
+ let T = me(), [E, O] = R(""), [k, A] = R(""), [P, I] = R(!1), [L, B] = R(null), [H, G] = R(D), [q, J] = R(null), [ye, Y] = R(!1), [X, be] = R(!1), { data: xe, loading: Se, error: Ce } = g({
43
44
  variables: { id: x },
44
45
  skip: !p || !x,
45
46
  fetchPolicy: "network-only"
46
47
  });
47
- fe(() => {
48
- p && (M(""), L(""), V(!1), U(null), W(b()), K(null), q(!1), Se(!1));
49
- }, [p, u]);
50
- let Ee = pe(() => ye(_, y), [y, _]), De = le(y), Oe = Ee.length === De, ke = Ce?.jobPosting?.rounds ?? [], Ae = ke.filter((e) => u !== "assignment" || R(e)), Y = ke.find((e) => e.id === k), X = Y ? T(Ee, Y.id) : {
48
+ ue(() => {
49
+ p && (O(""), A(""), I(!1), B(null), G(D()), J(null), Y(!1), be(!1));
50
+ }, [p, d]);
51
+ let we = de(() => ve(v, y), [y, v]), Te = se(y), Ee = we.length === Te, De = xe?.jobPosting?.rounds ?? [], Oe = De.filter((e) => d !== "assignment" || he(e)), ke = De.find((e) => e.id === E), Z = ke ? M(we, ke.id) : {
51
52
  pairs: [],
52
53
  unresolved: []
53
- }, je = X.unresolved.filter((e) => e.reason === "MISSING").length, Me = X.unresolved.filter((e) => e.reason === "AMBIGUOUS").length, Ne = _e[u], Pe = X.pairs.filter(({ round: e }) => w(e, Ne)).length, Z = X.pairs.filter(({ round: e }) => B || !w(e, Ne)).length, Fe = Ee.some((e) => e.jobPostingId !== x), Q = C;
54
- !Q && Te ? Q = "Could not load the posting rounds. Nothing will be sent." : !Q && !S && !Oe ? Q = "Some selected candidate details are unavailable. Refresh the selection before sending." : !Q && Fe ? Q = "Some selected candidates do not belong to the filtered posting." : !Q && k && !we && !Y ? Q = "The selected round is no longer available. Choose another round." : !Q && Me > 0 && (Q = `${Me} selected candidate${Me === 1 ? " has" : "s have"} multiple concrete rounds for this configuration. Nothing will be sent until the data is corrected.`);
54
+ }, Ae = Z.unresolved.filter((e) => e.reason === "MISSING").length, je = Z.unresolved.filter((e) => e.reason === "AMBIGUOUS").length, Me = ge[d], Ne = Z.pairs.filter(({ round: e }) => j(e, Me)).length, Pe = Z.pairs.filter(({ round: e }) => P || !j(e, Me)).length, Fe = we.some((e) => e.jobPostingId !== x), Q = C;
55
+ !Q && Ce ? Q = "Could not load the posting rounds. Nothing will be sent." : !Q && !S && !Ee ? Q = "Some selected candidate details are unavailable. Refresh the selection before sending." : !Q && Fe ? Q = "Some selected candidates do not belong to the filtered posting." : !Q && E && !Se && !ke ? Q = "The selected round is no longer available. Choose another round." : !Q && je > 0 && (Q = `${je} selected candidate${je === 1 ? " has" : "s have"} multiple concrete rounds for this configuration. Nothing will be sent until the data is corrected.`);
55
56
  let Ie = async () => {
56
- if (J || xe || S || we || Q || !Oe || !Y || X.pairs.length === 0 || Z === 0 || u === "message" && !P.trim()) return;
57
- Se(!0), q(!0), K(null), W(b());
58
- let e = await se({
59
- items: X.pairs.map(({ applicationId: e, roundId: t }) => ({
57
+ if (X || ye || S || Se || Q || !Ee || !ke || Z.pairs.length === 0 || Pe === 0 || d === "message" && !k.trim()) return;
58
+ be(!0), Y(!0), J(null), G(D());
59
+ let e = await ae({
60
+ items: Z.pairs.map(({ applicationId: e, roundId: t }) => ({
60
61
  applicationId: e,
61
62
  roundId: t
62
63
  })),
63
- initialAggregate: b(),
64
- onProgress: U,
64
+ initialAggregate: D(),
65
+ onProgress: B,
65
66
  executeChunk: async (e) => {
66
- if (u === "assignment") {
67
- let t = (await z(d, { input: {
67
+ if (d === "assignment") {
68
+ let t = (await K(f, { input: {
68
69
  items: [...e],
69
- force: B
70
+ force: P
70
71
  } }, "BulkRandomizeAndSendAssignment")).bulkRandomizeAndSendAssignment;
71
72
  if (!t) throw Error("The assignment request returned no result.");
72
73
  let n = {
@@ -86,12 +87,12 @@ function B({ mode: u, open: p, onClose: h, onOpenAddRound: oe, targets: _, selec
86
87
  message: e.message
87
88
  }))
88
89
  };
89
- return v(e, n), n;
90
+ return w(e, n), n;
90
91
  }
91
- let t = (await z(f, { input: {
92
+ let t = (await K(m, { input: {
92
93
  items: [...e],
93
- message: P.trim(),
94
- force: B
94
+ message: k.trim(),
95
+ force: P
95
96
  } }, "BulkSendRoundMessage")).bulkSendRoundMessage;
96
97
  if (!t) throw Error("The message request returned no result.");
97
98
  let n = {
@@ -111,80 +112,80 @@ function B({ mode: u, open: p, onClose: h, onOpenAddRound: oe, targets: _, selec
111
112
  message: e.message
112
113
  }))
113
114
  };
114
- return v(e, n), n;
115
+ return w(e, n), n;
115
116
  },
116
- mergeResult: g
117
+ mergeResult: b
117
118
  });
118
- W(e.aggregate), e.error && K({
119
+ G(e.aggregate), e.error && J({
119
120
  knownCompleted: e.processedItems.length,
120
121
  ambiguous: e.ambiguousItems.length,
121
122
  notStarted: e.notStartedItems.length,
122
- message: ve(e.error)
123
- }), ae(ce({
123
+ message: _e(e.error)
124
+ }), ie(oe({
124
125
  succeeded: e.aggregate.succeeded.length,
125
126
  skipped: e.aggregate.skipped.length,
126
127
  failed: e.aggregate.failed.length,
127
128
  ambiguous: !!e.error
128
- })), Se(!1), O.refetchQueries({ include: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }).catch(() => void 0);
129
- }, $ = S || we;
130
- return /* @__PURE__ */ F(n, {
129
+ })), be(!1), T.refetchQueries({ include: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }).catch(() => void 0);
130
+ }, $ = S || Se;
131
+ return /* @__PURE__ */ U(n, {
131
132
  open: p,
132
133
  onOpenChange: (e) => {
133
- !e && !J && h();
134
+ !e && !X && h();
134
135
  },
135
- children: /* @__PURE__ */ I(r, {
136
+ children: /* @__PURE__ */ W(r, {
136
137
  className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
137
138
  children: [
138
- /* @__PURE__ */ I(te, { children: [/* @__PURE__ */ F(ne, { children: u === "assignment" ? "Assign & Email Random Take-Home" : "Send Message" }), /* @__PURE__ */ F(ee, { children: "Choose one configured round for the candidates in the filtered posting." })] }),
139
- /* @__PURE__ */ F(E, {
140
- action: u,
141
- unresolvedCount: je
139
+ /* @__PURE__ */ W(te, { children: [/* @__PURE__ */ U(ne, { children: d === "assignment" ? "Assign & Email Random Take-Home" : "Send Message" }), /* @__PURE__ */ U(ee, { children: "Choose one configured round for the candidates in the filtered posting." })] }),
140
+ /* @__PURE__ */ U(N, {
141
+ action: d,
142
+ unresolvedCount: Ae
142
143
  }),
143
- xe ? /* @__PURE__ */ I("div", {
144
+ ye ? /* @__PURE__ */ W("div", {
144
145
  className: "space-y-4",
145
146
  children: [
146
- H ? /* @__PURE__ */ F(ue, { progress: H }) : null,
147
- /* @__PURE__ */ F(D, { result: be }),
148
- G ? /* @__PURE__ */ F(de, { details: G }) : null,
149
- /* @__PURE__ */ F(i, { children: /* @__PURE__ */ F(e, {
147
+ L ? /* @__PURE__ */ U(ce, { progress: L }) : null,
148
+ /* @__PURE__ */ U(F, { result: H }),
149
+ q ? /* @__PURE__ */ U(le, { details: q }) : null,
150
+ /* @__PURE__ */ U(i, { children: /* @__PURE__ */ U(e, {
150
151
  onClick: h,
151
- disabled: J,
152
+ disabled: X,
152
153
  children: "Done"
153
154
  }) })
154
155
  ]
155
- }) : /* @__PURE__ */ I("div", {
156
+ }) : /* @__PURE__ */ W("div", {
156
157
  className: "space-y-4",
157
158
  children: [
158
- $ ? /* @__PURE__ */ I("div", {
159
+ $ ? /* @__PURE__ */ W("div", {
159
160
  className: "flex items-center gap-2 text-sm text-text-secondary",
160
- children: [/* @__PURE__ */ F(j, {
161
+ children: [/* @__PURE__ */ U(z, {
161
162
  size: 14,
162
163
  className: "animate-spin"
163
164
  }), "Refreshing candidates and configured rounds…"]
164
165
  }) : null,
165
- Q ? /* @__PURE__ */ I("div", {
166
+ Q ? /* @__PURE__ */ W("div", {
166
167
  className: "flex items-start gap-2 text-sm text-status-error-text",
167
168
  role: "alert",
168
- children: [/* @__PURE__ */ F(me, {
169
+ children: [/* @__PURE__ */ U(fe, {
169
170
  size: 14,
170
171
  className: "mt-0.5 shrink-0"
171
- }), /* @__PURE__ */ F("span", { children: Q })]
172
+ }), /* @__PURE__ */ U("span", { children: Q })]
172
173
  }) : null,
173
- /* @__PURE__ */ I("div", {
174
+ /* @__PURE__ */ W("div", {
174
175
  className: "space-y-1.5",
175
176
  children: [
176
- /* @__PURE__ */ F(a, {
177
+ /* @__PURE__ */ U(a, {
177
178
  htmlFor: "bulk-round-config",
178
179
  children: "Target round"
179
180
  }),
180
- /* @__PURE__ */ I(o, {
181
- value: k,
182
- onValueChange: M,
181
+ /* @__PURE__ */ W(o, {
182
+ value: E,
183
+ onValueChange: O,
183
184
  disabled: $ || !!Q,
184
- children: [/* @__PURE__ */ F(c, {
185
+ children: [/* @__PURE__ */ U(l, {
185
186
  id: "bulk-round-config",
186
- children: /* @__PURE__ */ F(ie, { placeholder: "Select a round" })
187
- }), /* @__PURE__ */ F(s, { children: Ae.map((e) => /* @__PURE__ */ I(re, {
187
+ children: /* @__PURE__ */ U(re, { placeholder: "Select a round" })
188
+ }), /* @__PURE__ */ U(s, { children: Oe.map((e) => /* @__PURE__ */ W(c, {
188
189
  value: e.id,
189
190
  children: [
190
191
  "Round ",
@@ -194,77 +195,77 @@ function B({ mode: u, open: p, onClose: h, onOpenAddRound: oe, targets: _, selec
194
195
  ]
195
196
  }, e.id)) })]
196
197
  }),
197
- Ae.length === 0 && !$ && !Q ? /* @__PURE__ */ F("p", {
198
+ Oe.length === 0 && !$ && !Q ? /* @__PURE__ */ U("p", {
198
199
  className: "text-xs text-status-warning-text",
199
- children: u === "assignment" ? "This posting has no configured assignment round." : "This posting has no configured interview rounds."
200
+ children: d === "assignment" ? "This posting has no configured assignment round." : "This posting has no configured interview rounds."
200
201
  }) : null
201
202
  ]
202
203
  }),
203
- u === "message" ? /* @__PURE__ */ I("div", {
204
+ d === "message" ? /* @__PURE__ */ W("div", {
204
205
  className: "space-y-1.5",
205
- children: [/* @__PURE__ */ F(a, {
206
+ children: [/* @__PURE__ */ U(a, {
206
207
  htmlFor: "bulk-message",
207
208
  children: "Free-text message"
208
- }), /* @__PURE__ */ F(l, {
209
+ }), /* @__PURE__ */ U(u, {
209
210
  id: "bulk-message",
210
- value: P,
211
- onChange: (e) => L(e.target.value),
211
+ value: k,
212
+ onChange: (e) => A(e.target.value),
212
213
  placeholder: "Write the message sent to each candidate",
213
214
  rows: 5
214
215
  })]
215
216
  }) : null,
216
- k && !$ && !Q ? /* @__PURE__ */ I("div", {
217
+ E && !$ && !Q ? /* @__PURE__ */ W("div", {
217
218
  className: "space-y-2 rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-xs text-text-secondary",
218
219
  children: [
219
- /* @__PURE__ */ F("p", {
220
+ /* @__PURE__ */ U("p", {
220
221
  className: "font-medium text-text-primary",
221
222
  children: "Preview"
222
223
  }),
223
- /* @__PURE__ */ I("p", { children: [
224
+ /* @__PURE__ */ W("p", { children: [
224
225
  "Will send to ",
225
- /* @__PURE__ */ F("span", {
226
+ /* @__PURE__ */ U("span", {
226
227
  className: "font-semibold",
227
- children: Z
228
+ children: Pe
228
229
  }),
229
230
  " candidate",
230
- Z === 1 ? "" : "s",
231
+ Pe === 1 ? "" : "s",
231
232
  "."
232
233
  ] }),
233
- Pe > 0 ? /* @__PURE__ */ I("p", { children: [
234
- Pe,
234
+ Ne > 0 ? /* @__PURE__ */ W("p", { children: [
235
+ Ne,
235
236
  " already received this email type",
236
237
  " ",
237
- B ? "(force will send again)" : "(the backend will skip them)",
238
+ P ? "(force will send again)" : "(the backend will skip them)",
238
239
  "."
239
240
  ] }) : null,
240
- je > 0 ? /* @__PURE__ */ I(e, {
241
+ Ae > 0 ? /* @__PURE__ */ W(e, {
241
242
  type: "button",
242
243
  size: "sm",
243
244
  variant: "outline",
244
- onClick: oe,
245
- children: [/* @__PURE__ */ F(he, { size: 14 }), "Add Selected to Round"]
245
+ onClick: _,
246
+ children: [/* @__PURE__ */ U(pe, { size: 14 }), "Add Selected to Round"]
246
247
  }) : null,
247
- /* @__PURE__ */ I("label", {
248
+ /* @__PURE__ */ W("label", {
248
249
  className: "flex cursor-pointer items-start gap-2 pt-1",
249
- children: [/* @__PURE__ */ F(t, {
250
- checked: B,
251
- onCheckedChange: (e) => V(e === !0)
252
- }), /* @__PURE__ */ F("span", { children: "Force resend to candidates with a prior email. Force sends are non-idempotent and are never retried automatically." })]
250
+ children: [/* @__PURE__ */ U(t, {
251
+ checked: P,
252
+ onCheckedChange: (e) => I(e === !0)
253
+ }), /* @__PURE__ */ U("span", { children: "Force resend to candidates with a prior email. Force sends are non-idempotent and are never retried automatically." })]
253
254
  })
254
255
  ]
255
256
  }) : null,
256
- /* @__PURE__ */ I(i, { children: [/* @__PURE__ */ F(e, {
257
+ /* @__PURE__ */ W(i, { children: [/* @__PURE__ */ U(e, {
257
258
  variant: "outline",
258
259
  onClick: h,
259
- disabled: J,
260
+ disabled: X,
260
261
  children: "Cancel"
261
- }), /* @__PURE__ */ I(e, {
262
+ }), /* @__PURE__ */ W(e, {
262
263
  onClick: () => void Ie(),
263
- disabled: J || $ || !!Q || !Oe || !k || X.pairs.length === 0 || Z === 0 || u === "message" && !P.trim(),
264
- children: [J ? /* @__PURE__ */ F(j, {
264
+ disabled: X || $ || !!Q || !Ee || !E || Z.pairs.length === 0 || Pe === 0 || d === "message" && !k.trim(),
265
+ children: [X ? /* @__PURE__ */ U(z, {
265
266
  size: 16,
266
267
  className: "mr-2 animate-spin"
267
- }) : /* @__PURE__ */ F(N, { size: 16 }), J ? "Sending…" : "Send"]
268
+ }) : /* @__PURE__ */ U(V, { size: 16 }), X ? "Sending…" : "Send"]
268
269
  })] })
269
270
  ]
270
271
  })
@@ -272,28 +273,28 @@ function B({ mode: u, open: p, onClose: h, onOpenAddRound: oe, targets: _, selec
272
273
  })
273
274
  });
274
275
  }
275
- function V({ open: t, onClose: l, targets: d, selection: f, jobPostingId: p, previewLoading: h, previewError: g }) {
276
- let oe = ge(), [v, b] = A(""), [x, C] = A(null), [w, T] = A(S), [E, D] = A(null), [O, M] = A(!1), [N, P] = A(!1), { data: L, loading: R, error: _e } = m({
277
- variables: { id: p },
278
- skip: !t || !p,
276
+ function J({ open: t, onClose: u, targets: f, selection: p, jobPostingId: m, previewLoading: h, previewError: _ }) {
277
+ let v = me(), [y, b] = R(""), [x, C] = R(null), [w, E] = R(k), [D, O] = R(null), [A, j] = R(!1), [M, N] = R(!1), { data: P, loading: F, error: I } = g({
278
+ variables: { id: m },
279
+ skip: !t || !m,
279
280
  fetchPolicy: "network-only"
280
281
  });
281
- fe(() => {
282
- t && (b(""), C(null), T(S()), D(null), M(!1), P(!1));
282
+ ue(() => {
283
+ t && (b(""), C(null), E(k()), O(null), j(!1), N(!1));
283
284
  }, [t]);
284
- let B = pe(() => ye(d, f), [f, d]), V = le(f), H = B.length === V, U = B.map((e) => e.id), be = B.some((e) => e.jobPostingId !== p), W = L?.jobPosting?.rounds ?? [], G = W.find((e) => e.id === v), K = g;
285
- !K && _e ? K = "Could not load the posting rounds. Nothing will be changed." : !K && !h && !H ? K = "Some selected candidate details are unavailable. Refresh the selection before adding rounds." : !K && be ? K = "Some selected candidates do not belong to the filtered posting." : !K && v && !R && !G && (K = "The selected round is no longer available. Choose another round.");
286
- let xe = async () => {
287
- if (N || O || h || R || K || !H || !G || U.length === 0) return;
288
- P(!0), M(!0), D(null), T(S());
289
- let e = await se({
290
- items: U,
291
- initialAggregate: S(),
285
+ let B = de(() => ve(f, p), [p, f]), V = se(p), H = B.length === V, G = B.map((e) => e.id), he = B.some((e) => e.jobPostingId !== m), ge = P?.jobPosting?.rounds ?? [], q = ge.find((e) => e.id === y), J = _;
286
+ !J && I ? J = "Could not load the posting rounds. Nothing will be changed." : !J && !h && !H ? J = "Some selected candidate details are unavailable. Refresh the selection before adding rounds." : !J && he ? J = "Some selected candidates do not belong to the filtered posting." : !J && y && !F && !q && (J = "The selected round is no longer available. Choose another round.");
287
+ let ye = async () => {
288
+ if (M || A || h || F || J || !H || !q || G.length === 0) return;
289
+ N(!0), j(!0), O(null), E(k());
290
+ let e = await ae({
291
+ items: G,
292
+ initialAggregate: k(),
292
293
  onProgress: C,
293
294
  executeChunk: async (e) => {
294
- let t = (await z(u, { input: {
295
- jobPostingId: p,
296
- roundConfigId: G.id,
295
+ let t = (await K(d, { input: {
296
+ jobPostingId: m,
297
+ roundConfigId: q.id,
297
298
  applicationIds: [...e]
298
299
  } }, "BulkEnsureInterviewRounds")).bulkEnsureInterviewRounds;
299
300
  if (!t) throw Error("The add-to-round request returned no result.");
@@ -312,80 +313,80 @@ function V({ open: t, onClose: l, targets: d, selection: f, jobPostingId: p, pre
312
313
  message: e.message
313
314
  }))
314
315
  };
315
- return y(e, n), n;
316
+ return T(e, n), n;
316
317
  },
317
- mergeResult: _
318
+ mergeResult: S
318
319
  });
319
- T(e.aggregate), e.error && D({
320
+ E(e.aggregate), e.error && O({
320
321
  knownCompleted: e.processedItems.length,
321
322
  ambiguous: e.ambiguousItems.length,
322
323
  notStarted: e.notStartedItems.length,
323
- message: ve(e.error)
324
- }), ae(ce({
324
+ message: _e(e.error)
325
+ }), ie(oe({
325
326
  succeeded: e.aggregate.created.length + e.aggregate.alreadyPresent.length,
326
327
  skipped: 0,
327
328
  failed: e.aggregate.failed.length,
328
329
  ambiguous: !!e.error
329
- })), P(!1), oe.refetchQueries({ include: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }).catch(() => void 0);
330
- }, q = h || R;
331
- return /* @__PURE__ */ F(n, {
330
+ })), N(!1), v.refetchQueries({ include: ["GetJobApplications", "GetJobApplicationInterviewRounds"] }).catch(() => void 0);
331
+ }, Y = h || F;
332
+ return /* @__PURE__ */ U(n, {
332
333
  open: t,
333
334
  onOpenChange: (e) => {
334
- !e && !N && l();
335
+ !e && !M && u();
335
336
  },
336
- children: /* @__PURE__ */ I(r, {
337
+ children: /* @__PURE__ */ W(r, {
337
338
  className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
338
339
  children: [
339
- /* @__PURE__ */ I(te, { children: [/* @__PURE__ */ F(ne, { children: "Add Selected to Round" }), /* @__PURE__ */ F(ee, { children: "Add every selected candidate in this posting to one configured interview round." })] }),
340
- /* @__PURE__ */ F("div", {
340
+ /* @__PURE__ */ W(te, { children: [/* @__PURE__ */ U(ne, { children: "Add Selected to Round" }), /* @__PURE__ */ U(ee, { children: "Add every selected candidate in this posting to one configured interview round." })] }),
341
+ /* @__PURE__ */ U("div", {
341
342
  className: "rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-sm text-text-secondary",
342
343
  children: "Candidates without this concrete round are added with status Scheduled. Existing target rounds are left unchanged, and all prior round history and application status remain unchanged."
343
344
  }),
344
- O ? /* @__PURE__ */ I("div", {
345
+ A ? /* @__PURE__ */ W("div", {
345
346
  className: "space-y-4",
346
347
  children: [
347
- x ? /* @__PURE__ */ F(ue, { progress: x }) : null,
348
- /* @__PURE__ */ F(k, { result: w }),
349
- E ? /* @__PURE__ */ F(de, { details: E }) : null,
350
- /* @__PURE__ */ F(i, { children: /* @__PURE__ */ F(e, {
351
- onClick: l,
352
- disabled: N,
348
+ x ? /* @__PURE__ */ U(ce, { progress: x }) : null,
349
+ /* @__PURE__ */ U(L, { result: w }),
350
+ D ? /* @__PURE__ */ U(le, { details: D }) : null,
351
+ /* @__PURE__ */ U(i, { children: /* @__PURE__ */ U(e, {
352
+ onClick: u,
353
+ disabled: M,
353
354
  children: "Done"
354
355
  }) })
355
356
  ]
356
- }) : /* @__PURE__ */ I("div", {
357
+ }) : /* @__PURE__ */ W("div", {
357
358
  className: "space-y-4",
358
359
  children: [
359
- q ? /* @__PURE__ */ I("div", {
360
+ Y ? /* @__PURE__ */ W("div", {
360
361
  className: "flex items-center gap-2 text-sm text-text-secondary",
361
- children: [/* @__PURE__ */ F(j, {
362
+ children: [/* @__PURE__ */ U(z, {
362
363
  size: 14,
363
364
  className: "animate-spin"
364
365
  }), "Refreshing candidates and configured rounds…"]
365
366
  }) : null,
366
- K ? /* @__PURE__ */ I("div", {
367
+ J ? /* @__PURE__ */ W("div", {
367
368
  className: "flex items-start gap-2 text-sm text-status-error-text",
368
369
  role: "alert",
369
- children: [/* @__PURE__ */ F(me, {
370
+ children: [/* @__PURE__ */ U(fe, {
370
371
  size: 14,
371
372
  className: "mt-0.5 shrink-0"
372
- }), /* @__PURE__ */ F("span", { children: K })]
373
+ }), /* @__PURE__ */ U("span", { children: J })]
373
374
  }) : null,
374
- /* @__PURE__ */ I("div", {
375
+ /* @__PURE__ */ W("div", {
375
376
  className: "space-y-1.5",
376
377
  children: [
377
- /* @__PURE__ */ F(a, {
378
+ /* @__PURE__ */ U(a, {
378
379
  htmlFor: "ensure-round-config",
379
380
  children: "Interview round"
380
381
  }),
381
- /* @__PURE__ */ I(o, {
382
- value: v,
382
+ /* @__PURE__ */ W(o, {
383
+ value: y,
383
384
  onValueChange: b,
384
- disabled: q || !!K,
385
- children: [/* @__PURE__ */ F(c, {
385
+ disabled: Y || !!J,
386
+ children: [/* @__PURE__ */ U(l, {
386
387
  id: "ensure-round-config",
387
- children: /* @__PURE__ */ F(ie, { placeholder: "Select a round" })
388
- }), /* @__PURE__ */ F(s, { children: W.map((e) => /* @__PURE__ */ I(re, {
388
+ children: /* @__PURE__ */ U(re, { placeholder: "Select a round" })
389
+ }), /* @__PURE__ */ U(s, { children: ge.map((e) => /* @__PURE__ */ W(c, {
389
390
  value: e.id,
390
391
  children: [
391
392
  "Round ",
@@ -395,13 +396,13 @@ function V({ open: t, onClose: l, targets: d, selection: f, jobPostingId: p, pre
395
396
  ]
396
397
  }, e.id)) })]
397
398
  }),
398
- W.length === 0 && !q && !K ? /* @__PURE__ */ F("p", {
399
+ ge.length === 0 && !Y && !J ? /* @__PURE__ */ U("p", {
399
400
  className: "text-xs text-status-warning-text",
400
401
  children: "This posting has no configured interview rounds."
401
402
  }) : null
402
403
  ]
403
404
  }),
404
- /* @__PURE__ */ I("p", {
405
+ /* @__PURE__ */ W("p", {
405
406
  className: "text-xs text-text-secondary",
406
407
  children: [
407
408
  V,
@@ -411,18 +412,18 @@ function V({ open: t, onClose: l, targets: d, selection: f, jobPostingId: p, pre
411
412
  "will be checked. Existing target rounds are reported as already present."
412
413
  ]
413
414
  }),
414
- /* @__PURE__ */ I(i, { children: [/* @__PURE__ */ F(e, {
415
+ /* @__PURE__ */ W(i, { children: [/* @__PURE__ */ U(e, {
415
416
  variant: "outline",
416
- onClick: l,
417
- disabled: N,
417
+ onClick: u,
418
+ disabled: M,
418
419
  children: "Cancel"
419
- }), /* @__PURE__ */ I(e, {
420
- onClick: () => void xe(),
421
- disabled: N || q || !!K || !H || !v || U.length === 0,
422
- children: [N ? /* @__PURE__ */ F(j, {
420
+ }), /* @__PURE__ */ W(e, {
421
+ onClick: () => void ye(),
422
+ disabled: M || Y || !!J || !H || !y || G.length === 0,
423
+ children: [M ? /* @__PURE__ */ U(z, {
423
424
  size: 16,
424
425
  className: "mr-2 animate-spin"
425
- }) : /* @__PURE__ */ F(he, { size: 16 }), N ? "Adding…" : "Add Selected to Round"]
426
+ }) : /* @__PURE__ */ U(pe, { size: 16 }), M ? "Adding…" : "Add Selected to Round"]
426
427
  })] })
427
428
  ]
428
429
  })
@@ -430,22 +431,22 @@ function V({ open: t, onClose: l, targets: d, selection: f, jobPostingId: p, pre
430
431
  })
431
432
  });
432
433
  }
433
- function H({ open: t, onClose: a, targets: o, selection: s, jobPostingId: re, previewLoading: c, previewError: ie }) {
434
- let l = ge(), [u, d] = A(null), [f, m] = A(x), [h, g] = A(null), [_, v] = A(!1), [y, b] = A(!1);
435
- fe(() => {
436
- t && (d(null), m(x()), g(null), v(!1), b(!1));
434
+ function ye({ open: t, onClose: a, targets: o, selection: s, jobPostingId: c, previewLoading: l, previewError: re }) {
435
+ let u = me(), [d, f] = R(null), [p, m] = R(O), [g, _] = R(null), [v, y] = R(!1), [b, S] = R(!1);
436
+ ue(() => {
437
+ t && (f(null), m(O()), _(null), y(!1), S(!1));
437
438
  }, [t]);
438
- let S = pe(() => ye(o, s), [s, o]), C = le(s), w = S.length === C, T = S.map((e) => e.id), E = S.some((e) => e.jobPostingId !== re), D = ie;
439
- !D && !c && !w ? D = "Some selected candidate details are unavailable. Refresh the selection before notifying." : !D && E && (D = "Some selected candidates do not belong to the filtered posting.");
440
- let k = async () => {
441
- if (y || _ || c || D || !w || T.length === 0) return;
442
- b(!0), v(!0), g(null), m(x());
443
- let e = await se({
444
- items: T,
445
- initialAggregate: x(),
446
- onProgress: d,
439
+ let C = de(() => ve(o, s), [s, o]), w = se(s), T = C.length === w, E = C.map((e) => e.id), D = C.some((e) => e.jobPostingId !== c), k = re;
440
+ !k && !l && !T ? k = "Some selected candidate details are unavailable. Refresh the selection before notifying." : !k && D && (k = "Some selected candidates do not belong to the filtered posting.");
441
+ let A = async () => {
442
+ if (b || v || l || k || !T || E.length === 0) return;
443
+ S(!0), y(!0), _(null), m(O());
444
+ let e = await ae({
445
+ items: E,
446
+ initialAggregate: O(),
447
+ onProgress: f,
447
448
  executeChunk: async (e) => {
448
- let t = (await z(p, { input: { applicationIds: [...e] } }, "NotifyDuplicateApplicants")).notifyDuplicateApplicants;
449
+ let t = (await K(h, { input: { applicationIds: [...e] } }, "NotifyDuplicateApplicants")).notifyDuplicateApplicants;
449
450
  if (!t) throw Error("The duplicate-notice request returned no result.");
450
451
  return {
451
452
  succeeded: t.succeeded.map((e) => ({ email: e.email })),
@@ -460,85 +461,85 @@ function H({ open: t, onClose: a, targets: o, selection: s, jobPostingId: re, pr
460
461
  }))
461
462
  };
462
463
  },
463
- mergeResult: oe
464
+ mergeResult: x
464
465
  });
465
- m(e.aggregate), e.error && g({
466
+ m(e.aggregate), e.error && _({
466
467
  knownCompleted: e.processedItems.length,
467
468
  ambiguous: e.ambiguousItems.length,
468
469
  notStarted: e.notStartedItems.length,
469
- message: ve(e.error)
470
- }), ae(ce({
470
+ message: _e(e.error)
471
+ }), ie(oe({
471
472
  succeeded: e.aggregate.succeeded.length,
472
473
  skipped: e.aggregate.skipped.length,
473
474
  failed: e.aggregate.failed.length,
474
475
  ambiguous: !!e.error
475
- })), b(!1), l.refetchQueries({ include: ["GetJobApplications"] }).catch(() => void 0);
476
+ })), S(!1), u.refetchQueries({ include: ["GetJobApplications"] }).catch(() => void 0);
476
477
  };
477
- return /* @__PURE__ */ F(n, {
478
+ return /* @__PURE__ */ U(n, {
478
479
  open: t,
479
480
  onOpenChange: (e) => {
480
- !e && !y && a();
481
+ !e && !b && a();
481
482
  },
482
- children: /* @__PURE__ */ I(r, {
483
+ children: /* @__PURE__ */ W(r, {
483
484
  className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
484
485
  children: [
485
- /* @__PURE__ */ I(te, { children: [/* @__PURE__ */ F(ne, { children: "Notify Duplicate Applicants" }), /* @__PURE__ */ F(ee, { children: "Let candidates with more than one application know they only need to complete one take-home assignment." })] }),
486
- /* @__PURE__ */ F("div", {
486
+ /* @__PURE__ */ W(te, { children: [/* @__PURE__ */ U(ne, { children: "Notify Duplicate Applicants" }), /* @__PURE__ */ U(ee, { children: "Let candidates with more than one application know they only need to complete one take-home assignment." })] }),
487
+ /* @__PURE__ */ U("div", {
487
488
  className: "rounded-md border border-border-seam bg-bg-sunken/30 p-3 text-sm text-text-secondary",
488
489
  children: "Selected applications are grouped by email address — exactly one notice goes out per unique candidate, even if you select several of their duplicate applications. An email that only appears once among your selection is skipped (it isn't a duplicate), and an email already notified before is skipped automatically."
489
490
  }),
490
- _ ? /* @__PURE__ */ I("div", {
491
+ v ? /* @__PURE__ */ W("div", {
491
492
  className: "space-y-4",
492
493
  children: [
493
- u ? /* @__PURE__ */ F(ue, { progress: u }) : null,
494
- /* @__PURE__ */ F(O, { result: f }),
495
- h ? /* @__PURE__ */ F(de, { details: h }) : null,
496
- /* @__PURE__ */ F(i, { children: /* @__PURE__ */ F(e, {
494
+ d ? /* @__PURE__ */ U(ce, { progress: d }) : null,
495
+ /* @__PURE__ */ U(I, { result: p }),
496
+ g ? /* @__PURE__ */ U(le, { details: g }) : null,
497
+ /* @__PURE__ */ U(i, { children: /* @__PURE__ */ U(e, {
497
498
  onClick: a,
498
- disabled: y,
499
+ disabled: b,
499
500
  children: "Done"
500
501
  }) })
501
502
  ]
502
- }) : /* @__PURE__ */ I("div", {
503
+ }) : /* @__PURE__ */ W("div", {
503
504
  className: "space-y-4",
504
505
  children: [
505
- c ? /* @__PURE__ */ I("div", {
506
+ l ? /* @__PURE__ */ W("div", {
506
507
  className: "flex items-center gap-2 text-sm text-text-secondary",
507
- children: [/* @__PURE__ */ F(j, {
508
+ children: [/* @__PURE__ */ U(z, {
508
509
  size: 14,
509
510
  className: "animate-spin"
510
511
  }), "Refreshing candidates…"]
511
512
  }) : null,
512
- D ? /* @__PURE__ */ I("div", {
513
+ k ? /* @__PURE__ */ W("div", {
513
514
  className: "flex items-start gap-2 text-sm text-status-error-text",
514
515
  role: "alert",
515
- children: [/* @__PURE__ */ F(me, {
516
+ children: [/* @__PURE__ */ U(fe, {
516
517
  size: 14,
517
518
  className: "mt-0.5 shrink-0"
518
- }), /* @__PURE__ */ F("span", { children: D })]
519
+ }), /* @__PURE__ */ U("span", { children: k })]
519
520
  }) : null,
520
- /* @__PURE__ */ I("p", {
521
+ /* @__PURE__ */ W("p", {
521
522
  className: "text-xs text-text-secondary",
522
523
  children: [
523
- C,
524
+ w,
524
525
  " selected application",
525
- C === 1 ? "" : "s",
526
+ w === 1 ? "" : "s",
526
527
  " ",
527
528
  "will be checked and grouped by email."
528
529
  ]
529
530
  }),
530
- /* @__PURE__ */ I(i, { children: [/* @__PURE__ */ F(e, {
531
+ /* @__PURE__ */ W(i, { children: [/* @__PURE__ */ U(e, {
531
532
  variant: "outline",
532
533
  onClick: a,
533
- disabled: y,
534
+ disabled: b,
534
535
  children: "Cancel"
535
- }), /* @__PURE__ */ I(e, {
536
- onClick: () => void k(),
537
- disabled: y || c || !!D || !w || T.length === 0,
538
- children: [y ? /* @__PURE__ */ F(j, {
536
+ }), /* @__PURE__ */ W(e, {
537
+ onClick: () => void A(),
538
+ disabled: b || l || !!k || !T || E.length === 0,
539
+ children: [b ? /* @__PURE__ */ U(z, {
539
540
  size: 16,
540
541
  className: "mr-2 animate-spin"
541
- }) : /* @__PURE__ */ F(M, { size: 16 }), y ? "Notifying…" : "Notify Duplicate Applicants"]
542
+ }) : /* @__PURE__ */ U(B, { size: 16 }), b ? "Notifying…" : "Notify Duplicate Applicants"]
542
543
  })] })
543
544
  ]
544
545
  })
@@ -546,7 +547,143 @@ function H({ open: t, onClose: a, targets: o, selection: s, jobPostingId: re, pr
546
547
  })
547
548
  });
548
549
  }
550
+ function Y({ open: t, onClose: o, targets: s, selection: c, previewLoading: l, previewError: re }) {
551
+ let u = me(), [d, f] = R(""), [m, h] = R(""), [g, _] = R(null), [b, x] = R(E), [S, w] = R(null), [T, D] = R(!1), [O, k] = R(!1);
552
+ ue(() => {
553
+ t && (f(""), h(""), _(null), x(E()), w(null), D(!1), k(!1));
554
+ }, [t]);
555
+ let A = de(() => ve(s, c), [c, s]), j = se(c), M = A.length === j, N = A.map((e) => e.id), F = d.trim().length > 0, I = m.trim().length > 0, L = re;
556
+ !L && !l && !M && (L = "Some selected candidate details are unavailable. Refresh the selection before sending.");
557
+ let V = !O && !T && !l && !L && M && N.length > 0 && F && I, pe = async () => {
558
+ if (!V) return;
559
+ k(!0), D(!0), w(null), x(E());
560
+ let e = await ae({
561
+ items: N,
562
+ initialAggregate: E(),
563
+ onProgress: _,
564
+ executeChunk: async (e) => {
565
+ let t = (await K(p, { input: {
566
+ applicationIds: [...e],
567
+ subject: d.trim(),
568
+ message: m
569
+ } }, "BulkSendCustomEmail")).bulkSendCustomEmail;
570
+ if (!t) throw Error("The bulk email request returned no result.");
571
+ let n = {
572
+ succeeded: t.succeeded.map((e) => ({
573
+ applicationId: e.id,
574
+ email: e.email
575
+ })),
576
+ failed: t.failed.map((e) => ({
577
+ applicationId: e.applicationId,
578
+ message: e.message
579
+ }))
580
+ };
581
+ return C([...e], n), n;
582
+ },
583
+ mergeResult: y
584
+ });
585
+ x(e.aggregate), e.error && w({
586
+ knownCompleted: e.processedItems.length,
587
+ ambiguous: e.ambiguousItems.length,
588
+ notStarted: e.notStartedItems.length,
589
+ message: _e(e.error)
590
+ }), ie(oe({
591
+ succeeded: e.aggregate.succeeded.length,
592
+ skipped: 0,
593
+ failed: e.aggregate.failed.length,
594
+ ambiguous: !!e.error
595
+ })), k(!1), u.refetchQueries({ include: ["GetJobApplications"] }).catch(() => void 0);
596
+ };
597
+ return /* @__PURE__ */ U(n, {
598
+ open: t,
599
+ onOpenChange: (e) => {
600
+ !e && !O && o();
601
+ },
602
+ children: /* @__PURE__ */ W(r, {
603
+ className: "sm:max-w-xl max-h-[90vh] overflow-y-auto",
604
+ children: [/* @__PURE__ */ W(te, { children: [/* @__PURE__ */ U(ne, { children: "Send Custom Email" }), /* @__PURE__ */ U(ee, { children: "Send the same branded email — your own subject and message — to every selected candidate, regardless of their stage or round. Useful for progress updates or a closing note to candidates who won't move forward." })] }), T ? /* @__PURE__ */ W("div", {
605
+ className: "space-y-4",
606
+ children: [
607
+ g ? /* @__PURE__ */ U(ce, { progress: g }) : null,
608
+ /* @__PURE__ */ U(P, { result: b }),
609
+ S ? /* @__PURE__ */ U(le, { details: S }) : null,
610
+ /* @__PURE__ */ U(i, { children: /* @__PURE__ */ U(e, {
611
+ onClick: o,
612
+ disabled: O,
613
+ children: "Done"
614
+ }) })
615
+ ]
616
+ }) : /* @__PURE__ */ W("div", {
617
+ className: "space-y-4",
618
+ children: [
619
+ l ? /* @__PURE__ */ W("div", {
620
+ className: "flex items-center gap-2 text-sm text-text-secondary",
621
+ children: [/* @__PURE__ */ U(z, {
622
+ size: 14,
623
+ className: "animate-spin"
624
+ }), "Refreshing candidates…"]
625
+ }) : null,
626
+ L ? /* @__PURE__ */ W("div", {
627
+ className: "flex items-start gap-2 text-sm text-status-error-text",
628
+ role: "alert",
629
+ children: [/* @__PURE__ */ U(fe, {
630
+ size: 14,
631
+ className: "mt-0.5 shrink-0"
632
+ }), /* @__PURE__ */ U("span", { children: L })]
633
+ }) : null,
634
+ /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U(a, {
635
+ htmlFor: "bulk-custom-email-subject",
636
+ children: "Subject"
637
+ }), /* @__PURE__ */ U("input", {
638
+ id: "bulk-custom-email-subject",
639
+ type: "text",
640
+ value: d,
641
+ onChange: (e) => f(e.target.value),
642
+ placeholder: "e.g. An update on your application",
643
+ className: "mt-1.5 w-full rounded-lg border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary/30"
644
+ })] }),
645
+ /* @__PURE__ */ W("div", { children: [/* @__PURE__ */ U(a, {
646
+ htmlFor: "bulk-custom-email-message",
647
+ children: "Message"
648
+ }), /* @__PURE__ */ U("div", {
649
+ className: "mt-1.5",
650
+ children: /* @__PURE__ */ U(v, {
651
+ id: "bulk-custom-email-message",
652
+ value: m,
653
+ onChange: h,
654
+ placeholder: "Type your message… This will be sent as a branded email to every selected candidate.",
655
+ "aria-required": !0
656
+ })
657
+ })] }),
658
+ /* @__PURE__ */ W("p", {
659
+ className: "text-xs text-text-secondary",
660
+ children: [
661
+ j,
662
+ " selected candidate",
663
+ j === 1 ? "" : "s",
664
+ " ",
665
+ "will each receive their own copy of this email."
666
+ ]
667
+ }),
668
+ /* @__PURE__ */ W(i, { children: [/* @__PURE__ */ U(e, {
669
+ variant: "outline",
670
+ onClick: o,
671
+ disabled: O,
672
+ children: "Cancel"
673
+ }), /* @__PURE__ */ W(e, {
674
+ onClick: () => void pe(),
675
+ disabled: !V,
676
+ children: [O ? /* @__PURE__ */ U(z, {
677
+ size: 16,
678
+ className: "mr-2 animate-spin"
679
+ }) : /* @__PURE__ */ U(B, { size: 16 }), O ? "Sending…" : "Send Email"]
680
+ })] })
681
+ ]
682
+ })]
683
+ })
684
+ });
685
+ }
549
686
  //#endregion
550
- export { V as AddSelectedToRoundDialog, B as BulkCandidateSendDialog, H as NotifyDuplicateApplicantsDialog, R as isAssignmentRoundConfig };
687
+ export { J as AddSelectedToRoundDialog, q as BulkCandidateSendDialog, Y as BulkCustomEmailDialog, ye as NotifyDuplicateApplicantsDialog, he as isAssignmentRoundConfig };
551
688
 
552
689
  //# sourceMappingURL=BulkCandidateDialogs.js.map