@firecms/media_manager 3.1.0 → 3.2.0-canary.44dc65b

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,6 +1,6 @@
1
1
  (function(global, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react-compiler-runtime"), require("react"), require("compressorjs"), require("@firecms/ui"), require("@firecms/formex"), require("@firecms/core"), require("react-router-dom")) : typeof define === "function" && define.amd ? define(["exports", "react/jsx-runtime", "react-compiler-runtime", "react", "compressorjs", "@firecms/ui", "@firecms/formex", "@firecms/core", "react-router-dom"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.FireCMSMediaManager = {}, global.jsxRuntime, global.reactCompilerRuntime, global.react, global.Compressor, global.ui, global.formex, global.core, global.reactRouterDom));
3
- })(this, (function(exports2, jsxRuntime, reactCompilerRuntime, react, Compressor, ui, formex, core, reactRouterDom) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("react/jsx-runtime"), require("react-compiler-runtime"), require("react"), require("compressorjs"), require("@firecms/ui"), require("@firecms/core"), require("@firecms/formex"), require("react-router-dom")) : typeof define === "function" && define.amd ? define(["exports", "react/jsx-runtime", "react-compiler-runtime", "react", "compressorjs", "@firecms/ui", "@firecms/core", "@firecms/formex", "react-router-dom"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.FireCMSMediaManager = {}, global.jsxRuntime, global.reactCompilerRuntime, global.react, global.Compressor, global.ui, global.core, global.formex, global.reactRouterDom));
3
+ })(this, (function(exports2, jsxRuntime, reactCompilerRuntime, react, Compressor, ui, core, formex, reactRouterDom) {
4
4
  "use strict";
5
5
  const MediaManagerContext = react.createContext(void 0);
6
6
  function useMediaManager() {
@@ -551,6 +551,9 @@
551
551
  const [deleting, setDeleting] = react.useState(false);
552
552
  const [deleteDialogOpen, setDeleteDialogOpen] = react.useState(false);
553
553
  const [tagInput, setTagInput] = react.useState("");
554
+ const {
555
+ t
556
+ } = core.useTranslation();
554
557
  const {
555
558
  values,
556
559
  setFieldValue,
@@ -569,12 +572,14 @@
569
572
  await onUpdate(asset.id, values);
570
573
  snackbarController.open({
571
574
  type: "success",
572
- message: "Asset updated successfully"
575
+ message: t("media_asset_updated")
573
576
  });
574
577
  } catch (error) {
575
578
  snackbarController.open({
576
579
  type: "error",
577
- message: `Error updating asset: ${error instanceof Error ? error.message : String(error)}`
580
+ message: t("media_error_updating", {
581
+ message: error instanceof Error ? error.message : String(error)
582
+ })
578
583
  });
579
584
  } finally {
580
585
  setSaving(false);
@@ -586,13 +591,15 @@
586
591
  await onDelete(asset.id);
587
592
  snackbarController.open({
588
593
  type: "success",
589
- message: "Asset deleted successfully"
594
+ message: t("media_asset_deleted")
590
595
  });
591
596
  onClose();
592
597
  } catch (error_0) {
593
598
  snackbarController.open({
594
599
  type: "error",
595
- message: `Error deleting asset: ${error_0 instanceof Error ? error_0.message : String(error_0)}`
600
+ message: t("media_error_deleting", {
601
+ message: error_0 instanceof Error ? error_0.message : String(error_0)
602
+ })
596
603
  });
597
604
  } finally {
598
605
  setDeleting(false);
@@ -608,7 +615,7 @@
608
615
  } catch (error_1) {
609
616
  snackbarController.open({
610
617
  type: "error",
611
- message: "Error getting download URL"
618
+ message: t("media_error_getting_url")
612
619
  });
613
620
  }
614
621
  }, [asset, storageSource, snackbarController]);
@@ -620,7 +627,7 @@
620
627
  }
621
628
  }, [tagInput, values.tags, setFieldValue]);
622
629
  const handleRemoveTag = react.useCallback((tagToRemove) => {
623
- setFieldValue("tags", values.tags?.filter((t) => t !== tagToRemove) ?? []);
630
+ setFieldValue("tags", values.tags?.filter((t_0) => t_0 !== tagToRemove) ?? []);
624
631
  }, [values.tags, setFieldValue]);
625
632
  const formatSize = (bytes) => {
626
633
  if (bytes < 1024) return `${bytes} B`;
@@ -646,11 +653,11 @@
646
653
  /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { onClick: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(ui.CloseIcon, { size: "small" }) })
647
654
  ] })
648
655
  ] }),
649
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 bg-surface-accent-100 dark:bg-surface-accent-800 flex items-center justify-center min-h-48 max-h-64", children: isImage && asset.downloadURL ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: asset.downloadURL, alt: asset.altText || asset.fileName, className: "max-w-full max-h-full object-contain" }) : isVideo && asset.downloadURL ? /* @__PURE__ */ jsxRuntime.jsx("video", { src: asset.downloadURL, className: "max-w-full max-h-full", controls: true }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-surface-accent-400", children: "Preview not available" }) }),
656
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 bg-surface-accent-100 dark:bg-surface-accent-800 flex items-center justify-center min-h-48 max-h-64", children: isImage && asset.downloadURL ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: asset.downloadURL, alt: asset.altText || asset.fileName, className: "max-w-full max-h-full object-contain" }) : isVideo && asset.downloadURL ? /* @__PURE__ */ jsxRuntime.jsx("video", { src: asset.downloadURL, className: "max-w-full max-h-full", controls: true }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-surface-accent-400", children: t("media_preview_not_available") }) }),
650
657
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 overflow-auto p-4 space-y-4", children: [
651
658
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-2 gap-3", children: [
652
659
  asset.dimensions && /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
653
- /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-surface-accent-500", children: "Dimensions" }),
660
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-surface-accent-500", children: t("media_dimensions") }),
654
661
  /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "body2", children: [
655
662
  asset.dimensions.width,
656
663
  " × ",
@@ -659,57 +666,55 @@
659
666
  ] })
660
667
  ] }),
661
668
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
662
- /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-surface-accent-500", children: "Size" }),
669
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-surface-accent-500", children: t("media_size") }),
663
670
  /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", children: formatSize(asset.size) })
664
671
  ] }),
665
672
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
666
- /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-surface-accent-500", children: "Type" }),
673
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-surface-accent-500", children: t("media_type") }),
667
674
  /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", children: asset.mimeType })
668
675
  ] }),
669
676
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
670
- /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-surface-accent-500", children: "Created" }),
677
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-surface-accent-500", children: t("media_created") }),
671
678
  /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", children: formatDate(asset.createdAt) })
672
679
  ] })
673
680
  ] }),
674
681
  /* @__PURE__ */ jsxRuntime.jsx("hr", { className: "border-surface-accent-200 dark:border-surface-accent-700" }),
675
- /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { label: "File Name", value: asset.fileName, disabled: true, size: "small" }),
676
- /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { label: "Title", value: values.title ?? "", onChange: (e) => setFieldValue("title", e.target.value), size: "small" }),
682
+ /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { label: t("media_file_name"), value: asset.fileName, disabled: true, size: "small" }),
683
+ /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { label: t("media_title"), value: values.title ?? "", onChange: (e) => setFieldValue("title", e.target.value), size: "small" }),
677
684
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
678
- /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { label: "Alt Text", value: values.altText ?? "", onChange: (e_0) => setFieldValue("altText", e_0.target.value), size: "small" }),
679
- /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-surface-accent-500 mt-1", children: "Recommended for SEO" })
685
+ /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { label: t("media_alt_text"), value: values.altText ?? "", onChange: (e_0) => setFieldValue("altText", e_0.target.value), size: "small" }),
686
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-surface-accent-500 mt-1", children: t("media_recommended_seo") })
680
687
  ] }),
681
- /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { label: "Caption", value: values.caption ?? "", onChange: (e_1) => setFieldValue("caption", e_1.target.value), size: "small", multiline: true }),
688
+ /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { label: t("media_caption"), value: values.caption ?? "", onChange: (e_1) => setFieldValue("caption", e_1.target.value), size: "small", multiline: true }),
682
689
  /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
683
- /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-surface-accent-500 mb-1 block", children: "Tags" }),
690
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-surface-accent-500 mb-1 block", children: t("media_tags") }),
684
691
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-wrap gap-1 mb-2", children: values.tags?.map((tag_0) => /* @__PURE__ */ jsxRuntime.jsxs(ui.Chip, { size: "small", colorScheme: "blueLighter", onClick: () => handleRemoveTag(tag_0), children: [
685
692
  tag_0,
686
693
  " ×"
687
694
  ] }, tag_0)) }),
688
695
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-2", children: [
689
- /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { placeholder: "Add a tag...", value: tagInput, onChange: (e_2) => setTagInput(e_2.target.value), size: "small", className: "flex-1", onKeyDown: (e_3) => {
696
+ /* @__PURE__ */ jsxRuntime.jsx(ui.TextField, { placeholder: t("media_add_tag"), value: tagInput, onChange: (e_2) => setTagInput(e_2.target.value), size: "small", className: "flex-1", onKeyDown: (e_3) => {
690
697
  if (e_3.key === "Enter") {
691
698
  e_3.preventDefault();
692
699
  handleAddTag();
693
700
  }
694
701
  } }),
695
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", size: "small", onClick: handleAddTag, disabled: !tagInput.trim(), children: "Add" })
702
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", size: "small", onClick: handleAddTag, disabled: !tagInput.trim(), children: t("media_add") })
696
703
  ] })
697
704
  ] })
698
705
  ] }),
699
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 p-4 border-t border-surface-accent-200 dark:border-surface-accent-700", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "filled", onClick: handleSave, disabled: !dirty || saving, className: "w-full", children: saving ? /* @__PURE__ */ jsxRuntime.jsx(ui.CircularProgress, { size: "small" }) : "Save Changes" }) })
706
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 p-4 border-t border-surface-accent-200 dark:border-surface-accent-700", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "filled", onClick: handleSave, disabled: !dirty || saving, className: "w-full", children: saving ? /* @__PURE__ */ jsxRuntime.jsx(ui.CircularProgress, { size: "small" }) : t("media_save_changes") }) })
700
707
  ] }),
701
708
  /* @__PURE__ */ jsxRuntime.jsxs(ui.Dialog, { open: deleteDialogOpen, onOpenChange: setDeleteDialogOpen, children: [
702
709
  /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogContent, { children: [
703
- /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle1", className: "font-medium mb-2", children: "Delete Asset?" }),
704
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { className: "text-surface-accent-600 dark:text-surface-accent-400", children: [
705
- 'Are you sure you want to delete "',
706
- asset.title || asset.fileName,
707
- '"? This action cannot be undone.'
708
- ] })
710
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle1", className: "font-medium mb-2", children: t("media_delete_asset") }),
711
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { className: "text-surface-accent-600 dark:text-surface-accent-400", children: t("media_delete_confirmation", {
712
+ name: asset.title || asset.fileName
713
+ }) })
709
714
  ] }),
710
715
  /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogActions, { children: [
711
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", onClick: () => setDeleteDialogOpen(false), disabled: deleting, children: "Cancel" }),
712
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "filled", color: "error", onClick: handleDelete, disabled: deleting, children: deleting ? /* @__PURE__ */ jsxRuntime.jsx(ui.CircularProgress, { size: "small" }) : "Delete" })
716
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", onClick: () => setDeleteDialogOpen(false), disabled: deleting, children: t("cancel") }),
717
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "filled", color: "error", onClick: handleDelete, disabled: deleting, children: deleting ? /* @__PURE__ */ jsxRuntime.jsx(ui.CircularProgress, { size: "small" }) : t("delete") })
713
718
  ] })
714
719
  ] })
715
720
  ] });
@@ -726,12 +731,18 @@
726
731
  const [uploading, setUploading] = react.useState(false);
727
732
  const [error, setError] = react.useState(null);
728
733
  const [selectedFiles, setSelectedFiles] = react.useState([]);
734
+ const {
735
+ t
736
+ } = core.useTranslation();
729
737
  const validateFiles = react.useCallback((files) => {
730
738
  const valid = [];
731
739
  const errors = [];
732
740
  for (const file of files) {
733
741
  if (maxFileSize && file.size > maxFileSize) {
734
- errors.push(`${file.name}: File too large (max ${formatSize(maxFileSize)})`);
742
+ errors.push(t("media_file_too_large", {
743
+ name: file.name,
744
+ size: formatSize(maxFileSize)
745
+ }));
735
746
  continue;
736
747
  }
737
748
  if (acceptedMimeTypes && !acceptedMimeTypes.some((type) => {
@@ -740,7 +751,9 @@
740
751
  }
741
752
  return file.type === type;
742
753
  })) {
743
- errors.push(`${file.name}: File type not allowed`);
754
+ errors.push(t("media_file_type_not_allowed", {
755
+ name: file.name
756
+ }));
744
757
  continue;
745
758
  }
746
759
  valid.push(file);
@@ -798,7 +811,7 @@
798
811
  setSelectedFiles([]);
799
812
  onClose();
800
813
  } catch (err) {
801
- setError(err instanceof Error ? err.message : "Upload failed");
814
+ setError(err instanceof Error ? err.message : t("media_upload_failed"));
802
815
  } finally {
803
816
  setUploading(false);
804
817
  }
@@ -817,26 +830,23 @@
817
830
  };
818
831
  return /* @__PURE__ */ jsxRuntime.jsxs(ui.Dialog, { open, onOpenChange: (open_0) => !open_0 && handleClose(), maxWidth: "md", children: [
819
832
  /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogContent, { className: "p-0", children: [
820
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 border-b border-surface-accent-200 dark:border-surface-accent-700", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "h6", children: "Upload Files" }) }),
833
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 border-b border-surface-accent-200 dark:border-surface-accent-700", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "h6", children: t("media_upload_files") }) }),
821
834
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-4", children: [
822
835
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("border-2 border-dashed rounded-lg p-8", "flex flex-col items-center justify-center gap-4", "transition-colors duration-150", isDragging ? "border-primary bg-primary/5" : "border-surface-accent-300 dark:border-surface-accent-600", "hover:border-primary hover:bg-primary/5", "cursor-pointer"), onDragOver: handleDragOver, onDragLeave: handleDragLeave, onDrop: handleDrop, onClick: () => document.getElementById("file-upload-input")?.click(), children: [
823
836
  /* @__PURE__ */ jsxRuntime.jsx(ui.CloudUploadIcon, { size: "large", className: ui.cls(isDragging ? "text-primary" : "text-surface-accent-400") }),
824
837
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center", children: [
825
- /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body1", className: "font-medium", children: "Drop files here or click to browse" }),
826
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", className: "text-surface-accent-500", children: [
827
- "Maximum file size: ",
828
- formatSize(maxFileSize)
829
- ] })
838
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body1", className: "font-medium", children: t("media_drop_files") }),
839
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-surface-accent-500", children: t("media_max_file_size", {
840
+ size: formatSize(maxFileSize)
841
+ }) })
830
842
  ] }),
831
843
  /* @__PURE__ */ jsxRuntime.jsx("input", { id: "file-upload-input", type: "file", multiple: true, accept: acceptedMimeTypes?.join(","), onChange: handleFileSelect, className: "hidden" })
832
844
  ] }),
833
845
  error && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-red-500 mt-2 block whitespace-pre-line", children: error }),
834
846
  selectedFiles.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-4 space-y-2", children: [
835
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", className: "text-surface-accent-500", children: [
836
- "Selected files (",
837
- selectedFiles.length,
838
- ")"
839
- ] }),
847
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-surface-accent-500", children: t("media_selected_files_count", {
848
+ count: selectedFiles.length.toString()
849
+ }) }),
840
850
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-h-40 overflow-auto space-y-1", children: selectedFiles.map((file_0, index_0) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: ui.cls("flex items-center justify-between p-2 rounded", "bg-surface-accent-50 dark:bg-surface-accent-800"), children: [
841
851
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0 mr-2", children: [
842
852
  /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "body2", className: "truncate", children: file_0.name }),
@@ -845,22 +855,22 @@
845
855
  /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", size: "small", onClick: (e_3) => {
846
856
  e_3.stopPropagation();
847
857
  handleRemoveFile(index_0);
848
- }, disabled: uploading, children: "Remove" })
858
+ }, disabled: uploading, children: t("media_remove") })
849
859
  ] }, `${file_0.name}-${index_0}`)) })
850
860
  ] })
851
861
  ] })
852
862
  ] }),
853
863
  /* @__PURE__ */ jsxRuntime.jsxs(ui.DialogActions, { children: [
854
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", onClick: handleClose, disabled: uploading, children: "Cancel" }),
864
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "text", onClick: handleClose, disabled: uploading, children: t("cancel") }),
855
865
  /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "filled", onClick: handleUpload, disabled: selectedFiles.length === 0 || uploading, children: uploading ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
856
866
  /* @__PURE__ */ jsxRuntime.jsx(ui.CircularProgress, { size: "smallest" }),
857
- "Uploading..."
858
- ] }) : `Upload ${selectedFiles.length > 0 ? `(${selectedFiles.length})` : ""}` })
867
+ t("media_uploading")
868
+ ] }) : `${t("media_upload")} ${selectedFiles.length > 0 ? `(${selectedFiles.length})` : ""}` })
859
869
  ] })
860
870
  ] });
861
871
  }
862
872
  function MediaLibraryView(t0) {
863
- const $ = reactCompilerRuntime.c(58);
873
+ const $ = reactCompilerRuntime.c(87);
864
874
  const {
865
875
  maxFileSize,
866
876
  acceptedMimeTypes
@@ -869,6 +879,9 @@
869
879
  const [uploadDialogOpen, setUploadDialogOpen] = react.useState(false);
870
880
  const [viewMode, setViewMode] = react.useState("grid");
871
881
  react.useRef(null);
882
+ const {
883
+ t
884
+ } = core.useTranslation();
872
885
  let t1;
873
886
  if ($[0] !== controller) {
874
887
  t1 = (query) => {
@@ -916,235 +929,637 @@
916
929
  }
917
930
  const handleRefresh = t4;
918
931
  let t5;
919
- if ($[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
920
- t5 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "h5", className: "font-semibold", children: "Media Library" });
921
- $[7] = t5;
932
+ if ($[7] !== t) {
933
+ t5 = t("media_library");
934
+ $[7] = t;
935
+ $[8] = t5;
922
936
  } else {
923
- t5 = $[7];
937
+ t5 = $[8];
924
938
  }
925
939
  let t6;
926
- if ($[8] !== controller.totalCount) {
927
- t6 = controller.totalCount !== void 0 && /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { variant: "caption", className: "bg-surface-accent-100 dark:bg-surface-accent-800 px-2 py-0.5 rounded-full", children: [
928
- controller.totalCount,
929
- " assets"
930
- ] });
931
- $[8] = controller.totalCount;
932
- $[9] = t6;
940
+ if ($[9] !== t5) {
941
+ t6 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "h5", className: "font-semibold", children: t5 });
942
+ $[9] = t5;
943
+ $[10] = t6;
933
944
  } else {
934
- t6 = $[9];
945
+ t6 = $[10];
935
946
  }
936
947
  let t7;
937
- if ($[10] !== t6) {
938
- t7 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
939
- t5,
940
- t6
941
- ] });
942
- $[10] = t6;
943
- $[11] = t7;
948
+ if ($[11] !== controller.totalCount || $[12] !== t) {
949
+ t7 = controller.totalCount !== void 0 && /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "bg-surface-accent-100 dark:bg-surface-accent-800 px-2 py-0.5 rounded-full", children: t("media_assets_count", {
950
+ count: controller.totalCount.toString()
951
+ }) });
952
+ $[11] = controller.totalCount;
953
+ $[12] = t;
954
+ $[13] = t7;
944
955
  } else {
945
- t7 = $[11];
956
+ t7 = $[13];
946
957
  }
947
958
  let t8;
948
- if ($[12] !== handleSearch) {
949
- t8 = /* @__PURE__ */ jsxRuntime.jsx(ui.SearchBar, { onTextSearch: handleSearch, placeholder: "Search assets...", className: "flex-1 sm:w-64" });
950
- $[12] = handleSearch;
951
- $[13] = t8;
959
+ if ($[14] !== t6 || $[15] !== t7) {
960
+ t8 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
961
+ t6,
962
+ t7
963
+ ] });
964
+ $[14] = t6;
965
+ $[15] = t7;
966
+ $[16] = t8;
952
967
  } else {
953
- t8 = $[13];
968
+ t8 = $[16];
954
969
  }
955
970
  let t9;
956
- if ($[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
957
- t9 = () => setViewMode("grid");
958
- $[14] = t9;
971
+ if ($[17] !== t) {
972
+ t9 = t("media_search_assets");
973
+ $[17] = t;
974
+ $[18] = t9;
959
975
  } else {
960
- t9 = $[14];
976
+ t9 = $[18];
977
+ }
978
+ let t10;
979
+ if ($[19] !== handleSearch || $[20] !== t9) {
980
+ t10 = /* @__PURE__ */ jsxRuntime.jsx(ui.SearchBar, { onTextSearch: handleSearch, placeholder: t9, className: "flex-1 sm:w-64" });
981
+ $[19] = handleSearch;
982
+ $[20] = t9;
983
+ $[21] = t10;
984
+ } else {
985
+ t10 = $[21];
961
986
  }
962
- const t10 = viewMode === "grid" && "bg-surface-accent-100 dark:bg-surface-accent-800";
963
987
  let t11;
964
- if ($[15] !== t10) {
965
- t11 = ui.cls(t10);
966
- $[15] = t10;
967
- $[16] = t11;
988
+ if ($[22] !== t) {
989
+ t11 = t("media_grid_view");
990
+ $[22] = t;
991
+ $[23] = t11;
968
992
  } else {
969
- t11 = $[16];
993
+ t11 = $[23];
970
994
  }
971
995
  let t12;
972
- if ($[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
973
- t12 = /* @__PURE__ */ jsxRuntime.jsx(ui.AppsIcon, { size: "small" });
974
- $[17] = t12;
996
+ if ($[24] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
997
+ t12 = () => setViewMode("grid");
998
+ $[24] = t12;
975
999
  } else {
976
- t12 = $[17];
1000
+ t12 = $[24];
977
1001
  }
978
- let t13;
979
- if ($[18] !== t11) {
980
- t13 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Grid view", children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { onClick: t9, className: t11, children: t12 }) });
981
- $[18] = t11;
982
- $[19] = t13;
1002
+ const t13 = viewMode === "grid" && "bg-surface-accent-100 dark:bg-surface-accent-800";
1003
+ let t14;
1004
+ if ($[25] !== t13) {
1005
+ t14 = ui.cls(t13);
1006
+ $[25] = t13;
1007
+ $[26] = t14;
983
1008
  } else {
984
- t13 = $[19];
1009
+ t14 = $[26];
985
1010
  }
986
- let t14;
987
- if ($[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
988
- t14 = () => setViewMode("list");
989
- $[20] = t14;
1011
+ let t15;
1012
+ if ($[27] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1013
+ t15 = /* @__PURE__ */ jsxRuntime.jsx(ui.AppsIcon, { size: "small" });
1014
+ $[27] = t15;
990
1015
  } else {
991
- t14 = $[20];
1016
+ t15 = $[27];
992
1017
  }
993
- const t15 = viewMode === "list" && "bg-surface-accent-100 dark:bg-surface-accent-800";
994
1018
  let t16;
995
- if ($[21] !== t15) {
996
- t16 = ui.cls(t15);
997
- $[21] = t15;
998
- $[22] = t16;
1019
+ if ($[28] !== t14) {
1020
+ t16 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { onClick: t12, className: t14, children: t15 });
1021
+ $[28] = t14;
1022
+ $[29] = t16;
999
1023
  } else {
1000
- t16 = $[22];
1024
+ t16 = $[29];
1001
1025
  }
1002
1026
  let t17;
1003
- if ($[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1004
- t17 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { iconKey: "list", size: "small" });
1005
- $[23] = t17;
1027
+ if ($[30] !== t11 || $[31] !== t16) {
1028
+ t17 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: t11, children: t16 });
1029
+ $[30] = t11;
1030
+ $[31] = t16;
1031
+ $[32] = t17;
1006
1032
  } else {
1007
- t17 = $[23];
1033
+ t17 = $[32];
1008
1034
  }
1009
1035
  let t18;
1010
- if ($[24] !== t16) {
1011
- t18 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "List view", children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { onClick: t14, className: t16, children: t17 }) });
1012
- $[24] = t16;
1013
- $[25] = t18;
1036
+ if ($[33] !== t) {
1037
+ t18 = t("media_list_view");
1038
+ $[33] = t;
1039
+ $[34] = t18;
1014
1040
  } else {
1015
- t18 = $[25];
1041
+ t18 = $[34];
1016
1042
  }
1017
1043
  let t19;
1018
- if ($[26] !== t13 || $[27] !== t18) {
1019
- t19 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 border-l border-surface-accent-200 dark:border-surface-accent-700 pl-2 ml-2", children: [
1020
- t13,
1021
- t18
1022
- ] });
1023
- $[26] = t13;
1024
- $[27] = t18;
1025
- $[28] = t19;
1044
+ if ($[35] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1045
+ t19 = () => setViewMode("list");
1046
+ $[35] = t19;
1026
1047
  } else {
1027
- t19 = $[28];
1028
- }
1029
- let t20;
1030
- if ($[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1031
- t20 = /* @__PURE__ */ jsxRuntime.jsx(ui.RefreshIcon, { size: "small" });
1032
- $[29] = t20;
1033
- } else {
1034
- t20 = $[29];
1048
+ t19 = $[35];
1035
1049
  }
1050
+ const t20 = viewMode === "list" && "bg-surface-accent-100 dark:bg-surface-accent-800";
1036
1051
  let t21;
1037
- if ($[30] !== controller.loading || $[31] !== handleRefresh) {
1038
- t21 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: "Refresh", children: /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { onClick: handleRefresh, disabled: controller.loading, children: t20 }) });
1039
- $[30] = controller.loading;
1040
- $[31] = handleRefresh;
1041
- $[32] = t21;
1052
+ if ($[36] !== t20) {
1053
+ t21 = ui.cls(t20);
1054
+ $[36] = t20;
1055
+ $[37] = t21;
1042
1056
  } else {
1043
- t21 = $[32];
1057
+ t21 = $[37];
1044
1058
  }
1045
1059
  let t22;
1046
- if ($[33] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1047
- t22 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "filled", onClick: handleUploadClick, children: [
1048
- /* @__PURE__ */ jsxRuntime.jsx(ui.AddIcon, { size: "small" }),
1049
- "Upload"
1050
- ] });
1051
- $[33] = t22;
1060
+ if ($[38] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1061
+ t22 = /* @__PURE__ */ jsxRuntime.jsx(ui.Icon, { iconKey: "list", size: "small" });
1062
+ $[38] = t22;
1052
1063
  } else {
1053
- t22 = $[33];
1064
+ t22 = $[38];
1054
1065
  }
1055
1066
  let t23;
1056
- if ($[34] !== t19 || $[35] !== t21 || $[36] !== t8) {
1057
- t23 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 w-full sm:w-auto", children: [
1058
- t8,
1059
- t19,
1060
- t21,
1061
- t22
1062
- ] });
1063
- $[34] = t19;
1064
- $[35] = t21;
1065
- $[36] = t8;
1066
- $[37] = t23;
1067
+ if ($[39] !== t21) {
1068
+ t23 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { onClick: t19, className: t21, children: t22 });
1069
+ $[39] = t21;
1070
+ $[40] = t23;
1067
1071
  } else {
1068
- t23 = $[37];
1072
+ t23 = $[40];
1069
1073
  }
1070
1074
  let t24;
1071
- if ($[38] !== t23 || $[39] !== t7) {
1072
- t24 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 border-b border-surface-accent-200 dark:border-surface-accent-700 bg-surface-50 dark:bg-surface-900", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Container, { maxWidth: "6xl", className: "py-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between", children: [
1073
- t7,
1074
- t23
1075
- ] }) }) });
1076
- $[38] = t23;
1077
- $[39] = t7;
1078
- $[40] = t24;
1075
+ if ($[41] !== t18 || $[42] !== t23) {
1076
+ t24 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: t18, children: t23 });
1077
+ $[41] = t18;
1078
+ $[42] = t23;
1079
+ $[43] = t24;
1079
1080
  } else {
1080
- t24 = $[40];
1081
+ t24 = $[43];
1081
1082
  }
1082
1083
  let t25;
1083
- if ($[41] !== controller || $[42] !== handleRefresh || $[43] !== viewMode) {
1084
- t25 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Container, { maxWidth: "6xl", className: "py-6", children: controller.loading && controller.assets.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsxRuntime.jsx(ui.CircularProgress, {}) }) : controller.error ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center h-64 gap-4", children: [
1085
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Typography, { className: "text-red-500", children: [
1086
- "Error loading assets: ",
1087
- controller.error.message
1088
- ] }),
1089
- /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: handleRefresh, children: "Try Again" })
1090
- ] }) : controller.assets.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center h-64 gap-4", children: [
1091
- /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { className: "text-surface-accent-500", children: "No media assets yet" }),
1092
- /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: handleUploadClick, children: [
1093
- /* @__PURE__ */ jsxRuntime.jsx(ui.AddIcon, { size: "small" }),
1094
- "Upload your first file"
1095
- ] })
1096
- ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cls(viewMode === "grid" ? "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4" : "flex flex-col gap-2"), children: controller.assets.map((asset) => /* @__PURE__ */ jsxRuntime.jsx(MediaAssetCard, { asset, viewMode, onClick: () => controller.selectAsset(asset), selected: controller.selectedAsset?.id === asset.id }, asset.id)) }) }) });
1097
- $[41] = controller;
1098
- $[42] = handleRefresh;
1099
- $[43] = viewMode;
1100
- $[44] = t25;
1084
+ if ($[44] !== t17 || $[45] !== t24) {
1085
+ t25 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-1 border-l border-surface-accent-200 dark:border-surface-accent-700 pl-2 ml-2", children: [
1086
+ t17,
1087
+ t24
1088
+ ] });
1089
+ $[44] = t17;
1090
+ $[45] = t24;
1091
+ $[46] = t25;
1101
1092
  } else {
1102
- t25 = $[44];
1093
+ t25 = $[46];
1103
1094
  }
1104
1095
  let t26;
1105
- if ($[45] !== controller) {
1106
- t26 = controller.selectedAsset && /* @__PURE__ */ jsxRuntime.jsx(MediaAssetDetails, { asset: controller.selectedAsset, onClose: () => controller.selectAsset(void 0), onUpdate: controller.updateAsset, onDelete: controller.deleteAsset });
1107
- $[45] = controller;
1108
- $[46] = t26;
1096
+ if ($[47] !== t) {
1097
+ t26 = t("media_refresh");
1098
+ $[47] = t;
1099
+ $[48] = t26;
1109
1100
  } else {
1110
- t26 = $[46];
1101
+ t26 = $[48];
1111
1102
  }
1112
1103
  let t27;
1113
- if ($[47] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1114
- t27 = () => setUploadDialogOpen(false);
1115
- $[47] = t27;
1104
+ if ($[49] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1105
+ t27 = /* @__PURE__ */ jsxRuntime.jsx(ui.RefreshIcon, { size: "small" });
1106
+ $[49] = t27;
1116
1107
  } else {
1117
- t27 = $[47];
1108
+ t27 = $[49];
1118
1109
  }
1119
1110
  let t28;
1120
- if ($[48] !== acceptedMimeTypes || $[49] !== handleFileSelect || $[50] !== maxFileSize || $[51] !== uploadDialogOpen) {
1121
- t28 = /* @__PURE__ */ jsxRuntime.jsx(MediaUploadDialog, { open: uploadDialogOpen, onClose: t27, onUpload: handleFileSelect, maxFileSize, acceptedMimeTypes });
1122
- $[48] = acceptedMimeTypes;
1123
- $[49] = handleFileSelect;
1124
- $[50] = maxFileSize;
1125
- $[51] = uploadDialogOpen;
1111
+ if ($[50] !== controller.loading || $[51] !== handleRefresh) {
1112
+ t28 = /* @__PURE__ */ jsxRuntime.jsx(ui.IconButton, { onClick: handleRefresh, disabled: controller.loading, children: t27 });
1113
+ $[50] = controller.loading;
1114
+ $[51] = handleRefresh;
1126
1115
  $[52] = t28;
1127
1116
  } else {
1128
1117
  t28 = $[52];
1129
1118
  }
1130
1119
  let t29;
1131
- if ($[53] !== t24 || $[54] !== t25 || $[55] !== t26 || $[56] !== t28) {
1132
- t29 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full flex flex-col overflow-hidden", children: [
1133
- t24,
1120
+ if ($[53] !== t26 || $[54] !== t28) {
1121
+ t29 = /* @__PURE__ */ jsxRuntime.jsx(ui.Tooltip, { title: t26, children: t28 });
1122
+ $[53] = t26;
1123
+ $[54] = t28;
1124
+ $[55] = t29;
1125
+ } else {
1126
+ t29 = $[55];
1127
+ }
1128
+ let t30;
1129
+ if ($[56] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1130
+ t30 = /* @__PURE__ */ jsxRuntime.jsx(ui.AddIcon, { size: "small" });
1131
+ $[56] = t30;
1132
+ } else {
1133
+ t30 = $[56];
1134
+ }
1135
+ let t31;
1136
+ if ($[57] !== t) {
1137
+ t31 = t("media_upload");
1138
+ $[57] = t;
1139
+ $[58] = t31;
1140
+ } else {
1141
+ t31 = $[58];
1142
+ }
1143
+ let t32;
1144
+ if ($[59] !== t31) {
1145
+ t32 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { variant: "filled", onClick: handleUploadClick, children: [
1146
+ t30,
1147
+ t31
1148
+ ] });
1149
+ $[59] = t31;
1150
+ $[60] = t32;
1151
+ } else {
1152
+ t32 = $[60];
1153
+ }
1154
+ let t33;
1155
+ if ($[61] !== t10 || $[62] !== t25 || $[63] !== t29 || $[64] !== t32) {
1156
+ t33 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 w-full sm:w-auto", children: [
1157
+ t10,
1134
1158
  t25,
1135
- t26,
1136
- t28
1159
+ t29,
1160
+ t32
1161
+ ] });
1162
+ $[61] = t10;
1163
+ $[62] = t25;
1164
+ $[63] = t29;
1165
+ $[64] = t32;
1166
+ $[65] = t33;
1167
+ } else {
1168
+ t33 = $[65];
1169
+ }
1170
+ let t34;
1171
+ if ($[66] !== t33 || $[67] !== t8) {
1172
+ t34 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-shrink-0 border-b border-surface-accent-200 dark:border-surface-accent-700 bg-surface-50 dark:bg-surface-900", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Container, { maxWidth: "6xl", className: "py-4", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between", children: [
1173
+ t8,
1174
+ t33
1175
+ ] }) }) });
1176
+ $[66] = t33;
1177
+ $[67] = t8;
1178
+ $[68] = t34;
1179
+ } else {
1180
+ t34 = $[68];
1181
+ }
1182
+ let t35;
1183
+ if ($[69] !== controller || $[70] !== handleRefresh || $[71] !== t || $[72] !== viewMode) {
1184
+ t35 = /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Container, { maxWidth: "6xl", className: "py-6", children: controller.loading && controller.assets.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-center h-64", children: /* @__PURE__ */ jsxRuntime.jsx(ui.CircularProgress, {}) }) : controller.error ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center h-64 gap-4", children: [
1185
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { className: "text-red-500", children: t("media_error_loading", {
1186
+ message: controller.error.message
1187
+ }) }),
1188
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { onClick: handleRefresh, children: t("media_try_again") })
1189
+ ] }) : controller.assets.length === 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center h-64 gap-4", children: [
1190
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { className: "text-surface-accent-500", children: t("media_no_assets") }),
1191
+ /* @__PURE__ */ jsxRuntime.jsxs(ui.Button, { onClick: handleUploadClick, children: [
1192
+ /* @__PURE__ */ jsxRuntime.jsx(ui.AddIcon, { size: "small" }),
1193
+ t("media_upload_first_file")
1194
+ ] })
1195
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: ui.cls(viewMode === "grid" ? "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4" : "flex flex-col gap-2"), children: controller.assets.map((asset) => /* @__PURE__ */ jsxRuntime.jsx(MediaAssetCard, { asset, viewMode, onClick: () => controller.selectAsset(asset), selected: controller.selectedAsset?.id === asset.id }, asset.id)) }) }) });
1196
+ $[69] = controller;
1197
+ $[70] = handleRefresh;
1198
+ $[71] = t;
1199
+ $[72] = viewMode;
1200
+ $[73] = t35;
1201
+ } else {
1202
+ t35 = $[73];
1203
+ }
1204
+ let t36;
1205
+ if ($[74] !== controller) {
1206
+ t36 = controller.selectedAsset && /* @__PURE__ */ jsxRuntime.jsx(MediaAssetDetails, { asset: controller.selectedAsset, onClose: () => controller.selectAsset(void 0), onUpdate: controller.updateAsset, onDelete: controller.deleteAsset });
1207
+ $[74] = controller;
1208
+ $[75] = t36;
1209
+ } else {
1210
+ t36 = $[75];
1211
+ }
1212
+ let t37;
1213
+ if ($[76] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1214
+ t37 = () => setUploadDialogOpen(false);
1215
+ $[76] = t37;
1216
+ } else {
1217
+ t37 = $[76];
1218
+ }
1219
+ let t38;
1220
+ if ($[77] !== acceptedMimeTypes || $[78] !== handleFileSelect || $[79] !== maxFileSize || $[80] !== uploadDialogOpen) {
1221
+ t38 = /* @__PURE__ */ jsxRuntime.jsx(MediaUploadDialog, { open: uploadDialogOpen, onClose: t37, onUpload: handleFileSelect, maxFileSize, acceptedMimeTypes });
1222
+ $[77] = acceptedMimeTypes;
1223
+ $[78] = handleFileSelect;
1224
+ $[79] = maxFileSize;
1225
+ $[80] = uploadDialogOpen;
1226
+ $[81] = t38;
1227
+ } else {
1228
+ t38 = $[81];
1229
+ }
1230
+ let t39;
1231
+ if ($[82] !== t34 || $[83] !== t35 || $[84] !== t36 || $[85] !== t38) {
1232
+ t39 = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full flex flex-col overflow-hidden", children: [
1233
+ t34,
1234
+ t35,
1235
+ t36,
1236
+ t38
1137
1237
  ] });
1138
- $[53] = t24;
1139
- $[54] = t25;
1140
- $[55] = t26;
1141
- $[56] = t28;
1142
- $[57] = t29;
1238
+ $[82] = t34;
1239
+ $[83] = t35;
1240
+ $[84] = t36;
1241
+ $[85] = t38;
1242
+ $[86] = t39;
1143
1243
  } else {
1144
- t29 = $[57];
1244
+ t39 = $[86];
1145
1245
  }
1146
- return t29;
1246
+ return t39;
1147
1247
  }
1248
+ const mediaManagerTranslationsEn = {
1249
+ media_library: "Media Library",
1250
+ media_library_description: "Manage images and files",
1251
+ media_search_assets: "Search assets...",
1252
+ media_grid_view: "Grid view",
1253
+ media_list_view: "List view",
1254
+ media_refresh: "Refresh",
1255
+ media_upload: "Upload",
1256
+ media_error_loading: "Error loading assets: {{message}}",
1257
+ media_try_again: "Try Again",
1258
+ media_no_assets: "No media assets yet",
1259
+ media_upload_first_file: "Upload your first file",
1260
+ media_asset_updated: "Asset updated successfully",
1261
+ media_error_updating: "Error updating asset: {{message}}",
1262
+ media_asset_deleted: "Asset deleted successfully",
1263
+ media_error_deleting: "Error deleting asset: {{message}}",
1264
+ media_error_getting_url: "Error getting download URL",
1265
+ media_preview_not_available: "Preview not available",
1266
+ media_dimensions: "Dimensions",
1267
+ media_size: "Size",
1268
+ media_type: "Type",
1269
+ media_created: "Created",
1270
+ media_file_name: "File Name",
1271
+ media_title: "Title",
1272
+ media_alt_text: "Alt Text",
1273
+ media_recommended_seo: "Recommended for SEO",
1274
+ media_caption: "Caption",
1275
+ media_tags: "Tags",
1276
+ media_add_tag: "Add a tag...",
1277
+ media_add: "Add",
1278
+ media_save_changes: "Save Changes",
1279
+ media_delete_asset: "Delete Asset?",
1280
+ media_delete_confirmation: 'Are you sure you want to delete "{{name}}"? This action cannot be undone.',
1281
+ media_file_too_large: "{{name}}: File too large (max {{size}})",
1282
+ media_file_type_not_allowed: "{{name}}: File type not allowed",
1283
+ media_upload_failed: "Upload failed",
1284
+ media_upload_files: "Upload Files",
1285
+ media_drop_files: "Drop files here or click to browse",
1286
+ media_max_file_size: "Maximum file size: {{size}}",
1287
+ media_selected_files_count: "Selected files ({{count}})",
1288
+ media_remove: "Remove",
1289
+ media_uploading: "Uploading...",
1290
+ media_manage_description: "Manage your media files and assets",
1291
+ media_assets_count: "{{count}} assets"
1292
+ };
1293
+ const mediaManagerTranslationsEs = {
1294
+ media_library: "Biblioteca de Medios",
1295
+ media_library_description: "Gestionar imágenes y archivos",
1296
+ media_search_assets: "Buscar recursos...",
1297
+ media_grid_view: "Vista de cuadrícula",
1298
+ media_list_view: "Vista de lista",
1299
+ media_refresh: "Actualizar",
1300
+ media_upload: "Subir",
1301
+ media_error_loading: "Error al cargar recursos: {{message}}",
1302
+ media_try_again: "Volver a intentar",
1303
+ media_no_assets: "Aún no hay recursos multimedia",
1304
+ media_upload_first_file: "Sube tu primer archivo",
1305
+ media_asset_updated: "Recurso actualizado con éxito",
1306
+ media_error_updating: "Error al actualizar recurso: {{message}}",
1307
+ media_asset_deleted: "Recurso eliminado con éxito",
1308
+ media_error_deleting: "Error al eliminar recurso: {{message}}",
1309
+ media_error_getting_url: "Error al obtener URL de descarga",
1310
+ media_preview_not_available: "Vista previa no disponible",
1311
+ media_dimensions: "Dimensiones",
1312
+ media_size: "Tamaño",
1313
+ media_type: "Tipo",
1314
+ media_created: "Creado",
1315
+ media_file_name: "Nombre del archivo",
1316
+ media_title: "Título",
1317
+ media_alt_text: "Texto alternativo",
1318
+ media_recommended_seo: "Recomendado para SEO",
1319
+ media_caption: "Leyenda",
1320
+ media_tags: "Etiquetas",
1321
+ media_add_tag: "Añadir una etiqueta...",
1322
+ media_add: "Añadir",
1323
+ media_save_changes: "Guardar cambios",
1324
+ media_delete_asset: "¿Eliminar recurso?",
1325
+ media_delete_confirmation: '¿Estás seguro de que deseas eliminar "{{name}}"? Esta acción no se puede deshacer.',
1326
+ media_file_too_large: "{{name}}: Archivo demasiado grande (máx. {{size}})",
1327
+ media_file_type_not_allowed: "{{name}}: Tipo de archivo no permitido",
1328
+ media_upload_failed: "Error al subir",
1329
+ media_upload_files: "Subir archivos",
1330
+ media_drop_files: "Suelta archivos aquí o haz clic para buscar",
1331
+ media_max_file_size: "Tamaño máximo de archivo: {{size}}",
1332
+ media_selected_files_count: "Archivos seleccionados ({{count}})",
1333
+ media_remove: "Quitar",
1334
+ media_uploading: "Subiendo...",
1335
+ media_manage_description: "Gestiona tus archivos y recursos multimedia",
1336
+ media_assets_count: "{{count}} recursos"
1337
+ };
1338
+ const mediaManagerTranslationsDe = {
1339
+ media_library: "Mediathek",
1340
+ media_library_description: "Bilder und Dateien verwalten",
1341
+ media_search_assets: "Assets durchsuchen...",
1342
+ media_grid_view: "Rasteransicht",
1343
+ media_list_view: "Listenansicht",
1344
+ media_refresh: "Aktualisieren",
1345
+ media_upload: "Hochladen",
1346
+ media_error_loading: "Fehler beim Laden der Assets: {{message}}",
1347
+ media_try_again: "Erneut versuchen",
1348
+ media_no_assets: "Noch keine Medien-Assets",
1349
+ media_upload_first_file: "Laden Sie Ihre erste Datei hoch",
1350
+ media_asset_updated: "Asset erfolgreich aktualisiert",
1351
+ media_error_updating: "Fehler beim Aktualisieren des Assets: {{message}}",
1352
+ media_asset_deleted: "Asset erfolgreich gelöscht",
1353
+ media_error_deleting: "Fehler beim Löschen des Assets: {{message}}",
1354
+ media_error_getting_url: "Fehler beim Abrufen der Download-URL",
1355
+ media_preview_not_available: "Vorschau nicht verfügbar",
1356
+ media_dimensions: "Abmessungen",
1357
+ media_size: "Größe",
1358
+ media_type: "Typ",
1359
+ media_created: "Erstellt",
1360
+ media_file_name: "Dateiname",
1361
+ media_title: "Titel",
1362
+ media_alt_text: "Alternativtext",
1363
+ media_recommended_seo: "Empfohlen für SEO",
1364
+ media_caption: "Bildunterschrift",
1365
+ media_tags: "Schlagwörter",
1366
+ media_add_tag: "Schlagwort hinzufügen...",
1367
+ media_add: "Hinzufügen",
1368
+ media_save_changes: "Änderungen speichern",
1369
+ media_delete_asset: "Asset löschen?",
1370
+ media_delete_confirmation: 'Sind Sie sicher, dass Sie "{{name}}" löschen möchten? Diese Aktion kann nicht rückgängig gemacht werden.',
1371
+ media_file_too_large: "{{name}}: Datei ist zu groß (max. {{size}})",
1372
+ media_file_type_not_allowed: "{{name}}: Dateityp nicht zulässig",
1373
+ media_upload_failed: "Hochladen fehlgeschlagen",
1374
+ media_upload_files: "Dateien hochladen",
1375
+ media_drop_files: "Dateien hier ablegen oder zum Durchsuchen klicken",
1376
+ media_max_file_size: "Maximale Dateigröße: {{size}}",
1377
+ media_selected_files_count: "Ausgewählte Dateien ({{count}})",
1378
+ media_remove: "Entfernen",
1379
+ media_uploading: "Wird hochgeladen...",
1380
+ media_manage_description: "Verwalten Sie Ihre Mediendateien und Assets",
1381
+ media_assets_count: "{{count}} Assets"
1382
+ };
1383
+ const mediaManagerTranslationsFr = {
1384
+ media_library: "Médiathèque",
1385
+ media_library_description: "Gérer les images et les fichiers",
1386
+ media_search_assets: "Rechercher des éléments...",
1387
+ media_grid_view: "Vue en grille",
1388
+ media_list_view: "Vue en liste",
1389
+ media_refresh: "Rafraîchir",
1390
+ media_upload: "Télécharger",
1391
+ media_error_loading: "Erreur lors du chargement des éléments : {{message}}",
1392
+ media_try_again: "Réessayer",
1393
+ media_no_assets: "Pas encore d'éléments multimédias",
1394
+ media_upload_first_file: "Téléchargez votre premier fichier",
1395
+ media_asset_updated: "Élément mis à jour avec succès",
1396
+ media_error_updating: "Erreur lors de la mise à jour de l'élément : {{message}}",
1397
+ media_asset_deleted: "Élément supprimé avec succès",
1398
+ media_error_deleting: "Erreur lors de la suppression de l'élément : {{message}}",
1399
+ media_error_getting_url: "Erreur lors de l'obtention de l'URL de téléchargement",
1400
+ media_preview_not_available: "Aperçu non disponible",
1401
+ media_dimensions: "Dimensions",
1402
+ media_size: "Taille",
1403
+ media_type: "Type",
1404
+ media_created: "Créé",
1405
+ media_file_name: "Nom du fichier",
1406
+ media_title: "Titre",
1407
+ media_alt_text: "Texte alternatif",
1408
+ media_recommended_seo: "Recommandé pour le référencement (SEO)",
1409
+ media_caption: "Légende",
1410
+ media_tags: "Balises",
1411
+ media_add_tag: "Ajouter une balise...",
1412
+ media_add: "Ajouter",
1413
+ media_save_changes: "Enregistrer les modifications",
1414
+ media_delete_asset: "Supprimer l'élément ?",
1415
+ media_delete_confirmation: 'Êtes-vous sûr de vouloir supprimer "{{name}}" ? Cette action ne peut pas être annulée.',
1416
+ media_file_too_large: "{{name}} : Fichier trop volumineux (max {{size}})",
1417
+ media_file_type_not_allowed: "{{name}} : Type de fichier non autorisé",
1418
+ media_upload_failed: "Le téléchargement a échoué",
1419
+ media_upload_files: "Télécharger des fichiers",
1420
+ media_drop_files: "Déposez les fichiers ici ou cliquez pour parcourir",
1421
+ media_max_file_size: "Taille maximale du fichier : {{size}}",
1422
+ media_selected_files_count: "Fichiers sélectionnés ({{count}})",
1423
+ media_remove: "Retirer",
1424
+ media_uploading: "Téléchargement en cours...",
1425
+ media_manage_description: "Gérez vos fichiers et éléments multimédias",
1426
+ media_assets_count: "{{count}} éléments"
1427
+ };
1428
+ const mediaManagerTranslationsIt = {
1429
+ media_library: "Libreria multimediale",
1430
+ media_library_description: "Gestisci immagini e file",
1431
+ media_search_assets: "Cerca risorse...",
1432
+ media_grid_view: "Visualizzazione griglia",
1433
+ media_list_view: "Visualizzazione elenco",
1434
+ media_refresh: "Aggiorna",
1435
+ media_upload: "Carica",
1436
+ media_error_loading: "Errore durante il caricamento delle risorse: {{message}}",
1437
+ media_try_again: "Riprova",
1438
+ media_no_assets: "Nessuna risorsa multimediale ancora presente",
1439
+ media_upload_first_file: "Carica il tuo primo file",
1440
+ media_asset_updated: "Risorsa aggiornata con successo",
1441
+ media_error_updating: "Errore durante l'aggiornamento della risorsa: {{message}}",
1442
+ media_asset_deleted: "Risorsa eliminata con successo",
1443
+ media_error_deleting: "Errore durante l'eliminazione della risorsa: {{message}}",
1444
+ media_error_getting_url: "Errore durante il recupero dell'URL di download",
1445
+ media_preview_not_available: "Anteprima non disponibile",
1446
+ media_dimensions: "Dimensioni",
1447
+ media_size: "Dimensione",
1448
+ media_type: "Tipo",
1449
+ media_created: "Creato",
1450
+ media_file_name: "Nome file",
1451
+ media_title: "Titolo",
1452
+ media_alt_text: "Testo alternativo",
1453
+ media_recommended_seo: "Consigliato per la SEO",
1454
+ media_caption: "Didascalia",
1455
+ media_tags: "Tag",
1456
+ media_add_tag: "Aggiungi un tag...",
1457
+ media_add: "Aggiungi",
1458
+ media_save_changes: "Salva modifiche",
1459
+ media_delete_asset: "Elimina risorsa?",
1460
+ media_delete_confirmation: 'Sei sicuro di voler eliminare "{{name}}"? Questa azione non può essere annullata.',
1461
+ media_file_too_large: "{{name}}: File troppo grande (max {{size}})",
1462
+ media_file_type_not_allowed: "{{name}}: Tipo di file non consentito",
1463
+ media_upload_failed: "Caricamento fallito",
1464
+ media_upload_files: "Carica file",
1465
+ media_drop_files: "Rilascia i file qui o fai clic per sfogliare",
1466
+ media_max_file_size: "Dimensione massima del file: {{size}}",
1467
+ media_selected_files_count: "File selezionati ({{count}})",
1468
+ media_remove: "Rimuovi",
1469
+ media_uploading: "Caricamento in corso...",
1470
+ media_manage_description: "Gestisci i tuoi file e risorse multimediali",
1471
+ media_assets_count: "{{count}} risorse"
1472
+ };
1473
+ const mediaManagerTranslationsHi = {
1474
+ media_library: "मीडिया लाइब्रेरी",
1475
+ media_library_description: "चित्र और फ़ाइलें प्रबंधित करें",
1476
+ media_search_assets: "संपत्तियां खोजें...",
1477
+ media_grid_view: "ग्रिड दृश्य",
1478
+ media_list_view: "सूची दृश्य",
1479
+ media_refresh: "रीफ्रेश करें",
1480
+ media_upload: "अपलोड करें",
1481
+ media_error_loading: "संपत्तियों को लोड करने में त्रुटि: {{message}}",
1482
+ media_try_again: "पुनः प्रयास करें",
1483
+ media_no_assets: "अभी तक कोई मीडिया संपत्ति नहीं",
1484
+ media_upload_first_file: "अपनी पहली फ़ाइल अपलोड करें",
1485
+ media_asset_updated: "संपत्ति सफलतापूर्वक अपडेट की गई",
1486
+ media_error_updating: "संपत्ति को अपडेट करने में त्रुटि: {{message}}",
1487
+ media_asset_deleted: "संपत्ति सफलतापूर्वक हटा दी गई",
1488
+ media_error_deleting: "संपत्ति को हटाने में त्रुटि: {{message}}",
1489
+ media_error_getting_url: "डाउनलोड URL प्राप्त करने में त्रुटि",
1490
+ media_preview_not_available: "पूर्वावलोकन उपलब्ध नहीं है",
1491
+ media_dimensions: "आयाम",
1492
+ media_size: "आकार",
1493
+ media_type: "प्रकार",
1494
+ media_created: "बनाया गया",
1495
+ media_file_name: "फ़ाइल का नाम",
1496
+ media_title: "शीर्षक",
1497
+ media_alt_text: "वैकल्पिक पाठ",
1498
+ media_recommended_seo: "SEO के लिए अनुशंसित",
1499
+ media_caption: "कैप्शन",
1500
+ media_tags: "टैग",
1501
+ media_add_tag: "एक टैग जोड़ें...",
1502
+ media_add: "जोड़ें",
1503
+ media_save_changes: "परिवर्तन सहेजें",
1504
+ media_delete_asset: "संपत्ति हटाएं?",
1505
+ media_delete_confirmation: 'क्या आप निश्चित रूप से "{{name}}" को हटाना चाहते हैं? यह क्रिया पूर्ववत नहीं की जा सकती।',
1506
+ media_file_too_large: "{{name}}: फ़ाइल बहुत बड़ी है (अधिकतम {{size}})",
1507
+ media_file_type_not_allowed: "{{name}}: फ़ाइल प्रकार की अनुमति नहीं है",
1508
+ media_upload_failed: "अपलोड विफल रहा",
1509
+ media_upload_files: "फ़ाइलें अपलोड करें",
1510
+ media_drop_files: "फ़ाइलें यहाँ छोड़ें या ब्राउज़ करने के लिए क्लिक करें",
1511
+ media_max_file_size: "अधिकतम फ़ाइल आकार: {{size}}",
1512
+ media_selected_files_count: "चयनित फ़ाइलें ({{count}})",
1513
+ media_remove: "हटाएं",
1514
+ media_uploading: "अपलोड हो रहा है...",
1515
+ media_manage_description: "अपनी मीडिया फ़ाइलें और संपत्तियां प्रबंधित करें",
1516
+ media_assets_count: "{{count}} संपत्तियां"
1517
+ };
1518
+ const mediaManagerTranslationsPt = {
1519
+ media_library: "Biblioteca de Média",
1520
+ media_library_description: "Gerir imagens e ficheiros",
1521
+ media_search_assets: "Pesquisar recursos...",
1522
+ media_grid_view: "Vista em grelha",
1523
+ media_list_view: "Vista em lista",
1524
+ media_refresh: "Atualizar",
1525
+ media_upload: "Carregar",
1526
+ media_error_loading: "Erro ao carregar recursos: {{message}}",
1527
+ media_try_again: "Tentar Novamente",
1528
+ media_no_assets: "Ainda não há recursos de média",
1529
+ media_upload_first_file: "Carregue o seu primeiro ficheiro",
1530
+ media_asset_updated: "Recurso atualizado com sucesso",
1531
+ media_error_updating: "Erro ao atualizar recurso: {{message}}",
1532
+ media_asset_deleted: "Recurso eliminado com sucesso",
1533
+ media_error_deleting: "Erro ao eliminar recurso: {{message}}",
1534
+ media_error_getting_url: "Erro ao obter URL de download",
1535
+ media_preview_not_available: "Pré-visualização não disponível",
1536
+ media_dimensions: "Dimensões",
1537
+ media_size: "Tamanho",
1538
+ media_type: "Tipo",
1539
+ media_created: "Criado",
1540
+ media_file_name: "Nome do Ficheiro",
1541
+ media_title: "Título",
1542
+ media_alt_text: "Texto Alternativo",
1543
+ media_recommended_seo: "Recomendado para SEO",
1544
+ media_caption: "Legenda",
1545
+ media_tags: "Etiquetas",
1546
+ media_add_tag: "Adicionar uma etiqueta...",
1547
+ media_add: "Adicionar",
1548
+ media_save_changes: "Guardar Alterações",
1549
+ media_delete_asset: "Eliminar Recurso?",
1550
+ media_delete_confirmation: 'Tem a certeza de que quer eliminar "{{name}}"? Esta ação não pode ser desfeita.',
1551
+ media_file_too_large: "{{name}}: Ficheiro demasiado grande (máx {{size}})",
1552
+ media_file_type_not_allowed: "{{name}}: Tipo de ficheiro não permitido",
1553
+ media_upload_failed: "Falha no carregamento",
1554
+ media_upload_files: "Carregar Ficheiros",
1555
+ media_drop_files: "Solte ficheiros aqui ou clique para navegar",
1556
+ media_max_file_size: "Tamanho máximo de ficheiro: {{size}}",
1557
+ media_selected_files_count: "Ficheiros selecionados ({{count}})",
1558
+ media_remove: "Remover",
1559
+ media_uploading: "A carregar...",
1560
+ media_manage_description: "Gerir os seus ficheiros e recursos de média",
1561
+ media_assets_count: "{{count}} recursos"
1562
+ };
1148
1563
  const DEFAULT_STORAGE_PATH = "media";
1149
1564
  const DEFAULT_COLLECTION_PATH = "media_assets";
1150
1565
  const MediaManagerConfigContext = react.createContext(null);
@@ -1207,29 +1622,41 @@
1207
1622
  return {
1208
1623
  path: "media",
1209
1624
  name: "Media Library",
1210
- description: "Manage your media files and assets",
1625
+ description: "Manage your media files",
1211
1626
  group: "Media",
1212
1627
  icon: "perm_media",
1213
1628
  view: /* @__PURE__ */ jsxRuntime.jsx(MediaLibraryViewInternal, {})
1214
1629
  };
1215
1630
  }
1216
- const MEDIA_VIEW = buildMediaView();
1217
1631
  function useMediaManagerPlugin(props) {
1632
+ const mediaView = react.useMemo(() => buildMediaView(), []);
1218
1633
  return react.useMemo(() => ({
1219
1634
  key: "media_manager",
1220
- views: [MEDIA_VIEW],
1635
+ views: [mediaView],
1221
1636
  provider: {
1222
1637
  Component: ({
1223
1638
  children
1224
1639
  }) => /* @__PURE__ */ jsxRuntime.jsx(MediaManagerConfigContext.Provider, { value: props, children })
1640
+ },
1641
+ i18n: {
1642
+ en: mediaManagerTranslationsEn,
1643
+ es: mediaManagerTranslationsEs,
1644
+ de: mediaManagerTranslationsDe,
1645
+ fr: mediaManagerTranslationsFr,
1646
+ it: mediaManagerTranslationsIt,
1647
+ hi: mediaManagerTranslationsHi,
1648
+ pt: mediaManagerTranslationsPt
1225
1649
  }
1226
1650
  }), []);
1227
1651
  }
1228
1652
  function MediaLibraryCard(t0) {
1229
- const $ = reactCompilerRuntime.c(3);
1653
+ const $ = reactCompilerRuntime.c(13);
1230
1654
  const {
1231
1655
  group
1232
1656
  } = t0;
1657
+ const {
1658
+ t
1659
+ } = core.useTranslation();
1233
1660
  if (group !== "Media") {
1234
1661
  return null;
1235
1662
  }
@@ -1248,19 +1675,53 @@
1248
1675
  t2 = $[1];
1249
1676
  }
1250
1677
  let t3;
1251
- if ($[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
1252
- t3 = /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Link, { to: "/media", className: "no-underline", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { className: t1, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
1678
+ if ($[2] !== t) {
1679
+ t3 = t("media_library");
1680
+ $[2] = t;
1681
+ $[3] = t3;
1682
+ } else {
1683
+ t3 = $[3];
1684
+ }
1685
+ let t4;
1686
+ if ($[4] !== t3) {
1687
+ t4 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "font-medium", children: t3 });
1688
+ $[4] = t3;
1689
+ $[5] = t4;
1690
+ } else {
1691
+ t4 = $[5];
1692
+ }
1693
+ let t5;
1694
+ if ($[6] !== t) {
1695
+ t5 = t("media_library_description");
1696
+ $[6] = t;
1697
+ $[7] = t5;
1698
+ } else {
1699
+ t5 = $[7];
1700
+ }
1701
+ let t6;
1702
+ if ($[8] !== t5) {
1703
+ t6 = /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-surface-accent-600 dark:text-surface-accent-400", children: t5 });
1704
+ $[8] = t5;
1705
+ $[9] = t6;
1706
+ } else {
1707
+ t6 = $[9];
1708
+ }
1709
+ let t7;
1710
+ if ($[10] !== t4 || $[11] !== t6) {
1711
+ t7 = /* @__PURE__ */ jsxRuntime.jsx(reactRouterDom.Link, { to: "/media", className: "no-underline", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Card, { className: t1, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
1253
1712
  t2,
1254
1713
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1", children: [
1255
- /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "subtitle2", className: "font-medium", children: "Media Library" }),
1256
- /* @__PURE__ */ jsxRuntime.jsx(ui.Typography, { variant: "caption", className: "text-surface-accent-600 dark:text-surface-accent-400", children: "Manage images and files" })
1714
+ t4,
1715
+ t6
1257
1716
  ] })
1258
1717
  ] }) }) });
1259
- $[2] = t3;
1718
+ $[10] = t4;
1719
+ $[11] = t6;
1720
+ $[12] = t7;
1260
1721
  } else {
1261
- t3 = $[2];
1722
+ t7 = $[12];
1262
1723
  }
1263
- return t3;
1724
+ return t7;
1264
1725
  }
1265
1726
  exports2.MediaAssetCard = MediaAssetCard;
1266
1727
  exports2.MediaAssetDetails = MediaAssetDetails;