@burdenoff/microfe-bigconsole 2026.711.2 → 2026.712.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,186 +1,194 @@
1
- import e from "../../hooks/useImportDataSink.js";
1
+ import e from "../../hooks/useBigConsoleAnalytics.js";
2
+ import t from "../../hooks/useImportDataSink.js";
2
3
  import "../../hooks/index.js";
3
- import { memo as t, useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
4
- import { ArrowLeft as o, Check as s, FileJson as c, Info as l, RefreshCw as u, Upload as d, XCircle as f } from "lucide-react";
5
- import { Badge as p, Button as m, Card as h, CardContent as g, Dialog as _, DialogContent as v, DialogDescription as y, DialogFooter as b, DialogHeader as x, DialogTitle as S, Input as C, Label as w, Spinner as T } from "@burdenoff/fe-libs/ui";
6
- import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
4
+ import { memo as n, useCallback as r, useEffect as i, useRef as a, useState as o } from "react";
5
+ import { ArrowLeft as s, Check as c, FileJson as l, Info as u, RefreshCw as d, Upload as f, XCircle as p } from "lucide-react";
6
+ import { Badge as m, Button as h, Card as g, CardContent as _, Dialog as v, DialogContent as y, DialogDescription as b, DialogFooter as ee, DialogHeader as te, DialogTitle as x, Input as S, Label as C, Spinner as w } from "@burdenoff/fe-libs/ui";
7
+ import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
7
8
  //#region src/bigconsole/components/datasink/ImportDataSinkDialog.tsx
8
- var k = t(function({ isOpen: t, onClose: k, onSuccess: A }) {
9
- let [j, M] = a("select"), [, N] = a(null), [P, F] = a(null), [I, L] = a(""), [R, z] = a(""), B = i(null), { loading: V, error: H, validationResult: U, importResult: W, validateImport: G, importDataSink: K, extractDataSinkId: q, clearState: J } = e();
10
- r(() => {
11
- t && (M("select"), N(null), F(null), L(""), z(""), J());
12
- }, [t, J]);
13
- let Y = n(async (e) => {
9
+ var O = n(function({ isOpen: n, onClose: O, onSuccess: k }) {
10
+ let [A, j] = o("select"), [, M] = o(null), [N, P] = o(null), [F, I] = o(""), [L, R] = o(""), z = a(null), { loading: B, error: V, validationResult: H, importResult: U, validateImport: W, importDataSink: G, extractDataSinkId: K, clearState: q } = t(), J = e();
11
+ i(() => {
12
+ n && (j("select"), M(null), P(null), I(""), R(""), q());
13
+ }, [n, q]);
14
+ let Y = r(async (e) => {
14
15
  let t = e.target.files?.[0];
15
16
  if (!t) return;
16
17
  if (!t.name.endsWith(".json")) {
17
18
  alert("Please select a JSON file");
18
19
  return;
19
20
  }
20
- N(t);
21
+ M(t);
21
22
  let n = new FileReader();
22
23
  n.onload = async (e) => {
23
24
  let t = e.target?.result;
24
- F(t);
25
- let n = G(t);
26
- n.isValid && n.dataSinkInfo ? (M("preview"), L(n.dataSinkInfo.name || ""), z(n.dataSinkInfo.key || "")) : M("preview");
25
+ P(t);
26
+ let n = W(t);
27
+ n.isValid && n.dataSinkInfo ? (j("preview"), I(n.dataSinkInfo.name || ""), R(n.dataSinkInfo.key || "")) : j("preview");
27
28
  }, n.onerror = () => {
28
29
  alert("Failed to read file");
29
30
  }, n.readAsText(t);
30
- }, [G]), X = n((e) => {
31
+ }, [W]), X = r((e) => {
31
32
  e.preventDefault();
32
33
  let t = e.dataTransfer.files?.[0];
33
34
  if (t) {
34
35
  let e = new DataTransfer();
35
- e.items.add(t), B.current && (B.current.files = e.files, B.current.dispatchEvent(new Event("change", { bubbles: !0 })));
36
+ e.items.add(t), z.current && (z.current.files = e.files, z.current.dispatchEvent(new Event("change", { bubbles: !0 })));
36
37
  }
37
- }, []), Z = n(async () => {
38
- if (!P) return;
39
- M("importing");
40
- let e = await K(P, {
41
- name: I.trim() || void 0,
42
- key: R.trim() || void 0
43
- });
44
- e?.success && e.dataSink ? (M("complete"), A?.(e.dataSink.id, e.dataSink.name, e.originalUpdated ?? !1)) : M("preview");
38
+ }, []), Z = r(async () => {
39
+ if (!N) return;
40
+ j("importing");
41
+ let e = {
42
+ name: F.trim() || void 0,
43
+ key: L.trim() || void 0
44
+ };
45
+ J("bigconsole.data_sink.import_clicked", { source: "import" });
46
+ let t = await G(N, e);
47
+ t?.success && t.dataSink ? (j("complete"), J("bigconsole.data_sink.imported", {
48
+ dataSinkId: t.dataSink.id,
49
+ source: "import",
50
+ originalUpdated: t.originalUpdated ?? !1
51
+ }), k?.(t.dataSink.id, t.dataSink.name, t.originalUpdated ?? !1)) : j("preview");
45
52
  }, [
46
- P,
47
- I,
48
- R,
49
- K,
50
- A
51
- ]), Q = !V && j !== "importing", $ = P ? q(P) : null;
52
- return /* @__PURE__ */ D(_, {
53
- open: t,
54
- onOpenChange: (e) => !e && Q && k(),
55
- children: /* @__PURE__ */ O(v, {
53
+ J,
54
+ N,
55
+ G,
56
+ L,
57
+ F,
58
+ k
59
+ ]), Q = !B && A !== "importing", $ = N ? K(N) : null;
60
+ return /* @__PURE__ */ E(v, {
61
+ open: n,
62
+ onOpenChange: (e) => !e && Q && O(),
63
+ children: /* @__PURE__ */ D(y, {
56
64
  className: "sm:max-w-lg max-h-[85vh] flex flex-col",
57
65
  children: [
58
- /* @__PURE__ */ O(x, { children: [/* @__PURE__ */ O("div", {
66
+ /* @__PURE__ */ D(te, { children: [/* @__PURE__ */ D("div", {
59
67
  className: "flex items-center gap-3",
60
- children: [/* @__PURE__ */ D("div", {
68
+ children: [/* @__PURE__ */ E("div", {
61
69
  className: "flex size-10 items-center justify-center rounded-lg bg-action-primary-bg/10",
62
- children: /* @__PURE__ */ D(d, { className: "size-5 text-primary" })
63
- }), /* @__PURE__ */ D(S, { children: "Import DataSink" })]
64
- }), /* @__PURE__ */ D(y, { children: "Upload a DataSink export file to restore it into this workspace." })] }),
65
- /* @__PURE__ */ O("div", {
70
+ children: /* @__PURE__ */ E(f, { className: "size-5 text-primary" })
71
+ }), /* @__PURE__ */ E(x, { children: "Import DataSink" })]
72
+ }), /* @__PURE__ */ E(b, { children: "Upload a DataSink export file to restore it into this workspace." })] }),
73
+ /* @__PURE__ */ D("div", {
66
74
  className: "flex-1 overflow-y-auto py-4 space-y-4",
67
75
  children: [
68
- j === "select" && /* @__PURE__ */ O("div", {
76
+ A === "select" && /* @__PURE__ */ D("div", {
69
77
  onDragOver: (e) => e.preventDefault(),
70
78
  onDrop: X,
71
79
  className: "border-2 border-dashed rounded-lg p-8 text-center hover:border-primary transition-colors",
72
80
  children: [
73
- /* @__PURE__ */ D(c, { className: "size-12 mx-auto text-text-secondary mb-4" }),
74
- /* @__PURE__ */ D("p", {
81
+ /* @__PURE__ */ E(l, { className: "size-12 mx-auto text-text-secondary mb-4" }),
82
+ /* @__PURE__ */ E("p", {
75
83
  className: "text-sm mb-2",
76
84
  children: "Drag and drop a DataSink export file here"
77
85
  }),
78
- /* @__PURE__ */ D("p", {
86
+ /* @__PURE__ */ E("p", {
79
87
  className: "text-xs text-text-secondary mb-4",
80
88
  children: "or"
81
89
  }),
82
- /* @__PURE__ */ D("input", {
83
- ref: B,
90
+ /* @__PURE__ */ E("input", {
91
+ ref: z,
84
92
  type: "file",
85
93
  accept: ".json",
86
94
  onChange: Y,
87
95
  className: "hidden"
88
96
  }),
89
- /* @__PURE__ */ D(m, {
90
- onClick: () => B.current?.click(),
91
- disabled: V,
97
+ /* @__PURE__ */ E(h, {
98
+ onClick: () => z.current?.click(),
99
+ disabled: B,
92
100
  children: "Browse Files"
93
101
  }),
94
- /* @__PURE__ */ D("p", {
102
+ /* @__PURE__ */ E("p", {
95
103
  className: "text-xs text-text-secondary mt-4",
96
104
  children: "Only .json files exported from BigConsole are supported"
97
105
  })
98
106
  ]
99
107
  }),
100
- (j === "preview" || j === "importing") && U && /* @__PURE__ */ O(E, { children: [
101
- U.dataSinkInfo && /* @__PURE__ */ D(h, { children: /* @__PURE__ */ O(g, {
108
+ (A === "preview" || A === "importing") && H && /* @__PURE__ */ D(T, { children: [
109
+ H.dataSinkInfo && /* @__PURE__ */ E(g, { children: /* @__PURE__ */ D(_, {
102
110
  className: "p-4 space-y-2",
103
111
  children: [
104
- /* @__PURE__ */ O("div", {
112
+ /* @__PURE__ */ D("div", {
105
113
  className: "flex items-center justify-between",
106
- children: [/* @__PURE__ */ D("span", {
114
+ children: [/* @__PURE__ */ E("span", {
107
115
  className: "text-sm text-text-secondary",
108
116
  children: "Name"
109
- }), /* @__PURE__ */ D("span", {
117
+ }), /* @__PURE__ */ E("span", {
110
118
  className: "text-sm font-medium",
111
- children: U.dataSinkInfo.name || "Unnamed"
119
+ children: H.dataSinkInfo.name || "Unnamed"
112
120
  })]
113
121
  }),
114
- /* @__PURE__ */ O("div", {
122
+ /* @__PURE__ */ D("div", {
115
123
  className: "flex items-center justify-between",
116
- children: [/* @__PURE__ */ D("span", {
124
+ children: [/* @__PURE__ */ E("span", {
117
125
  className: "text-sm text-text-secondary",
118
126
  children: "Key"
119
- }), /* @__PURE__ */ D("span", {
127
+ }), /* @__PURE__ */ E("span", {
120
128
  className: "text-xs font-mono",
121
- children: U.dataSinkInfo.key
129
+ children: H.dataSinkInfo.key
122
130
  })]
123
131
  }),
124
- /* @__PURE__ */ O("div", {
132
+ /* @__PURE__ */ D("div", {
125
133
  className: "flex items-center justify-between",
126
- children: [/* @__PURE__ */ D("span", {
134
+ children: [/* @__PURE__ */ E("span", {
127
135
  className: "text-sm text-text-secondary",
128
136
  children: "Status"
129
- }), /* @__PURE__ */ D(p, {
137
+ }), /* @__PURE__ */ E(m, {
130
138
  variant: "secondary",
131
- children: U.dataSinkInfo.status
139
+ children: H.dataSinkInfo.status
132
140
  })]
133
141
  }),
134
- /* @__PURE__ */ O("div", {
142
+ /* @__PURE__ */ D("div", {
135
143
  className: "flex items-center justify-between",
136
- children: [/* @__PURE__ */ D("span", {
144
+ children: [/* @__PURE__ */ E("span", {
137
145
  className: "text-sm text-text-secondary",
138
146
  children: "Setup State"
139
- }), /* @__PURE__ */ D(p, {
147
+ }), /* @__PURE__ */ E(m, {
140
148
  variant: "outline",
141
- children: U.dataSinkInfo.setupState
149
+ children: H.dataSinkInfo.setupState
142
150
  })]
143
151
  }),
144
- U.dataSinkInfo.exportedFrom && /* @__PURE__ */ O("div", {
152
+ H.dataSinkInfo.exportedFrom && /* @__PURE__ */ D("div", {
145
153
  className: "flex items-center justify-between",
146
- children: [/* @__PURE__ */ D("span", {
154
+ children: [/* @__PURE__ */ E("span", {
147
155
  className: "text-sm text-text-secondary",
148
156
  children: "Source ID"
149
- }), /* @__PURE__ */ D("span", {
157
+ }), /* @__PURE__ */ E("span", {
150
158
  className: "text-xs text-text-secondary font-mono truncate max-w-[180px]",
151
- children: U.dataSinkInfo.exportedFrom
159
+ children: H.dataSinkInfo.exportedFrom
152
160
  })]
153
161
  }),
154
- /* @__PURE__ */ O("div", {
162
+ /* @__PURE__ */ D("div", {
155
163
  className: "flex items-center justify-between",
156
- children: [/* @__PURE__ */ D("span", {
164
+ children: [/* @__PURE__ */ E("span", {
157
165
  className: "text-sm text-text-secondary",
158
166
  children: "Schema Version"
159
- }), /* @__PURE__ */ D("span", {
167
+ }), /* @__PURE__ */ E("span", {
160
168
  className: "text-xs text-text-secondary",
161
- children: U.dataSinkInfo.schemaVersion
169
+ children: H.dataSinkInfo.schemaVersion
162
170
  })]
163
171
  })
164
172
  ]
165
173
  }) }),
166
- U.errors.length > 0 && /* @__PURE__ */ D(h, {
174
+ H.errors.length > 0 && /* @__PURE__ */ E(g, {
167
175
  className: "border-status-error-border/50 bg-status-error-bg/5",
168
- children: /* @__PURE__ */ O(g, {
176
+ children: /* @__PURE__ */ D(_, {
169
177
  className: "p-3",
170
- children: [/* @__PURE__ */ O("div", {
178
+ children: [/* @__PURE__ */ D("div", {
171
179
  className: "flex items-center gap-2 mb-2",
172
- children: [/* @__PURE__ */ D(f, { className: "size-4 text-status-error-text" }), /* @__PURE__ */ O("span", {
180
+ children: [/* @__PURE__ */ E(p, { className: "size-4 text-status-error-text" }), /* @__PURE__ */ D("span", {
173
181
  className: "text-sm font-medium text-status-error-text",
174
182
  children: [
175
183
  "Errors (",
176
- U.errors.length,
184
+ H.errors.length,
177
185
  ")"
178
186
  ]
179
187
  })]
180
- }), /* @__PURE__ */ D("ul", {
188
+ }), /* @__PURE__ */ E("ul", {
181
189
  className: "text-xs text-status-error-text space-y-1",
182
- children: U.errors.map((e, t) => /* @__PURE__ */ O("li", { children: [
183
- /* @__PURE__ */ O("span", {
190
+ children: H.errors.map((e, t) => /* @__PURE__ */ D("li", { children: [
191
+ /* @__PURE__ */ D("span", {
184
192
  className: "font-mono",
185
193
  children: [
186
194
  "[",
@@ -194,81 +202,81 @@ var k = t(function({ isOpen: t, onClose: k, onSuccess: A }) {
194
202
  })]
195
203
  })
196
204
  }),
197
- U.isValid && /* @__PURE__ */ O("div", {
205
+ H.isValid && /* @__PURE__ */ D("div", {
198
206
  className: "space-y-4",
199
207
  children: [
200
- /* @__PURE__ */ D("p", {
208
+ /* @__PURE__ */ E("p", {
201
209
  className: "text-sm font-medium",
202
210
  children: "Import Options"
203
211
  }),
204
- /* @__PURE__ */ D(h, {
212
+ /* @__PURE__ */ E(g, {
205
213
  className: "border-blue-500/50 bg-blue-500/5",
206
- children: /* @__PURE__ */ D(g, {
214
+ children: /* @__PURE__ */ E(_, {
207
215
  className: "p-3",
208
- children: /* @__PURE__ */ O("div", {
216
+ children: /* @__PURE__ */ D("div", {
209
217
  className: "flex items-start gap-2",
210
- children: [/* @__PURE__ */ D(l, { className: "size-4 text-blue-600 mt-0.5 shrink-0" }), /* @__PURE__ */ D("div", {
218
+ children: [/* @__PURE__ */ E(u, { className: "size-4 text-blue-600 mt-0.5 shrink-0" }), /* @__PURE__ */ E("div", {
211
219
  className: "text-xs text-blue-700 dark:text-blue-400",
212
- children: $ ? /* @__PURE__ */ O(E, { children: [
213
- /* @__PURE__ */ D("p", {
220
+ children: $ ? /* @__PURE__ */ D(T, { children: [
221
+ /* @__PURE__ */ E("p", {
214
222
  className: "font-medium mb-1",
215
223
  children: "Import will check for existing DataSink"
216
224
  }),
217
- /* @__PURE__ */ O("p", { children: [
225
+ /* @__PURE__ */ D("p", { children: [
218
226
  "If the original DataSink (ID:",
219
227
  " ",
220
- /* @__PURE__ */ O("code", {
228
+ /* @__PURE__ */ D("code", {
221
229
  className: "font-mono bg-blue-200/50 px-1 rounded",
222
230
  children: [$.slice(0, 8), "..."]
223
231
  }),
224
232
  ") exists:"
225
233
  ] }),
226
- /* @__PURE__ */ O("ul", {
234
+ /* @__PURE__ */ D("ul", {
227
235
  className: "list-disc list-inside mt-1 space-y-0.5",
228
- children: [/* @__PURE__ */ D("li", { children: "With changes → Update the existing DataSink" }), /* @__PURE__ */ D("li", { children: "No changes → Show \"already exists\" message" })]
236
+ children: [/* @__PURE__ */ E("li", { children: "With changes → Update the existing DataSink" }), /* @__PURE__ */ E("li", { children: "No changes → Show \"already exists\" message" })]
229
237
  }),
230
- /* @__PURE__ */ D("p", {
238
+ /* @__PURE__ */ E("p", {
231
239
  className: "mt-1",
232
240
  children: "If original doesn't exist → Create a new DataSink"
233
241
  })
234
- ] }) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("p", {
242
+ ] }) : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("p", {
235
243
  className: "font-medium mb-1",
236
244
  children: "A new DataSink will be created"
237
- }), /* @__PURE__ */ D("p", { children: "Import as a new DataSink with the specified configuration." })] })
245
+ }), /* @__PURE__ */ E("p", { children: "Import as a new DataSink with the specified configuration." })] })
238
246
  })]
239
247
  })
240
248
  })
241
249
  }),
242
- /* @__PURE__ */ O("div", {
250
+ /* @__PURE__ */ D("div", {
243
251
  className: "space-y-2",
244
- children: [/* @__PURE__ */ D(w, {
252
+ children: [/* @__PURE__ */ E(C, {
245
253
  htmlFor: "import-name",
246
254
  children: "DataSink Name"
247
- }), /* @__PURE__ */ D(C, {
255
+ }), /* @__PURE__ */ E(S, {
248
256
  id: "import-name",
249
257
  type: "text",
250
- value: I,
251
- onChange: (e) => L(e.target.value),
252
- placeholder: U.dataSinkInfo?.name || "DataSink name",
253
- disabled: j === "importing"
258
+ value: F,
259
+ onChange: (e) => I(e.target.value),
260
+ placeholder: H.dataSinkInfo?.name || "DataSink name",
261
+ disabled: A === "importing"
254
262
  })]
255
263
  }),
256
- /* @__PURE__ */ O("div", {
264
+ /* @__PURE__ */ D("div", {
257
265
  className: "space-y-2",
258
266
  children: [
259
- /* @__PURE__ */ D(w, {
267
+ /* @__PURE__ */ E(C, {
260
268
  htmlFor: "import-key",
261
269
  children: "DataSink Key"
262
270
  }),
263
- /* @__PURE__ */ D(C, {
271
+ /* @__PURE__ */ E(S, {
264
272
  id: "import-key",
265
273
  type: "text",
266
- value: R,
267
- onChange: (e) => z(e.target.value),
268
- placeholder: U.dataSinkInfo?.key || "datasink-key",
269
- disabled: j === "importing"
274
+ value: L,
275
+ onChange: (e) => R(e.target.value),
276
+ placeholder: H.dataSinkInfo?.key || "datasink-key",
277
+ disabled: A === "importing"
270
278
  }),
271
- /* @__PURE__ */ D("p", {
279
+ /* @__PURE__ */ E("p", {
272
280
  className: "text-xs text-text-secondary",
273
281
  children: "Use a unique key to avoid conflicts with existing DataSinks."
274
282
  })
@@ -277,116 +285,116 @@ var k = t(function({ isOpen: t, onClose: k, onSuccess: A }) {
277
285
  ]
278
286
  })
279
287
  ] }),
280
- j === "complete" && W?.success && /* @__PURE__ */ O("div", {
288
+ A === "complete" && U?.success && /* @__PURE__ */ D("div", {
281
289
  className: "text-center py-6",
282
290
  children: [
283
- W.alreadyExists && /* @__PURE__ */ O(E, { children: [
284
- /* @__PURE__ */ D("div", {
291
+ U.alreadyExists && /* @__PURE__ */ D(T, { children: [
292
+ /* @__PURE__ */ E("div", {
285
293
  className: "size-16 mx-auto mb-4 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center",
286
- children: /* @__PURE__ */ D(l, { className: "size-8 text-blue-600" })
294
+ children: /* @__PURE__ */ E(u, { className: "size-8 text-blue-600" })
287
295
  }),
288
- /* @__PURE__ */ D("h3", {
296
+ /* @__PURE__ */ E("h3", {
289
297
  className: "text-lg font-medium mb-2",
290
298
  children: "DataSink Already Exists"
291
299
  }),
292
- /* @__PURE__ */ O("p", {
300
+ /* @__PURE__ */ D("p", {
293
301
  className: "text-sm text-text-secondary mb-4",
294
302
  children: [
295
303
  "DataSink \"",
296
- W.dataSink?.name || W.dataSink?.key,
304
+ U.dataSink?.name || U.dataSink?.key,
297
305
  "\" already exists with the same data. No changes were made."
298
306
  ]
299
307
  })
300
308
  ] }),
301
- W.originalUpdated && !W.alreadyExists && /* @__PURE__ */ O(E, { children: [
302
- /* @__PURE__ */ D("div", {
309
+ U.originalUpdated && !U.alreadyExists && /* @__PURE__ */ D(T, { children: [
310
+ /* @__PURE__ */ E("div", {
303
311
  className: "size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",
304
- children: /* @__PURE__ */ D(u, { className: "size-8 text-green-600" })
312
+ children: /* @__PURE__ */ E(d, { className: "size-8 text-green-600" })
305
313
  }),
306
- /* @__PURE__ */ D("h3", {
314
+ /* @__PURE__ */ E("h3", {
307
315
  className: "text-lg font-medium mb-2",
308
316
  children: "DataSink Updated!"
309
317
  }),
310
- /* @__PURE__ */ O("p", {
318
+ /* @__PURE__ */ D("p", {
311
319
  className: "text-sm text-text-secondary mb-4",
312
320
  children: [
313
321
  "DataSink \"",
314
- W.dataSink?.name || W.dataSink?.key,
322
+ U.dataSink?.name || U.dataSink?.key,
315
323
  "\" has been updated with the imported data."
316
324
  ]
317
325
  })
318
326
  ] }),
319
- !W.originalUpdated && !W.alreadyExists && /* @__PURE__ */ O(E, { children: [
320
- /* @__PURE__ */ D("div", {
327
+ !U.originalUpdated && !U.alreadyExists && /* @__PURE__ */ D(T, { children: [
328
+ /* @__PURE__ */ E("div", {
321
329
  className: "size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",
322
- children: /* @__PURE__ */ D(s, { className: "size-8 text-green-600" })
330
+ children: /* @__PURE__ */ E(c, { className: "size-8 text-green-600" })
323
331
  }),
324
- /* @__PURE__ */ D("h3", {
332
+ /* @__PURE__ */ E("h3", {
325
333
  className: "text-lg font-medium mb-2",
326
334
  children: "Import Successful!"
327
335
  }),
328
- /* @__PURE__ */ O("p", {
336
+ /* @__PURE__ */ D("p", {
329
337
  className: "text-sm text-text-secondary mb-4",
330
338
  children: [
331
339
  "DataSink \"",
332
- W.dataSink?.name || W.dataSink?.key,
340
+ U.dataSink?.name || U.dataSink?.key,
333
341
  "\" has been created."
334
342
  ]
335
343
  })
336
344
  ] })
337
345
  ]
338
346
  }),
339
- H && /* @__PURE__ */ D(h, {
347
+ V && /* @__PURE__ */ E(g, {
340
348
  className: "border-status-error-border/50 bg-status-error-bg/5",
341
- children: /* @__PURE__ */ D(g, {
349
+ children: /* @__PURE__ */ E(_, {
342
350
  className: "p-3",
343
- children: /* @__PURE__ */ D("p", {
351
+ children: /* @__PURE__ */ E("p", {
344
352
  className: "text-sm text-status-error-text",
345
- children: H.message
353
+ children: V.message
346
354
  })
347
355
  })
348
356
  }),
349
- W && !W.success && W.errorMessage && /* @__PURE__ */ D(h, {
357
+ U && !U.success && U.errorMessage && /* @__PURE__ */ E(g, {
350
358
  className: "border-status-error-border/50 bg-status-error-bg/5",
351
- children: /* @__PURE__ */ D(g, {
359
+ children: /* @__PURE__ */ E(_, {
352
360
  className: "p-3",
353
- children: /* @__PURE__ */ D("p", {
361
+ children: /* @__PURE__ */ E("p", {
354
362
  className: "text-sm text-status-error-text",
355
- children: W.errorMessage
363
+ children: U.errorMessage
356
364
  })
357
365
  })
358
366
  })
359
367
  ]
360
368
  }),
361
- /* @__PURE__ */ O(b, {
369
+ /* @__PURE__ */ D(ee, {
362
370
  className: "flex-row justify-between sm:justify-between",
363
- children: [/* @__PURE__ */ D("div", { children: j === "preview" && /* @__PURE__ */ O(m, {
371
+ children: [/* @__PURE__ */ E("div", { children: A === "preview" && /* @__PURE__ */ D(h, {
364
372
  variant: "ghost",
365
373
  onClick: () => {
366
- M("select"), N(null), F(null), J();
374
+ j("select"), M(null), P(null), q();
367
375
  },
368
- disabled: V,
369
- children: [/* @__PURE__ */ D(o, { className: "size-4" }), "Back"]
370
- }) }), /* @__PURE__ */ O("div", {
376
+ disabled: B,
377
+ children: [/* @__PURE__ */ E(s, { className: "size-4" }), "Back"]
378
+ }) }), /* @__PURE__ */ D("div", {
371
379
  className: "flex items-center gap-2",
372
380
  children: [
373
- j !== "complete" && /* @__PURE__ */ D(m, {
381
+ A !== "complete" && /* @__PURE__ */ E(h, {
374
382
  variant: "outline",
375
- onClick: k,
383
+ onClick: O,
376
384
  disabled: !Q,
377
385
  children: "Cancel"
378
386
  }),
379
- j === "preview" && U?.isValid && /* @__PURE__ */ O(m, {
387
+ A === "preview" && H?.isValid && /* @__PURE__ */ D(h, {
380
388
  onClick: Z,
381
- disabled: V,
382
- children: [/* @__PURE__ */ D(d, { className: "size-4" }), "Import DataSink"]
389
+ disabled: B,
390
+ children: [/* @__PURE__ */ E(f, { className: "size-4" }), "Import DataSink"]
383
391
  }),
384
- j === "importing" && /* @__PURE__ */ O("div", {
392
+ A === "importing" && /* @__PURE__ */ D("div", {
385
393
  className: "flex items-center gap-2 text-sm text-text-secondary",
386
- children: [/* @__PURE__ */ D(T, { className: "size-4" }), "Importing..."]
394
+ children: [/* @__PURE__ */ E(w, { className: "size-4" }), "Importing..."]
387
395
  }),
388
- j === "complete" && /* @__PURE__ */ D(m, {
389
- onClick: k,
396
+ A === "complete" && /* @__PURE__ */ E(h, {
397
+ onClick: O,
390
398
  children: "Done"
391
399
  })
392
400
  ]
@@ -397,6 +405,6 @@ var k = t(function({ isOpen: t, onClose: k, onSuccess: A }) {
397
405
  });
398
406
  });
399
407
  //#endregion
400
- export { k as default };
408
+ export { O as default };
401
409
 
402
410
  //# sourceMappingURL=ImportDataSinkDialog.js.map