@burdenoff/microfe-files 2026.624.3 → 2026.625.2

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.
@@ -49,26 +49,26 @@ import { FolderPlus as Ue, FolderUp as We, FolderX as Ge, Grid3x3 as Ke, Home as
49
49
  import { Fragment as $e, jsx as c, jsxs as l } from "react/jsx-runtime";
50
50
  import { useNavigate as et, useParams as tt } from "react-router-dom";
51
51
  import { useI18n as nt } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
52
- import { Button as rt, Input as it, ResponsiveDialog as at, ResponsiveDialogContent as ot, ResponsiveDialogFooter as st, ResponsiveDialogHeader as ct, ResponsiveDialogTitle as lt } from "@burdenoff/fe-libs/ui";
52
+ import { Button as u, CTAOverflowMenu as rt, EmphasisPanel as it, Input as at, ResponsiveDialog as ot, ResponsiveDialogContent as st, ResponsiveDialogFooter as ct, ResponsiveDialogHeader as lt, ResponsiveDialogTitle as ut } from "@burdenoff/fe-libs/ui";
53
53
  //#region src/files/pages/BrowserPage.tsx
54
- function u() {
55
- let { t: u } = nt(), { folderId: d } = tt(), f = et(), ut = e(), { workspaceId: p } = ut, dt = Fe(p ?? ""), { viewMode: ft, setViewMode: pt, breadcrumbs: mt, selectedFiles: m, selectedFolders: h, clearSelection: g } = t(), [_, ht] = o("all"), gt = He(() => [
54
+ function d() {
55
+ let { t: d } = nt(), { folderId: f } = tt(), p = et(), dt = e(), { workspaceId: m } = dt, ft = Fe(m ?? ""), { viewMode: pt, setViewMode: mt, breadcrumbs: ht, selectedFiles: h, selectedFolders: g, clearSelection: _ } = t(), [v, gt] = o("all"), _t = He(() => [
56
56
  "all",
57
57
  "recent",
58
58
  "starred",
59
59
  "bin"
60
60
  ], []);
61
61
  Ve(() => {
62
- gt.includes(_) || ht("all");
63
- }, [gt, _]);
64
- let [_t, vt] = o(""), [yt, bt] = o(), v = _t.trim().length >= 2, [xt, St] = o(null), [y, Ct] = o(null), b = be(), x = r({
65
- folderId: d || void 0,
62
+ _t.includes(v) || gt("all");
63
+ }, [_t, v]);
64
+ let [y, vt] = o(""), [yt, bt] = o(), b = y.trim().length >= 2, [xt, St] = o(null), [x, Ct] = o(null), S = be(), C = r({
65
+ folderId: f || void 0,
66
66
  pageSize: 100,
67
- skip: _ !== "all" || v
68
- }), S = i({ skip: _ !== "recent" || v }), C = ee({ skip: _ !== "starred" || v }), w = te({ skip: _ !== "bin" || v }), T = ye(_t, v, yt);
67
+ skip: v !== "all" || b
68
+ }), wt = i({ skip: v !== "recent" || b }), Tt = ee({ skip: v !== "starred" || b }), Et = te({ skip: v !== "bin" || b }), w = ye(y, b, yt);
69
69
  Ve(() => {
70
- if (d && x.data?.folderPath && x.data?.currentFolder) {
71
- let e = x.data.folderPath.folders || [], n = x.data.currentFolder, r = [...e.map((e) => ({
70
+ if (f && C.data?.folderPath && C.data?.currentFolder) {
71
+ let e = C.data.folderPath.folders || [], n = C.data.currentFolder, r = [...e.map((e) => ({
72
72
  id: e.id,
73
73
  name: e.name
74
74
  })), {
@@ -77,26 +77,26 @@ function u() {
77
77
  }];
78
78
  t.getState().setBreadcrumbs(r);
79
79
  } else t.getState().setBreadcrumbs([]);
80
- }, [d, x.data]);
81
- let E = [], D = [], O = !1, k = null, A = !1;
82
- if (v && T.data) E = T.data.files || [], D = T.data.folders || [], O = T.isLoading, k = T.error;
83
- else switch (_) {
80
+ }, [f, C.data]);
81
+ let T = [], E = [], D = !1, O = null, k = !1;
82
+ if (b && w.data) T = w.data.files || [], E = w.data.folders || [], D = w.isLoading, O = w.error;
83
+ else switch (v) {
84
84
  case "all":
85
- E = x.data?.filesList?.files || [], D = x.data?.foldersList?.folders || [], O = x.loading, k = x.error || null, A = !1;
85
+ T = C.data?.filesList?.files || [], E = C.data?.foldersList?.folders || [], D = C.loading, O = C.error || null, k = !1;
86
86
  break;
87
87
  case "recent":
88
- E = S.files || [], D = S.folders || [], O = S.isLoading, k = S.error || null, A = !0;
88
+ T = wt.files || [], E = wt.folders || [], D = wt.isLoading, O = wt.error || null, k = !0;
89
89
  break;
90
90
  case "starred":
91
- E = C.files, D = C.folders, O = C.isLoading, k = C.error || null, A = !0;
91
+ T = Tt.files, E = Tt.folders, D = Tt.isLoading, O = Tt.error || null, k = !0;
92
92
  break;
93
93
  case "bin":
94
- E = w.files, D = w.folders, O = w.isLoading, k = w.error || null, A = !0;
94
+ T = Et.files, E = Et.folders, D = Et.isLoading, O = Et.error || null, k = !0;
95
95
  break;
96
96
  }
97
- let wt = _ === "all" ? (x.data?.filesList?.total ?? E.length) + (x.data?.foldersList?.total ?? D.length) : null, j = m.size + h.size, [Tt, M] = o(!1), [Et, Dt] = o(!1), [Ot, N] = o(!1), [kt, At] = o(!1), [jt, P] = o(!1), [Mt, Nt] = o(!1), [Pt, F] = o(null), [I, L] = o(null), [R, Ft] = o(null), [z, B] = o(null), [V, H] = o(""), [U, W] = o(""), [It, G] = o(!1), [Lt, K] = o([]), [Rt, q] = o(!1), [J, Y] = o(null), X = (e, t) => {
98
- Be(ut, e, t);
99
- }, zt = async () => {
97
+ let Dt = v === "all" ? (C.data?.filesList?.total ?? T.length) + (C.data?.foldersList?.total ?? E.length) : null, A = h.size + g.size, [Ot, j] = o(!1), [kt, At] = o(!1), [jt, M] = o(!1), [Mt, N] = o(!1), [Nt, Pt] = o(!1), [Ft, It] = o(!1), [Lt, P] = o(null), [F, I] = o(null), [L, Rt] = o(null), [R, z] = o(null), [B, V] = o(""), [H, U] = o(""), [W, G] = o(!1), [zt, K] = o([]), [Bt, q] = o(!1), [J, Y] = o(null), X = (e, t) => {
98
+ Be(dt, e, t);
99
+ }, Vt = async () => {
100
100
  if (!J || J.loading) return;
101
101
  let e = J.onConfirm;
102
102
  Y({
@@ -114,7 +114,7 @@ function u() {
114
114
  loading: !1
115
115
  });
116
116
  }
117
- }, Z = ne(), Bt = re(), Vt = ie(), Ht = ae(), Ut = oe(), Wt = se(), Gt = ce(), Kt = le(), qt = ue(), Q = de(), $ = fe(), Jt = pe(), Yt = me(), Xt = he(), Zt = ge(), Qt = _e(), $t = ve(), en = () => {
117
+ }, Z = ne(), Ht = re(), Ut = ie(), Wt = ae(), Gt = oe(), Kt = se(), qt = ce(), Jt = le(), Yt = ue(), Q = de(), $ = fe(), Xt = pe(), Zt = me(), Qt = he(), $t = ge(), en = _e(), tn = ve(), nn = () => {
118
118
  let e = document.createElement("input");
119
119
  e.type = "file", e.multiple = !0, e.onchange = async (e) => {
120
120
  let t = e.target.files;
@@ -126,16 +126,16 @@ function u() {
126
126
  file: e,
127
127
  status: "pending",
128
128
  progress: 0,
129
- folderId: d || void 0,
129
+ folderId: f || void 0,
130
130
  thumbnailUrl: n ?? void 0
131
131
  };
132
132
  }));
133
133
  K((t) => [...t, ...e]), q(!0), G(!0);
134
- for (let t of e) await tn(t);
134
+ for (let t of e) await rn(t);
135
135
  G(!1);
136
136
  }
137
137
  }, e.click();
138
- }, tn = async (e) => {
138
+ }, rn = async (e) => {
139
139
  let t = (t) => {
140
140
  K((n) => n.map((n) => n.id === e.id ? {
141
141
  ...n,
@@ -144,7 +144,7 @@ function u() {
144
144
  };
145
145
  t({ status: "uploading" });
146
146
  try {
147
- let n = await Bt.mutateAsync({
147
+ let n = await Ht.mutateAsync({
148
148
  file: e.file,
149
149
  folderId: e.folderId,
150
150
  onProgress: (e) => {
@@ -160,11 +160,11 @@ function u() {
160
160
  folderId: e.folderId
161
161
  });
162
162
  } catch (n) {
163
- let r = n instanceof Error ? n.message : a(u, "files.upload.errors.failed", "Upload failed");
163
+ let r = n instanceof Error ? n.message : a(d, "files.upload.errors.failed", "Upload failed");
164
164
  r === "Upload paused" ? t({ status: "paused" }) : r === "QUOTA_EXHAUSTED" ? (t({
165
165
  status: "failed",
166
- error: a(u, "files.upload.errors.quotaExceeded", "Storage quota exceeded")
167
- }), b.error(a(u, "files.upload.errors.quotaExceeded", "Storage quota exceeded. Please upgrade your plan or delete files."))) : (t({
166
+ error: a(d, "files.upload.errors.quotaExceeded", "Storage quota exceeded")
167
+ }), S.error(a(d, "files.upload.errors.quotaExceeded", "Storage quota exceeded. Please upgrade your plan or delete files."))) : (t({
168
168
  status: "failed",
169
169
  error: r
170
170
  }), X("files.api.failed", {
@@ -173,30 +173,30 @@ function u() {
173
173
  message: r
174
174
  }));
175
175
  }
176
- }, nn = (e) => {
177
- Bt.pause(), K((t) => t.map((t) => t.id === e ? {
176
+ }, an = (e) => {
177
+ Ht.pause(), K((t) => t.map((t) => t.id === e ? {
178
178
  ...t,
179
179
  status: "paused"
180
180
  } : t));
181
- }, rn = (e) => {
182
- let t = Lt.find((t) => t.id === e);
183
- t && tn(t);
184
- }, an = (e) => {
185
- let t = Lt.find((t) => t.id === e);
181
+ }, on = (e) => {
182
+ let t = zt.find((t) => t.id === e);
183
+ t && rn(t);
184
+ }, sn = (e) => {
185
+ let t = zt.find((t) => t.id === e);
186
186
  t && (K((t) => t.map((t) => t.id === e ? {
187
187
  ...t,
188
188
  status: "pending",
189
189
  progress: 0,
190
190
  error: void 0
191
- } : t)), tn(t));
192
- }, on = (e) => {
191
+ } : t)), rn(t));
192
+ }, cn = (e) => {
193
193
  K((t) => {
194
194
  let n = t.filter((t) => t.id !== e);
195
195
  return n.length === 0 && (q(!1), G(!1)), n;
196
196
  });
197
- }, sn = () => {
198
- if (!p) {
199
- b.error(a(u, "files.workspace.errors.notSelected", "Workspace not selected"));
197
+ }, ln = () => {
198
+ if (!m) {
199
+ S.error(a(d, "files.workspace.errors.notSelected", "Workspace not selected"));
200
200
  return;
201
201
  }
202
202
  let e = document.createElement("input");
@@ -211,7 +211,7 @@ function u() {
211
211
  let n = /* @__PURE__ */ new Map(), r = Array.from(e.keys()).sort();
212
212
  for (let e of r) {
213
213
  if (!e) continue;
214
- let t = e.split("/"), r = "", i = d || void 0;
214
+ let t = e.split("/"), r = "", i = f || void 0;
215
215
  for (let e of t) if (r = r ? `${r}/${e}` : e, n.has(r)) i = n.get(r);
216
216
  else try {
217
217
  let { data: t } = await Z.mutateAsync({
@@ -223,7 +223,7 @@ function u() {
223
223
  }
224
224
  let i = [], ee = 0;
225
225
  for (let [t, r] of e) {
226
- let e = t ? n.get(t) : d || void 0;
226
+ let e = t ? n.get(t) : f || void 0;
227
227
  for (let t of r) {
228
228
  let n = await xe(t);
229
229
  i.push({
@@ -237,41 +237,41 @@ function u() {
237
237
  }
238
238
  }
239
239
  K((e) => [...e, ...i]), q(!0), G(!0);
240
- for (let e of i) await tn(e);
241
- G(!1), b.success(a(u, "files.upload.folder.success", "Uploaded {{count}} file{{plural}} from folder", {
240
+ for (let e of i) await rn(e);
241
+ G(!1), S.success(a(d, "files.upload.folder.success", "Uploaded {{count}} file{{plural}} from folder", {
242
242
  count: i.length,
243
243
  plural: i.length > 1 ? "s" : ""
244
244
  }));
245
245
  }
246
246
  }, e.click();
247
- }, cn = () => {
248
- M(!0);
249
- }, ln = async () => {
250
- if (U.trim() && p) {
247
+ }, un = () => {
248
+ j(!0);
249
+ }, dn = async () => {
250
+ if (H.trim() && m) {
251
251
  let { data: e, error: t } = await Z.mutateAsync({
252
- name: U,
253
- parentFolderId: d
252
+ name: H,
253
+ parentFolderId: f
254
254
  });
255
255
  if (t) {
256
- Ie(t) ? (M(!1), W(""), Dt(!0)) : (b.error(t instanceof Error ? t.message : a(u, "files.folder.errors.createFailed", "Folder creation failed")), X("files.api.failed", {
256
+ Ie(t) ? (j(!1), U(""), At(!0)) : (S.error(t instanceof Error ? t.message : a(d, "files.folder.errors.createFailed", "Folder creation failed")), X("files.api.failed", {
257
257
  action: "createFolder",
258
258
  message: t instanceof Error ? t.message : "Folder creation failed"
259
259
  }));
260
260
  return;
261
261
  }
262
- e && (W(""), M(!1), X("files.folder.created", {
263
- folderName: U,
264
- parentFolderId: d
262
+ e && (U(""), j(!1), X("files.folder.created", {
263
+ folderName: H,
264
+ parentFolderId: f
265
265
  }));
266
266
  }
267
- }, un = (e) => {
268
- Ct(e);
269
- }, dn = (e) => {
270
- F(e), At(!0);
271
267
  }, fn = (e) => {
272
- F(e), At(!0);
273
- }, pn = async (e) => {
274
- if (!e.fileId && !e.folderId) throw Error(a(u, "files.share.errors.targetRequired", "Share requires a file id or folder id"));
268
+ Ct(e);
269
+ }, pn = (e) => {
270
+ P(e), N(!0);
271
+ }, mn = (e) => {
272
+ P(e), N(!0);
273
+ }, hn = async (e) => {
274
+ if (!e.fileId && !e.folderId) throw Error(a(d, "files.share.errors.targetRequired", "Share requires a file id or folder id"));
275
275
  let t = e.invitedEmail ? "EMAIL_INVITE" : "PUBLIC_LINK", n = "";
276
276
  if (e.fileId) {
277
277
  let r = {
@@ -283,7 +283,7 @@ function u() {
283
283
  shareType: t,
284
284
  accessLevel: "DOWNLOAD"
285
285
  };
286
- n = (await Jt.mutateAsync(r))?.token ?? "", X("files.share.created", {
286
+ n = (await Xt.mutateAsync(r))?.token ?? "", X("files.share.created", {
287
287
  entityType: "file",
288
288
  fileId: e.fileId,
289
289
  shareType: t
@@ -298,7 +298,7 @@ function u() {
298
298
  shareType: t,
299
299
  accessLevel: "DOWNLOAD"
300
300
  };
301
- n = (await Yt.mutateAsync(r))?.createFolderShare?.token ?? "", X("files.share.created", {
301
+ n = (await Zt.mutateAsync(r))?.createFolderShare?.token ?? "", X("files.share.created", {
302
302
  entityType: "folder",
303
303
  folderId: e.folderId,
304
304
  shareType: t
@@ -308,21 +308,21 @@ function u() {
308
308
  publicUrl: n ? `${window.location.origin}/files/share/${n}` : "",
309
309
  token: n
310
310
  };
311
- }, mn = async (e) => {
311
+ }, gn = async (e) => {
312
312
  Le("medium"), Y({
313
- title: a(u, "files.confirm.deleteFile.title", "Delete file"),
314
- description: a(u, "files.confirm.deleteFile.description", "Move \"{{name}}\" to the bin?", { name: e.name }),
315
- confirmLabel: a(u, "files.common.actions.delete", "Delete"),
313
+ title: a(d, "files.confirm.deleteFile.title", "Delete file"),
314
+ description: a(d, "files.confirm.deleteFile.description", "Move \"{{name}}\" to the bin?", { name: e.name }),
315
+ confirmLabel: a(d, "files.common.actions.delete", "Delete"),
316
316
  variant: "danger",
317
317
  onConfirm: async () => {
318
318
  try {
319
- await Vt.mutateAsync({ id: e.id }), Re("success"), b.success(a(u, "files.file.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), X("files.file.deleted", {
319
+ await Ut.mutateAsync({ id: e.id }), Re("success"), S.success(a(d, "files.file.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), X("files.file.deleted", {
320
320
  fileId: e.id,
321
321
  fileName: e.name,
322
322
  permanent: !1
323
323
  });
324
324
  } catch (t) {
325
- b.error(t instanceof Error ? t.message : a(u, "files.file.errors.deleteFailed", "Failed to delete \"{{name}}\"", { name: e.name })), Re("error"), X("files.api.failed", {
325
+ S.error(t instanceof Error ? t.message : a(d, "files.file.errors.deleteFailed", "Failed to delete \"{{name}}\"", { name: e.name })), Re("error"), X("files.api.failed", {
326
326
  action: "deleteFile",
327
327
  fileId: e.id,
328
328
  message: t instanceof Error ? t.message : "Failed to delete file"
@@ -330,36 +330,36 @@ function u() {
330
330
  }
331
331
  }
332
332
  });
333
- }, hn = async (e) => {
333
+ }, _n = async (e) => {
334
334
  try {
335
- await Ut.mutateAsync({ id: e.id }), b.success(a(u, "files.file.restore.success", "\"{{name}}\" restored", { name: e.name })), X("files.file.restored", {
335
+ await Gt.mutateAsync({ id: e.id }), S.success(a(d, "files.file.restore.success", "\"{{name}}\" restored", { name: e.name })), X("files.file.restored", {
336
336
  fileId: e.id,
337
337
  fileName: e.name
338
338
  });
339
339
  } catch (e) {
340
- b.error(e instanceof Error ? e.message : a(u, "files.file.errors.restoreFailed", "Failed to restore file"));
340
+ S.error(e instanceof Error ? e.message : a(d, "files.file.errors.restoreFailed", "Failed to restore file"));
341
341
  }
342
- }, gn = async (e) => {
342
+ }, vn = async (e) => {
343
343
  Le("heavy"), Y({
344
- title: a(u, "files.confirm.permanentDeleteFile.title", "Permanently delete file"),
345
- description: a(u, "files.confirm.permanentDeleteFile.description", "Permanently delete \"{{name}}\"? This cannot be undone.", { name: e.name }),
346
- confirmLabel: a(u, "files.common.actions.deletePermanently", "Delete permanently"),
344
+ title: a(d, "files.confirm.permanentDeleteFile.title", "Permanently delete file"),
345
+ description: a(d, "files.confirm.permanentDeleteFile.description", "Permanently delete \"{{name}}\"? This cannot be undone.", { name: e.name }),
346
+ confirmLabel: a(d, "files.common.actions.deletePermanently", "Delete permanently"),
347
347
  variant: "danger",
348
348
  onConfirm: async () => {
349
349
  try {
350
- await Gt.mutateAsync({ id: e.id }), b.success(a(u, "files.file.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), X("files.file.deleted", {
350
+ await qt.mutateAsync({ id: e.id }), S.success(a(d, "files.file.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), X("files.file.deleted", {
351
351
  fileId: e.id,
352
352
  fileName: e.name,
353
353
  permanent: !0
354
354
  });
355
355
  } catch (e) {
356
- b.error(e instanceof Error ? e.message : a(u, "files.file.errors.permanentDeleteFailed", "Failed to permanently delete file"));
356
+ S.error(e instanceof Error ? e.message : a(d, "files.file.errors.permanentDeleteFailed", "Failed to permanently delete file"));
357
357
  }
358
358
  }
359
359
  });
360
- }, _n = async (e) => {
360
+ }, yn = async (e) => {
361
361
  try {
362
- await qt.mutateAsync({
362
+ await Yt.mutateAsync({
363
363
  id: e.id,
364
364
  type: "file"
365
365
  }), X("files.file.starred", {
@@ -368,108 +368,108 @@ function u() {
368
368
  starred: !e.starred
369
369
  });
370
370
  } catch {
371
- b.error(a(u, "files.file.errors.starFailed", "Failed to update starred state")), X("files.api.failed", {
371
+ S.error(a(d, "files.file.errors.starFailed", "Failed to update starred state")), X("files.api.failed", {
372
372
  action: "toggleFileStar",
373
373
  fileId: e.id
374
374
  });
375
375
  }
376
- }, vn = (e) => {
377
- B({
376
+ }, bn = (e) => {
377
+ z({
378
378
  id: e.id,
379
379
  name: e.name,
380
380
  type: "file"
381
- }), H(e.name), N(!0);
382
- }, yn = async (e) => {
381
+ }), V(e.name), M(!0);
382
+ }, xn = async (e) => {
383
383
  try {
384
384
  let t = e.downloadUrl || e.url;
385
- if (!t) throw Error(a(u, "files.file.errors.downloadUrlUnavailable", "Download URL is unavailable"));
385
+ if (!t) throw Error(a(d, "files.file.errors.downloadUrlUnavailable", "Download URL is unavailable"));
386
386
  let n = document.createElement("a");
387
- n.style.display = "none", n.href = t, n.download = e.name, n.rel = "noopener noreferrer", document.body.appendChild(n), n.click(), document.body.removeChild(n), b.success(a(u, "files.file.download.success", "Downloaded {{name}}", { name: e.name })), X("files.file.downloaded", {
387
+ n.style.display = "none", n.href = t, n.download = e.name, n.rel = "noopener noreferrer", document.body.appendChild(n), n.click(), document.body.removeChild(n), S.success(a(d, "files.file.download.success", "Downloaded {{name}}", { name: e.name })), X("files.file.downloaded", {
388
388
  fileId: e.id,
389
389
  fileName: e.name
390
390
  });
391
391
  } catch (e) {
392
- b.error(e instanceof Error ? e.message : a(u, "files.file.errors.downloadFailed", "Failed to download file"));
392
+ S.error(e instanceof Error ? e.message : a(d, "files.file.errors.downloadFailed", "Failed to download file"));
393
393
  }
394
- }, bn = (e) => {
395
- Ft({
394
+ }, Sn = (e) => {
395
+ Rt({
396
396
  item: e,
397
397
  type: "file"
398
- }), Nt(!0);
399
- }, xn = (e) => {
400
- L({
398
+ }), It(!0);
399
+ }, Cn = (e) => {
400
+ I({
401
401
  item: e,
402
402
  type: "file"
403
- }), P(!0);
404
- }, Sn = (e) => {
403
+ }), Pt(!0);
404
+ }, wn = (e) => {
405
405
  St({
406
406
  item: e,
407
407
  type: "file"
408
408
  });
409
- }, Cn = (e) => {
410
- f(`/files/browse/${e.id}`);
411
- }, wn = async (e) => {
409
+ }, Tn = (e) => {
410
+ p(`/files/browse/${e.id}`);
411
+ }, En = async (e) => {
412
412
  Le("medium"), Y({
413
- title: a(u, "files.confirm.deleteFolder.title", "Delete folder"),
414
- description: a(u, "files.confirm.deleteFolder.description", "Move folder \"{{name}}\" and all its contents to the bin?", { name: e.name }),
415
- confirmLabel: a(u, "files.common.actions.delete", "Delete"),
413
+ title: a(d, "files.confirm.deleteFolder.title", "Delete folder"),
414
+ description: a(d, "files.confirm.deleteFolder.description", "Move folder \"{{name}}\" and all its contents to the bin?", { name: e.name }),
415
+ confirmLabel: a(d, "files.common.actions.delete", "Delete"),
416
416
  variant: "danger",
417
417
  onConfirm: async () => {
418
418
  try {
419
- await Ht.mutateAsync({
419
+ await Wt.mutateAsync({
420
420
  id: e.id,
421
421
  recursive: !0
422
- }), b.success(a(u, "files.folder.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), X("files.folder.deleted", {
422
+ }), S.success(a(d, "files.folder.delete.success", "\"{{name}}\" moved to bin", { name: e.name })), X("files.folder.deleted", {
423
423
  folderId: e.id,
424
424
  folderName: e.name,
425
425
  permanent: !1
426
426
  });
427
427
  } catch (e) {
428
- b.error(e instanceof Error ? e.message : a(u, "files.folder.errors.deleteFailed", "Failed to delete folder"));
428
+ S.error(e instanceof Error ? e.message : a(d, "files.folder.errors.deleteFailed", "Failed to delete folder"));
429
429
  }
430
430
  }
431
431
  });
432
- }, Tn = async (e) => {
432
+ }, Dn = async (e) => {
433
433
  try {
434
- await Wt.mutateAsync({ id: e.id }), b.success(a(u, "files.folder.restore.success", "\"{{name}}\" restored", { name: e.name })), X("files.folder.restored", {
434
+ await Kt.mutateAsync({ id: e.id }), S.success(a(d, "files.folder.restore.success", "\"{{name}}\" restored", { name: e.name })), X("files.folder.restored", {
435
435
  folderId: e.id,
436
436
  folderName: e.name
437
437
  });
438
438
  } catch (e) {
439
- b.error(e instanceof Error ? e.message : a(u, "files.folder.errors.restoreFailed", "Failed to restore folder"));
439
+ S.error(e instanceof Error ? e.message : a(d, "files.folder.errors.restoreFailed", "Failed to restore folder"));
440
440
  }
441
- }, En = async (e) => {
441
+ }, On = async (e) => {
442
442
  Y({
443
- title: a(u, "files.confirm.permanentDeleteFolder.title", "Permanently delete folder"),
444
- description: a(u, "files.confirm.permanentDeleteFolder.description", "Permanently delete folder \"{{name}}\" and its contents? This cannot be undone.", { name: e.name }),
445
- confirmLabel: a(u, "files.common.actions.deletePermanently", "Delete permanently"),
443
+ title: a(d, "files.confirm.permanentDeleteFolder.title", "Permanently delete folder"),
444
+ description: a(d, "files.confirm.permanentDeleteFolder.description", "Permanently delete folder \"{{name}}\" and its contents? This cannot be undone.", { name: e.name }),
445
+ confirmLabel: a(d, "files.common.actions.deletePermanently", "Delete permanently"),
446
446
  variant: "danger",
447
447
  onConfirm: async () => {
448
448
  try {
449
- await Kt.mutateAsync({ id: e.id }), b.success(a(u, "files.folder.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), X("files.folder.deleted", {
449
+ await Jt.mutateAsync({ id: e.id }), S.success(a(d, "files.folder.permanentDelete.success", "\"{{name}}\" deleted permanently", { name: e.name })), X("files.folder.deleted", {
450
450
  folderId: e.id,
451
451
  folderName: e.name,
452
452
  permanent: !0
453
453
  });
454
454
  } catch (e) {
455
- b.error(e instanceof Error ? e.message : a(u, "files.folder.errors.permanentDeleteFailed", "Failed to permanently delete folder"));
455
+ S.error(e instanceof Error ? e.message : a(d, "files.folder.errors.permanentDeleteFailed", "Failed to permanently delete folder"));
456
456
  }
457
457
  }
458
458
  });
459
- }, Dn = (e) => {
460
- B({
459
+ }, kn = (e) => {
460
+ z({
461
461
  id: e.id,
462
462
  name: e.name,
463
463
  type: "folder"
464
- }), H(e.name), N(!0);
465
- }, On = (e) => {
466
- L({
464
+ }), V(e.name), M(!0);
465
+ }, An = (e) => {
466
+ I({
467
467
  item: e,
468
468
  type: "folder"
469
- }), P(!0);
470
- }, kn = async (e) => {
469
+ }), Pt(!0);
470
+ }, jn = async (e) => {
471
471
  try {
472
- await qt.mutateAsync({
472
+ await Yt.mutateAsync({
473
473
  id: e.id,
474
474
  type: "folder"
475
475
  }), X("files.folder.starred", {
@@ -478,112 +478,112 @@ function u() {
478
478
  starred: !e.starred
479
479
  });
480
480
  } catch {
481
- b.error(a(u, "files.folder.errors.starFailed", "Failed to update starred state")), X("files.api.failed", {
481
+ S.error(a(d, "files.folder.errors.starFailed", "Failed to update starred state")), X("files.api.failed", {
482
482
  action: "toggleFolderStar",
483
483
  folderId: e.id
484
484
  });
485
485
  }
486
- }, An = (e) => {
486
+ }, Mn = (e) => {
487
487
  St({
488
488
  item: e,
489
489
  type: "folder"
490
490
  });
491
- }, jn = async (e) => {
492
- if (I) try {
493
- I.type === "file" ? (await Zt.mutateAsync({
494
- fileId: I.item.id,
491
+ }, Nn = async (e) => {
492
+ if (F) try {
493
+ F.type === "file" ? (await $t.mutateAsync({
494
+ fileId: F.item.id,
495
495
  targetFolderId: e || null
496
- }), b.success(a(u, "files.file.move.success", "\"{{name}}\" moved", { name: I.item.name })), X("files.file.moved", {
497
- fileId: I.item.id,
498
- fileName: I.item.name,
496
+ }), S.success(a(d, "files.file.move.success", "\"{{name}}\" moved", { name: F.item.name })), X("files.file.moved", {
497
+ fileId: F.item.id,
498
+ fileName: F.item.name,
499
499
  destinationFolderId: e
500
- })) : (await Qt.mutateAsync({
501
- folderId: I.item.id,
500
+ })) : (await en.mutateAsync({
501
+ folderId: F.item.id,
502
502
  targetParentFolderId: e
503
- }), b.success(a(u, "files.folder.move.success", "\"{{name}}\" moved", { name: I.item.name })), X("files.folder.moved", {
504
- folderId: I.item.id,
505
- folderName: I.item.name,
503
+ }), S.success(a(d, "files.folder.move.success", "\"{{name}}\" moved", { name: F.item.name })), X("files.folder.moved", {
504
+ folderId: F.item.id,
505
+ folderName: F.item.name,
506
506
  destinationFolderId: e
507
- })), P(!1), L(null);
507
+ })), Pt(!1), I(null);
508
508
  } catch (e) {
509
- b.error(e instanceof Error ? e.message : a(u, "files.item.errors.moveFailed", "Failed to move \"{{name}}\"", { name: I.item.name })), X("files.api.failed", {
510
- action: I.type === "file" ? "moveFile" : "moveFolder",
511
- itemId: I.item.id,
512
- itemType: I.type,
509
+ S.error(e instanceof Error ? e.message : a(d, "files.item.errors.moveFailed", "Failed to move \"{{name}}\"", { name: F.item.name })), X("files.api.failed", {
510
+ action: F.type === "file" ? "moveFile" : "moveFolder",
511
+ itemId: F.item.id,
512
+ itemType: F.type,
513
513
  message: e instanceof Error ? e.message : void 0
514
514
  });
515
515
  }
516
- }, Mn = async (e, t) => {
517
- if (R) try {
518
- if (R.type !== "file") throw Error(a(u, "files.folder.errors.copyUnsupported", "Folder copy is not supported"));
519
- await Xt.mutateAsync({
520
- id: R.item.id,
521
- newName: t || `Copy of ${R.item.name}`,
516
+ }, Pn = async (e, t) => {
517
+ if (L) try {
518
+ if (L.type !== "file") throw Error(a(d, "files.folder.errors.copyUnsupported", "Folder copy is not supported"));
519
+ await Qt.mutateAsync({
520
+ id: L.item.id,
521
+ newName: t || `Copy of ${L.item.name}`,
522
522
  targetFolderId: e || void 0
523
- }), b.success(a(u, "files.file.copy.success", "\"{{name}}\" copied", { name: R.item.name })), X("files.file.copied", {
524
- fileId: R.item.id,
525
- fileName: R.item.name,
523
+ }), S.success(a(d, "files.file.copy.success", "\"{{name}}\" copied", { name: L.item.name })), X("files.file.copied", {
524
+ fileId: L.item.id,
525
+ fileName: L.item.name,
526
526
  destinationFolderId: e
527
- }), Nt(!1), Ft(null);
527
+ }), It(!1), Rt(null);
528
528
  } catch (e) {
529
- b.error(e instanceof Error ? e.message : a(u, "files.file.errors.copyFailed", "Failed to copy \"{{name}}\"", { name: R.item.name })), X("files.api.failed", {
529
+ S.error(e instanceof Error ? e.message : a(d, "files.file.errors.copyFailed", "Failed to copy \"{{name}}\"", { name: L.item.name })), X("files.api.failed", {
530
530
  action: "copyFile",
531
- fileId: R.item.id,
531
+ fileId: L.item.id,
532
532
  message: e instanceof Error ? e.message : void 0
533
533
  });
534
534
  }
535
- }, Nn = async () => {
536
- if (!(!z || !V.trim())) try {
537
- let e = z.name, t = V.trim();
538
- z.type === "file" ? (await Q.mutateAsync({
539
- fileId: z.id,
535
+ }, Fn = async () => {
536
+ if (!(!R || !B.trim())) try {
537
+ let e = R.name, t = B.trim();
538
+ R.type === "file" ? (await Q.mutateAsync({
539
+ fileId: R.id,
540
540
  newName: t
541
- }), b.success(a(u, "files.file.rename.success", "Renamed \"{{name}}\"", { name: t })), X("files.file.renamed", {
542
- fileId: z.id,
541
+ }), S.success(a(d, "files.file.rename.success", "Renamed \"{{name}}\"", { name: t })), X("files.file.renamed", {
542
+ fileId: R.id,
543
543
  previousName: e,
544
544
  name: t
545
545
  })) : (await $.mutateAsync({
546
- folderId: z.id,
546
+ folderId: R.id,
547
547
  newName: t
548
- }), b.success(a(u, "files.folder.rename.success", "Renamed \"{{name}}\"", { name: t })), X("files.folder.renamed", {
549
- folderId: z.id,
548
+ }), S.success(a(d, "files.folder.rename.success", "Renamed \"{{name}}\"", { name: t })), X("files.folder.renamed", {
549
+ folderId: R.id,
550
550
  previousName: e,
551
551
  name: t
552
- })), N(!1), B(null), H("");
552
+ })), M(!1), z(null), V("");
553
553
  } catch (e) {
554
- b.error(e instanceof Error ? e.message : a(u, "files.item.errors.renameFailed", "Failed to rename {{type}}", { type: z.type })), X("files.api.failed", {
555
- action: z.type === "file" ? "renameFile" : "renameFolder",
556
- itemId: z.id,
557
- itemType: z.type,
554
+ S.error(e instanceof Error ? e.message : a(d, "files.item.errors.renameFailed", "Failed to rename {{type}}", { type: R.type })), X("files.api.failed", {
555
+ action: R.type === "file" ? "renameFile" : "renameFolder",
556
+ itemId: R.id,
557
+ itemType: R.type,
558
558
  message: e instanceof Error ? e.message : void 0
559
559
  });
560
560
  }
561
561
  };
562
562
  return n({
563
- files: E,
564
- folders: D,
565
- onFilePreview: un,
566
- onFileDelete: mn,
567
- onFolderOpen: Cn,
568
- onFolderDelete: wn,
569
- activeTab: _
570
- }), p === void 0 ? /* @__PURE__ */ l("div", {
563
+ files: T,
564
+ folders: E,
565
+ onFilePreview: fn,
566
+ onFileDelete: gn,
567
+ onFolderOpen: Tn,
568
+ onFolderDelete: En,
569
+ activeTab: v
570
+ }), m === void 0 ? /* @__PURE__ */ l("div", {
571
571
  className: "flex flex-col items-center justify-center min-h-[60vh] gap-3 text-center px-6",
572
572
  children: [/* @__PURE__ */ c(s, { className: "size-8 animate-spin text-text-tertiary" }), /* @__PURE__ */ c("p", {
573
573
  className: "text-sm text-text-secondary max-w-md",
574
- children: a(u, "files.browser.workspace.waiting", "Waiting for workspace context. If this persists, the app shell may not have provided a workspaceId to the Files module. Try reloading the page or switching workspaces.")
574
+ children: a(d, "files.browser.workspace.waiting", "Waiting for workspace context. If this persists, the app shell may not have provided a workspaceId to the Files module. Try reloading the page or switching workspaces.")
575
575
  })]
576
- }) : p === "" ? /* @__PURE__ */ l("div", {
576
+ }) : m === "" ? /* @__PURE__ */ l("div", {
577
577
  className: "flex flex-col items-center justify-center min-h-[60vh] gap-3 text-center px-6",
578
578
  children: [/* @__PURE__ */ c(Ge, { className: "size-8 text-text-tertiary" }), /* @__PURE__ */ c("p", {
579
579
  className: "text-sm text-text-secondary max-w-md",
580
- children: a(u, "files.browser.workspace.notSelected", "No workspace selected. Please select a workspace to view files.")
580
+ children: a(d, "files.browser.workspace.notSelected", "No workspace selected. Please select a workspace to view files.")
581
581
  })]
582
582
  }) : /* @__PURE__ */ l("div", {
583
583
  className: "min-h-screen bg-bg-surface",
584
584
  children: [
585
585
  /* @__PURE__ */ c("div", {
586
- className: "bg-bg-surface border-b border-border-default px-4 py-3 sm:px-6 sm:py-4",
586
+ className: "bg-bg-surface border-b border-border-seam px-4 py-3 sm:px-6 sm:py-4",
587
587
  "data-tour": "files-breadcrumb-nav",
588
588
  children: /* @__PURE__ */ c("div", {
589
589
  className: "flex items-center gap-2 sm:gap-4",
@@ -591,22 +591,22 @@ function u() {
591
591
  className: "flex items-center gap-1 sm:gap-2 text-sm overflow-x-auto",
592
592
  children: [/* @__PURE__ */ l("button", {
593
593
  type: "button",
594
- onClick: () => f("/files/browse"),
594
+ onClick: () => p("/files/browse"),
595
595
  className: "flex items-center gap-1 text-text-primary hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap",
596
- title: a(u, "files.browser.actions.goToRoot", "Go to root"),
596
+ title: a(d, "files.browser.actions.goToRoot", "Go to root"),
597
597
  children: [/* @__PURE__ */ c(qe, { className: "size-4" }), /* @__PURE__ */ c("span", {
598
598
  className: "hidden sm:inline",
599
- children: a(u, "files.browser.rootLabel", "My Drive")
599
+ children: a(d, "files.browser.rootLabel", "My Drive")
600
600
  })]
601
- }), mt.map((e, t) => /* @__PURE__ */ l("div", {
601
+ }), ht.map((e, t) => /* @__PURE__ */ l("div", {
602
602
  className: "flex items-center gap-1 sm:gap-2",
603
603
  children: [/* @__PURE__ */ c("span", {
604
604
  className: "text-text-tertiary",
605
605
  children: "/"
606
606
  }), /* @__PURE__ */ c("button", {
607
607
  type: "button",
608
- onClick: () => f(`/files/browse/${e.id}`),
609
- className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap ${t === mt.length - 1 ? "text-text-primary font-medium" : "text-text-secondary"}`,
608
+ onClick: () => p(`/files/browse/${e.id}`),
609
+ className: `hover:bg-action-ghost-bg-hover px-2 py-1 rounded transition-colors duration-200 whitespace-nowrap ${t === ht.length - 1 ? "text-text-primary font-medium" : "text-text-secondary"}`,
610
610
  title: `Go to ${e.name}`,
611
611
  children: e.name
612
612
  })]
@@ -617,13 +617,13 @@ function u() {
617
617
  /* @__PURE__ */ c("div", {
618
618
  "data-tour": "files-tab-bar",
619
619
  children: /* @__PURE__ */ c(Ce, {
620
- activeTab: _,
621
- onTabChange: ht,
622
- tabs: gt
620
+ activeTab: v,
621
+ onTabChange: gt,
622
+ tabs: _t
623
623
  })
624
624
  }),
625
625
  /* @__PURE__ */ l("div", {
626
- className: "bg-bg-surface border-b border-border-default px-4 py-2 sm:px-6 sm:py-3",
626
+ className: "bg-bg-surface border-b border-border-seam px-4 py-2 sm:px-6 sm:py-3",
627
627
  children: [
628
628
  /* @__PURE__ */ l("div", {
629
629
  className: "flex flex-col sm:flex-row items-start sm:items-center justify-between gap-2 sm:gap-inline-gap",
@@ -636,357 +636,342 @@ function u() {
636
636
  onSearch: (e, t) => {
637
637
  vt(e), bt(t);
638
638
  },
639
- placeholder: a(u, "files.search.input.placeholder", "Search files and folders..."),
640
- initialQuery: _t,
639
+ placeholder: a(d, "files.search.input.placeholder", "Search files and folders..."),
640
+ initialQuery: y,
641
641
  showFilters: !0
642
642
  })
643
643
  })
644
644
  }), /* @__PURE__ */ l("div", {
645
645
  className: "flex items-center gap-2 order-1 sm:order-2 w-full sm:w-auto justify-between sm:justify-end",
646
- children: [
647
- !v && (E.length > 0 || D.length > 0) && /* @__PURE__ */ c("button", {
648
- type: "button",
649
- onClick: () => {
650
- let e = E.map((e) => e.id), n = D.map((e) => e.id);
651
- t.getState().selectAllFiles(e), n.forEach((e) => t.getState().selectFolder(e));
646
+ children: [!b && /* @__PURE__ */ c("div", {
647
+ "data-tour": "files-upload-files-button",
648
+ children: /* @__PURE__ */ c(rt, {
649
+ primary: {
650
+ label: W ? a(d, "files.browser.upload.uploading", "Uploading...") : a(d, "files.browser.actions.uploadFiles", "Upload Files"),
651
+ onSelect: nn,
652
+ disabled: W,
653
+ icon: W ? /* @__PURE__ */ c(s, { className: "size-4 animate-spin" }) : /* @__PURE__ */ c(Ze, { className: "size-4" })
652
654
  },
653
- className: "flex items-center gap-2 px-3 py-2 text-sm font-medium text-text-primary bg-bg-surface border border-border-default rounded-lg hover:bg-action-ghost-bg-hover hover:border-border-default transition-all duration-200",
654
- children: a(u, "files.browser.actions.selectAll", "Select All")
655
- }),
656
- !v && /* @__PURE__ */ l($e, { children: [
657
- /* @__PURE__ */ l("button", {
658
- type: "button",
659
- onClick: cn,
660
- className: "flex items-center gap-1 sm:gap-2 px-2 sm:px-4 py-2 text-xs sm:text-sm font-medium text-text-primary bg-bg-surface border border-border-default rounded-lg hover:bg-action-ghost-bg-hover hover:border-border-default transition-all duration-200 shadow-sm",
661
- "data-tour": "files-new-folder-button",
662
- children: [/* @__PURE__ */ c(Ue, { className: "size-4" }), /* @__PURE__ */ c("span", {
663
- className: "hidden sm:inline",
664
- children: a(u, "files.browser.actions.newFolder", "New Folder")
665
- })]
666
- }),
667
- /* @__PURE__ */ c("button", {
668
- type: "button",
669
- onClick: en,
670
- disabled: It,
671
- className: "flex items-center gap-1 sm:gap-2 px-2 sm:px-4 py-2 text-xs sm:text-sm font-medium text-text-primary bg-bg-surface border border-border-default rounded-lg hover:bg-action-ghost-bg-hover hover:border-border-default transition-all duration-200 shadow-sm disabled:opacity-50 disabled:cursor-not-allowed",
672
- "data-tour": "files-upload-files-button",
673
- children: It ? /* @__PURE__ */ l($e, { children: [/* @__PURE__ */ c(s, { className: "size-4 animate-spin" }), /* @__PURE__ */ c("span", {
674
- className: "hidden sm:inline",
675
- children: a(u, "files.browser.upload.uploading", "Uploading...")
676
- })] }) : /* @__PURE__ */ l($e, { children: [/* @__PURE__ */ c(Ze, { className: "size-4" }), /* @__PURE__ */ c("span", {
677
- className: "hidden sm:inline",
678
- children: a(u, "files.browser.actions.uploadFiles", "Upload Files")
679
- })] })
680
- }),
681
- /* @__PURE__ */ l("button", {
682
- type: "button",
683
- onClick: sn,
684
- disabled: It,
685
- className: "hidden sm:flex items-center gap-2 px-4 py-2.5 text-sm font-medium text-text-primary bg-bg-surface border border-border-default rounded-lg hover:bg-action-ghost-bg-hover hover:border-border-default transition-all duration-200 shadow-sm disabled:opacity-50 disabled:cursor-not-allowed",
686
- title: a(u, "files.browser.actions.uploadFolderTitle", "Upload entire folder with structure"),
687
- children: [/* @__PURE__ */ c(We, { className: "size-4" }), a(u, "files.browser.actions.uploadFolder", "Upload Folder")]
688
- })
689
- ] }),
690
- /* @__PURE__ */ l("div", {
691
- className: "flex items-center border border-border-default rounded-lg overflow-hidden",
692
- "data-tour": "files-view-mode-toggle",
693
- children: [/* @__PURE__ */ c("button", {
694
- type: "button",
695
- onClick: () => pt("grid"),
696
- className: `p-2 transition-colors duration-200 ${ft === "grid" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
697
- "aria-label": a(u, "files.browser.view.grid", "Grid view"),
698
- children: /* @__PURE__ */ c(Ke, { className: "size-5" })
699
- }), /* @__PURE__ */ c("button", {
700
- type: "button",
701
- onClick: () => pt("list"),
702
- className: `p-2 transition-colors duration-200 ${ft === "list" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
703
- "aria-label": a(u, "files.browser.view.list", "List view"),
704
- children: /* @__PURE__ */ c(Je, { className: "size-5" })
705
- })]
655
+ actions: [
656
+ {
657
+ label: a(d, "files.browser.actions.newFolder", "New Folder"),
658
+ icon: /* @__PURE__ */ c(Ue, { className: "size-4" }),
659
+ onSelect: un
660
+ },
661
+ {
662
+ label: a(d, "files.browser.actions.uploadFolder", "Upload Folder"),
663
+ icon: /* @__PURE__ */ c(We, { className: "size-4" }),
664
+ onSelect: ln,
665
+ disabled: W
666
+ },
667
+ ...T.length > 0 || E.length > 0 ? [{
668
+ label: a(d, "files.browser.actions.selectAll", "Select All"),
669
+ onSelect: () => {
670
+ let e = T.map((e) => e.id), n = E.map((e) => e.id);
671
+ t.getState().selectAllFiles(e), n.forEach((e) => t.getState().selectFolder(e));
672
+ }
673
+ }] : []
674
+ ]
706
675
  })
707
- ]
676
+ }), /* @__PURE__ */ l("div", {
677
+ className: "flex items-center border border-border-seam rounded-lg overflow-hidden",
678
+ "data-tour": "files-view-mode-toggle",
679
+ children: [/* @__PURE__ */ c("button", {
680
+ type: "button",
681
+ onClick: () => mt("grid"),
682
+ className: `p-2 transition-colors duration-200 ${pt === "grid" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
683
+ "aria-label": a(d, "files.browser.view.grid", "Grid view"),
684
+ children: /* @__PURE__ */ c(Ke, { className: "size-5" })
685
+ }), /* @__PURE__ */ c("button", {
686
+ type: "button",
687
+ onClick: () => mt("list"),
688
+ className: `p-2 transition-colors duration-200 ${pt === "list" ? "bg-bg-accent text-text-link" : "text-text-secondary hover:bg-action-ghost-bg-hover"}`,
689
+ "aria-label": a(d, "files.browser.view.list", "List view"),
690
+ children: /* @__PURE__ */ c(Je, { className: "size-5" })
691
+ })]
692
+ })]
708
693
  })]
709
694
  }),
710
- v && /* @__PURE__ */ l("div", {
695
+ b && /* @__PURE__ */ l("div", {
711
696
  className: "mt-3 flex items-center justify-between p-3 bg-status-success-bg-subtle rounded-lg border border-status-success-border transition-all duration-200",
712
697
  children: [/* @__PURE__ */ l("span", {
713
698
  className: "text-sm font-medium text-status-success-text",
714
- children: [a(u, "files.browser.search.showingResults", "Showing search results for \"{{query}}\"", { query: _t }), T.data && ` (${(T.data.files?.length || 0) + (T.data.folders?.length || 0)} items)`]
699
+ children: [a(d, "files.browser.search.showingResults", "Showing search results for \"{{query}}\"", { query: y }), w.data && ` (${(w.data.files?.length || 0) + (w.data.folders?.length || 0)} items)`]
715
700
  }), /* @__PURE__ */ l("button", {
716
701
  type: "button",
717
702
  onClick: () => vt(""),
718
703
  className: "flex items-center gap-2 text-status-success-text hover:text-status-success-text/80 text-sm font-medium transition-colors duration-200",
719
- children: [/* @__PURE__ */ c(Qe, { className: "size-4" }), a(u, "files.browser.search.clear", "Clear search")]
704
+ children: [/* @__PURE__ */ c(Qe, { className: "size-4" }), a(d, "files.browser.search.clear", "Clear search")]
720
705
  })]
721
706
  }),
722
- j > 0 && /* @__PURE__ */ l("div", {
723
- className: "mt-3 flex items-center justify-between p-3 bg-bg-accent rounded-lg border border-action-primary-border transition-all duration-200",
707
+ A > 0 && /* @__PURE__ */ l(it, {
708
+ className: "mt-3 flex items-center justify-between p-3",
724
709
  children: [/* @__PURE__ */ l("div", {
725
710
  className: "flex items-center gap-4",
726
711
  children: [/* @__PURE__ */ c("span", {
727
712
  className: "text-sm font-medium text-text-primary",
728
- children: a(u, "files.browser.selection.selectedCount", "{{count}} item{{suffix}} selected", {
729
- count: j,
730
- suffix: j > 1 ? "s" : ""
713
+ children: a(d, "files.browser.selection.selectedCount", "{{count}} item{{suffix}} selected", {
714
+ count: A,
715
+ suffix: A > 1 ? "s" : ""
731
716
  })
732
717
  }), /* @__PURE__ */ c("div", {
733
718
  className: "flex items-center gap-2",
734
- children: _ === "bin" ? /* @__PURE__ */ l($e, { children: [/* @__PURE__ */ c("button", {
719
+ children: v === "bin" ? /* @__PURE__ */ l($e, { children: [/* @__PURE__ */ c("button", {
735
720
  type: "button",
736
721
  onClick: async () => {
737
722
  try {
738
- await Promise.all([...Array.from(m).map((e) => Ut.mutateAsync({ id: e })), ...Array.from(h).map((e) => Wt.mutateAsync({ id: e }))]), g(), b.success(`${j} item${j > 1 ? "s" : ""} restored`);
723
+ await Promise.all([...Array.from(h).map((e) => Gt.mutateAsync({ id: e })), ...Array.from(g).map((e) => Kt.mutateAsync({ id: e }))]), _(), S.success(`${A} item${A > 1 ? "s" : ""} restored`);
739
724
  } catch (e) {
740
- b.error(e instanceof Error ? e.message : "Failed to restore some items");
725
+ S.error(e instanceof Error ? e.message : "Failed to restore some items");
741
726
  }
742
727
  },
743
728
  className: "flex items-center gap-1.5 rounded-lg border border-status-success-border bg-bg-surface px-3 py-1.5 text-sm font-medium text-status-success-text transition-colors duration-200 hover:bg-status-success-bg-subtle",
744
- children: a(u, "files.browser.selection.actions.restore", "Restore")
729
+ children: a(d, "files.browser.selection.actions.restore", "Restore")
745
730
  }), /* @__PURE__ */ l("button", {
746
731
  type: "button",
747
732
  onClick: async () => {
748
733
  Y({
749
- title: a(u, "files.confirm.bulkPermanentDelete.title", "Permanently delete selected items"),
750
- description: a(u, "files.confirm.bulkPermanentDelete.description", "Permanently delete {{count}} selected item{{plural}}? This cannot be undone.", {
751
- count: j,
752
- plural: j > 1 ? "s" : ""
734
+ title: a(d, "files.confirm.bulkPermanentDelete.title", "Permanently delete selected items"),
735
+ description: a(d, "files.confirm.bulkPermanentDelete.description", "Permanently delete {{count}} selected item{{plural}}? This cannot be undone.", {
736
+ count: A,
737
+ plural: A > 1 ? "s" : ""
753
738
  }),
754
- confirmLabel: a(u, "files.common.actions.deletePermanently", "Delete permanently"),
739
+ confirmLabel: a(d, "files.common.actions.deletePermanently", "Delete permanently"),
755
740
  variant: "danger",
756
741
  onConfirm: async () => {
757
742
  try {
758
- await Promise.all([...Array.from(m).map((e) => Gt.mutateAsync({ id: e })), ...Array.from(h).map((e) => Kt.mutateAsync({ id: e }))]), g(), b.success(a(u, "files.bulk.permanentDelete.success", "{{count}} item{{plural}} deleted permanently", {
759
- count: j,
760
- plural: j > 1 ? "s" : ""
743
+ await Promise.all([...Array.from(h).map((e) => qt.mutateAsync({ id: e })), ...Array.from(g).map((e) => Jt.mutateAsync({ id: e }))]), _(), S.success(a(d, "files.bulk.permanentDelete.success", "{{count}} item{{plural}} deleted permanently", {
744
+ count: A,
745
+ plural: A > 1 ? "s" : ""
761
746
  }));
762
747
  } catch (e) {
763
- b.error(e instanceof Error ? e.message : a(u, "files.bulk.errors.permanentDeleteFailed", "Failed to permanently delete some items"));
748
+ S.error(e instanceof Error ? e.message : a(d, "files.bulk.errors.permanentDeleteFailed", "Failed to permanently delete some items"));
764
749
  }
765
750
  }
766
751
  });
767
752
  },
768
753
  className: "flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-status-error-text bg-bg-surface border border-status-error-border rounded-lg hover:bg-status-error-bg-subtle transition-colors duration-200",
769
- children: [/* @__PURE__ */ c(Xe, { className: "size-4" }), a(u, "files.browser.selection.actions.deletePermanently", "Delete permanently")]
754
+ children: [/* @__PURE__ */ c(Xe, { className: "size-4" }), a(d, "files.browser.selection.actions.deletePermanently", "Delete permanently")]
770
755
  })] }) : /* @__PURE__ */ l("button", {
771
756
  type: "button",
772
757
  onClick: async () => {
773
758
  Y({
774
- title: a(u, "files.confirm.bulkDelete.title", "Delete selected items"),
775
- description: a(u, "files.confirm.bulkDelete.description", "Move {{count}} selected item{{plural}} to the bin?", {
776
- count: j,
777
- plural: j > 1 ? "s" : ""
759
+ title: a(d, "files.confirm.bulkDelete.title", "Delete selected items"),
760
+ description: a(d, "files.confirm.bulkDelete.description", "Move {{count}} selected item{{plural}} to the bin?", {
761
+ count: A,
762
+ plural: A > 1 ? "s" : ""
778
763
  }),
779
- confirmLabel: a(u, "files.common.actions.delete", "Delete"),
764
+ confirmLabel: a(d, "files.common.actions.delete", "Delete"),
780
765
  variant: "danger",
781
766
  onConfirm: async () => {
782
767
  try {
783
- let e = Array.from(m), t = Array.from(h);
784
- e.length > 0 && await $t.mutateAsync(e), await Promise.all(t.map((e) => Ht.mutateAsync({
768
+ let e = Array.from(h), t = Array.from(g);
769
+ e.length > 0 && await tn.mutateAsync(e), await Promise.all(t.map((e) => Wt.mutateAsync({
785
770
  id: e,
786
771
  recursive: !0
787
- }))), g(), b.success(a(u, "files.bulk.delete.success", "{{count}} item{{plural}} moved to bin", {
788
- count: j,
789
- plural: j > 1 ? "s" : ""
772
+ }))), _(), S.success(a(d, "files.bulk.delete.success", "{{count}} item{{plural}} moved to bin", {
773
+ count: A,
774
+ plural: A > 1 ? "s" : ""
790
775
  }));
791
776
  } catch (e) {
792
- b.error(e instanceof Error ? e.message : a(u, "files.bulk.errors.deleteFailed", "Failed to delete some items"));
777
+ S.error(e instanceof Error ? e.message : a(d, "files.bulk.errors.deleteFailed", "Failed to delete some items"));
793
778
  }
794
779
  }
795
780
  });
796
781
  },
797
782
  className: "flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-status-error-text bg-bg-surface border border-status-error-border rounded-lg hover:bg-status-error-bg-subtle transition-colors duration-200",
798
- children: [/* @__PURE__ */ c(Xe, { className: "size-4" }), a(u, "files.browser.selection.actions.delete", "Delete")]
783
+ children: [/* @__PURE__ */ c(Xe, { className: "size-4" }), a(d, "files.browser.selection.actions.delete", "Delete")]
799
784
  })
800
785
  })]
801
786
  }), /* @__PURE__ */ l("button", {
802
787
  type: "button",
803
- onClick: g,
788
+ onClick: _,
804
789
  className: "flex items-center gap-2 text-text-link hover:text-action-primary-bg-hover text-sm font-medium transition-colors duration-200",
805
- children: [/* @__PURE__ */ c(Qe, { className: "size-4" }), a(u, "files.common.actions.clear", "Clear")]
790
+ children: [/* @__PURE__ */ c(Qe, { className: "size-4" }), a(d, "files.common.actions.clear", "Clear")]
806
791
  })]
807
792
  })
808
793
  ]
809
794
  }),
810
- (dt.isExhausted || dt.isNearLimit) && /* @__PURE__ */ c("div", {
795
+ (ft.isExhausted || ft.isNearLimit) && /* @__PURE__ */ c("div", {
811
796
  className: "px-4 sm:px-6 pt-3",
812
- children: /* @__PURE__ */ c(Pe, { quota: dt })
797
+ children: /* @__PURE__ */ c(Pe, { quota: ft })
813
798
  }),
814
799
  /* @__PURE__ */ l("div", {
815
800
  className: "px-2 sm:px-4 md:px-6 py-3 sm:py-4",
816
801
  "data-tour": "files-browser-grid",
817
802
  children: [/* @__PURE__ */ c(Se, {
818
- files: E,
819
- folders: D,
820
- loading: O,
821
- error: k,
822
- preserveSortOrder: A,
823
- onFilePreview: un,
824
- onFileShare: _ === "bin" ? void 0 : dn,
825
- onFileDelete: _ === "bin" ? gn : mn,
826
- onFileRestore: _ === "bin" ? hn : void 0,
827
- onFileFavorite: _ === "bin" ? void 0 : _n,
828
- onFileRename: _ === "bin" ? void 0 : vn,
829
- onFileDownload: yn,
830
- onFileCopy: _ === "bin" ? void 0 : bn,
831
- onFileMove: _ === "bin" ? void 0 : xn,
832
- onFileInfo: Sn,
833
- onFolderOpen: Cn,
834
- onFolderShare: _ === "bin" ? void 0 : fn,
835
- onFolderDelete: _ === "bin" ? En : wn,
836
- onFolderRestore: _ === "bin" ? Tn : void 0,
837
- onFolderRename: _ === "bin" ? void 0 : Dn,
838
- onFolderFavorite: _ === "bin" ? void 0 : kn,
839
- onFolderMove: _ === "bin" ? void 0 : On,
840
- onFolderInfo: An
841
- }), !O && (E.length > 0 || D.length > 0) && /* @__PURE__ */ l("div", {
803
+ files: T,
804
+ folders: E,
805
+ loading: D,
806
+ error: O,
807
+ preserveSortOrder: k,
808
+ onFilePreview: fn,
809
+ onFileShare: v === "bin" ? void 0 : pn,
810
+ onFileDelete: v === "bin" ? vn : gn,
811
+ onFileRestore: v === "bin" ? _n : void 0,
812
+ onFileFavorite: v === "bin" ? void 0 : yn,
813
+ onFileRename: v === "bin" ? void 0 : bn,
814
+ onFileDownload: xn,
815
+ onFileCopy: v === "bin" ? void 0 : Sn,
816
+ onFileMove: v === "bin" ? void 0 : Cn,
817
+ onFileInfo: wn,
818
+ onFolderOpen: Tn,
819
+ onFolderShare: v === "bin" ? void 0 : mn,
820
+ onFolderDelete: v === "bin" ? On : En,
821
+ onFolderRestore: v === "bin" ? Dn : void 0,
822
+ onFolderRename: v === "bin" ? void 0 : kn,
823
+ onFolderFavorite: v === "bin" ? void 0 : jn,
824
+ onFolderMove: v === "bin" ? void 0 : An,
825
+ onFolderInfo: Mn
826
+ }), !D && (T.length > 0 || E.length > 0) && /* @__PURE__ */ l("div", {
842
827
  className: "mt-4 px-2 text-sm text-text-secondary",
843
- children: [a(u, "files.browser.results.showingItems", "Showing {{count}} items", { count: E.length + D.length }), !v && _ === "all" && wt !== null && ` ${a(u, "files.browser.results.ofItems", "of {{count}} items", { count: wt })}`]
828
+ children: [a(d, "files.browser.results.showingItems", "Showing {{count}} items", { count: T.length + E.length }), !b && v === "all" && Dt !== null && ` ${a(d, "files.browser.results.ofItems", "of {{count}} items", { count: Dt })}`]
844
829
  })]
845
830
  }),
846
- Tt && /* @__PURE__ */ c(at, {
831
+ Ot && /* @__PURE__ */ c(ot, {
847
832
  open: !0,
848
833
  onOpenChange: (e) => {
849
- !e && !Z.isPending && (M(!1), W(""));
834
+ !e && !Z.isPending && (j(!1), U(""));
850
835
  },
851
- children: /* @__PURE__ */ l(ot, {
836
+ children: /* @__PURE__ */ l(st, {
852
837
  className: "w-full max-w-xs",
853
838
  children: [
854
- /* @__PURE__ */ c(ct, {
839
+ /* @__PURE__ */ c(lt, {
855
840
  className: "text-left",
856
- children: /* @__PURE__ */ c(lt, {
841
+ children: /* @__PURE__ */ c(ut, {
857
842
  id: "files-new-folder-title",
858
843
  className: "text-base font-semibold text-text-primary",
859
- children: a(u, "files.browser.newFolderDialog.title", "New folder")
844
+ children: a(d, "files.browser.newFolderDialog.title", "New folder")
860
845
  })
861
846
  }),
862
- /* @__PURE__ */ c(it, {
847
+ /* @__PURE__ */ c(at, {
863
848
  type: "text",
864
- value: U,
865
- onChange: (e) => W(e.target.value),
849
+ value: H,
850
+ onChange: (e) => U(e.target.value),
866
851
  onKeyDown: (e) => {
867
- e.key === "Enter" && ln();
852
+ e.key === "Enter" && dn();
868
853
  },
869
- "aria-label": a(u, "files.browser.newFolderDialog.title", "New folder"),
870
- placeholder: a(u, "files.browser.newFolderDialog.placeholder", "Folder name")
854
+ "aria-label": a(d, "files.browser.newFolderDialog.title", "New folder"),
855
+ placeholder: a(d, "files.browser.newFolderDialog.placeholder", "Folder name")
871
856
  }),
872
- /* @__PURE__ */ l(st, { children: [/* @__PURE__ */ c(rt, {
857
+ /* @__PURE__ */ l(ct, { children: [/* @__PURE__ */ c(u, {
873
858
  type: "button",
874
859
  variant: "outline",
875
860
  onClick: () => {
876
- M(!1), W("");
861
+ j(!1), U("");
877
862
  },
878
- children: a(u, "files.common.actions.cancel", "Cancel")
879
- }), /* @__PURE__ */ l(rt, {
863
+ children: a(d, "files.common.actions.cancel", "Cancel")
864
+ }), /* @__PURE__ */ l(u, {
880
865
  type: "button",
881
- onClick: ln,
882
- disabled: !U.trim() || Z.isPending,
883
- children: [Z.isPending && /* @__PURE__ */ c(s, { className: "size-4 animate-spin" }), Z.isPending ? a(u, "files.browser.newFolderDialog.actions.creating", "Creating...") : a(u, "files.common.actions.create", "Create")]
866
+ onClick: dn,
867
+ disabled: !H.trim() || Z.isPending,
868
+ children: [Z.isPending && /* @__PURE__ */ c(s, { className: "size-4 animate-spin" }), Z.isPending ? a(d, "files.browser.newFolderDialog.actions.creating", "Creating...") : a(d, "files.common.actions.create", "Create")]
884
869
  })] })
885
870
  ]
886
871
  })
887
872
  }),
888
- Ot && z && /* @__PURE__ */ c(at, {
873
+ jt && R && /* @__PURE__ */ c(ot, {
889
874
  open: !0,
890
875
  onOpenChange: (e) => {
891
- !e && !Q.isPending && !$.isPending && (N(!1), B(null), H(""));
876
+ !e && !Q.isPending && !$.isPending && (M(!1), z(null), V(""));
892
877
  },
893
- children: /* @__PURE__ */ l(ot, {
878
+ children: /* @__PURE__ */ l(st, {
894
879
  className: "w-full max-w-xs",
895
880
  children: [
896
- /* @__PURE__ */ c(ct, {
881
+ /* @__PURE__ */ c(lt, {
897
882
  className: "text-left",
898
- children: /* @__PURE__ */ c(lt, {
883
+ children: /* @__PURE__ */ c(ut, {
899
884
  id: "files-rename-title",
900
885
  className: "text-base font-semibold text-text-primary",
901
- children: a(u, "files.browser.renameDialog.title", "Rename {{type}}", { type: z.type })
886
+ children: a(d, "files.browser.renameDialog.title", "Rename {{type}}", { type: R.type })
902
887
  })
903
888
  }),
904
- /* @__PURE__ */ c(it, {
889
+ /* @__PURE__ */ c(at, {
905
890
  type: "text",
906
- value: V,
907
- onChange: (e) => H(e.target.value),
891
+ value: B,
892
+ onChange: (e) => V(e.target.value),
908
893
  onKeyDown: (e) => {
909
- e.key === "Enter" && Nn();
894
+ e.key === "Enter" && Fn();
910
895
  },
911
- "aria-label": a(u, "files.browser.renameDialog.title", "Rename"),
912
- placeholder: a(u, "files.browser.renameDialog.placeholder", "New name")
896
+ "aria-label": a(d, "files.browser.renameDialog.title", "Rename"),
897
+ placeholder: a(d, "files.browser.renameDialog.placeholder", "New name")
913
898
  }),
914
- /* @__PURE__ */ l(st, { children: [/* @__PURE__ */ c(rt, {
899
+ /* @__PURE__ */ l(ct, { children: [/* @__PURE__ */ c(u, {
915
900
  type: "button",
916
901
  variant: "outline",
917
902
  onClick: () => {
918
- N(!1), B(null), H("");
903
+ M(!1), z(null), V("");
919
904
  },
920
- children: a(u, "files.common.actions.cancel", "Cancel")
921
- }), /* @__PURE__ */ l(rt, {
905
+ children: a(d, "files.common.actions.cancel", "Cancel")
906
+ }), /* @__PURE__ */ l(u, {
922
907
  type: "button",
923
- onClick: Nn,
924
- disabled: !V.trim() || V.trim() === z.name || Q.isPending || $.isPending,
925
- children: [(Q.isPending || $.isPending) && /* @__PURE__ */ c(s, { className: "size-4 animate-spin" }), Q.isPending || $.isPending ? a(u, "files.browser.renameDialog.actions.renaming", "Renaming...") : a(u, "files.common.actions.rename", "Rename")]
908
+ onClick: Fn,
909
+ disabled: !B.trim() || B.trim() === R.name || Q.isPending || $.isPending,
910
+ children: [(Q.isPending || $.isPending) && /* @__PURE__ */ c(s, { className: "size-4 animate-spin" }), Q.isPending || $.isPending ? a(d, "files.browser.renameDialog.actions.renaming", "Renaming...") : a(d, "files.common.actions.rename", "Rename")]
926
911
  })] })
927
912
  ]
928
913
  })
929
914
  }),
930
- kt && Pt && /* @__PURE__ */ c(we, {
931
- item: Pt,
932
- itemType: "mimeType" in Pt ? "file" : "folder",
915
+ Mt && Lt && /* @__PURE__ */ c(we, {
916
+ item: Lt,
917
+ itemType: "mimeType" in Lt ? "file" : "folder",
933
918
  onClose: () => {
934
- At(!1), F(null);
919
+ N(!1), P(null);
935
920
  },
936
- onCreateShare: pn,
937
- isLoading: Jt.isPending
921
+ onCreateShare: hn,
922
+ isLoading: Xt.isPending
938
923
  }),
939
924
  J && /* @__PURE__ */ c(Me, {
940
925
  title: J.title,
941
926
  description: J.description,
942
927
  confirmLabel: J.confirmLabel,
943
- cancelLabel: a(u, "files.common.actions.cancel", "Cancel"),
928
+ cancelLabel: a(d, "files.common.actions.cancel", "Cancel"),
944
929
  variant: J.variant,
945
930
  loading: J.loading,
946
- onConfirm: zt,
931
+ onConfirm: Vt,
947
932
  onCancel: () => {
948
933
  J.loading || Y(null);
949
934
  }
950
935
  }),
951
- Et && /* @__PURE__ */ c(Me, {
952
- title: a(u, "files.folder.quota.title", "Folder Limit Reached"),
953
- description: a(u, "files.folder.quota.description", "You've reached the folder limit for your plan. Upgrade your plan or purchase an add-on to create more folders."),
954
- confirmLabel: a(u, "files.folder.quota.upgrade", "View Billing"),
955
- cancelLabel: a(u, "files.common.actions.dismiss", "Dismiss"),
936
+ kt && /* @__PURE__ */ c(Me, {
937
+ title: a(d, "files.folder.quota.title", "Folder Limit Reached"),
938
+ description: a(d, "files.folder.quota.description", "You've reached the folder limit for your plan. Upgrade your plan or purchase an add-on to create more folders."),
939
+ confirmLabel: a(d, "files.folder.quota.upgrade", "View Billing"),
940
+ cancelLabel: a(d, "files.common.actions.dismiss", "Dismiss"),
956
941
  onConfirm: () => {
957
- Dt(!1), f("/billing");
942
+ At(!1), p("/billing");
958
943
  },
959
- onCancel: () => Dt(!1)
944
+ onCancel: () => At(!1)
960
945
  }),
961
- jt && I && /* @__PURE__ */ c(Ae, {
962
- item: I.item,
963
- type: I.type,
946
+ Nt && F && /* @__PURE__ */ c(Ae, {
947
+ item: F.item,
948
+ type: F.type,
964
949
  onClose: () => {
965
- P(!1), L(null);
950
+ Pt(!1), I(null);
966
951
  },
967
- onMove: jn,
968
- isLoading: Zt.isPending || Qt.isPending
952
+ onMove: Nn,
953
+ isLoading: $t.isPending || en.isPending
969
954
  }),
970
- Mt && R && /* @__PURE__ */ c(je, {
971
- item: R.item,
972
- type: R.type,
955
+ Ft && L && /* @__PURE__ */ c(je, {
956
+ item: L.item,
957
+ type: L.type,
973
958
  onClose: () => {
974
- Nt(!1), Ft(null);
959
+ It(!1), Rt(null);
975
960
  },
976
- onCopy: Mn,
977
- isLoading: Xt.isPending
961
+ onCopy: Pn,
962
+ isLoading: Qt.isPending
978
963
  }),
979
- y && /* @__PURE__ */ c(Te, {
980
- file: y,
964
+ x && /* @__PURE__ */ c(Te, {
965
+ file: x,
981
966
  onClose: () => Ct(null),
982
967
  onDownload: () => {
983
- ze(y.downloadUrl || y.url);
968
+ ze(x.downloadUrl || x.url);
984
969
  },
985
- onShare: _ === "bin" ? void 0 : () => {
986
- F(y), At(!0);
970
+ onShare: v === "bin" ? void 0 : () => {
971
+ P(x), N(!0);
987
972
  },
988
- onStar: _ === "bin" ? void 0 : () => _n(y),
989
- onDelete: () => _ === "bin" ? gn(y) : mn(y)
973
+ onStar: v === "bin" ? void 0 : () => yn(x),
974
+ onDelete: () => v === "bin" ? vn(x) : gn(x)
990
975
  }),
991
976
  xt && /* @__PURE__ */ c(Ee, {
992
977
  item: xt.item,
@@ -994,21 +979,21 @@ function u() {
994
979
  onClose: () => St(null)
995
980
  }),
996
981
  /* @__PURE__ */ c(Ne, {
997
- items: Lt,
998
- isOpen: Rt,
982
+ items: zt,
983
+ isOpen: Bt,
999
984
  onClose: () => q(!1),
1000
- onPause: nn,
1001
- onResume: rn,
1002
- onRetry: an,
1003
- onCancel: on
985
+ onPause: an,
986
+ onResume: on,
987
+ onRetry: sn,
988
+ onCancel: cn
1004
989
  }),
1005
990
  /* @__PURE__ */ c(Oe, {
1006
- toasts: b.toasts,
1007
- onClose: b.removeToast
991
+ toasts: S.toasts,
992
+ onClose: S.removeToast
1008
993
  }),
1009
- !O && E.length === 0 && D.length === 0 && /* @__PURE__ */ c("div", {
994
+ !D && T.length === 0 && E.length === 0 && /* @__PURE__ */ c("div", {
1010
995
  className: "px-6 py-12",
1011
- children: v ? /* @__PURE__ */ l("div", {
996
+ children: b ? /* @__PURE__ */ l("div", {
1012
997
  className: "text-center animate-in fade-in duration-200",
1013
998
  children: [
1014
999
  /* @__PURE__ */ c("div", {
@@ -1017,11 +1002,11 @@ function u() {
1017
1002
  }),
1018
1003
  /* @__PURE__ */ c("h3", {
1019
1004
  className: "text-lg font-medium text-text-primary mb-2",
1020
- children: a(u, "files.browser.empty.search.title", "No results found")
1005
+ children: a(d, "files.browser.empty.search.title", "No results found")
1021
1006
  }),
1022
1007
  /* @__PURE__ */ c("p", {
1023
1008
  className: "text-sm text-text-secondary mb-4",
1024
- children: a(u, "files.browser.empty.search.description", "Try adjusting your search query or filters")
1009
+ children: a(d, "files.browser.empty.search.description", "Try adjusting your search query or filters")
1025
1010
  }),
1026
1011
  /* @__PURE__ */ c("button", {
1027
1012
  type: "button",
@@ -1029,19 +1014,19 @@ function u() {
1029
1014
  vt(""), bt(void 0);
1030
1015
  },
1031
1016
  className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-text-inverse bg-action-primary-bg rounded-lg hover:bg-action-primary-bg-hover transition-colors duration-200",
1032
- children: a(u, "files.browser.search.clear", "Clear search")
1017
+ children: a(d, "files.browser.search.clear", "Clear search")
1033
1018
  })
1034
1019
  ]
1035
1020
  }) : /* @__PURE__ */ c(De, {
1036
- type: _,
1037
- onUpload: _ === "all" ? en : void 0,
1038
- onNewFolder: _ === "all" ? cn : void 0
1021
+ type: v,
1022
+ onUpload: v === "all" ? nn : void 0,
1023
+ onNewFolder: v === "all" ? un : void 0
1039
1024
  })
1040
1025
  })
1041
1026
  ]
1042
1027
  });
1043
1028
  }
1044
1029
  //#endregion
1045
- export { u as BrowserPage };
1030
+ export { d as BrowserPage };
1046
1031
 
1047
1032
  //# sourceMappingURL=BrowserPage.js.map