import { j as r } from "../../_virtual/jsx-runtime.js";
import { FileInfoContainer as m, FileInfo as d, InfoSubheading as l, SizeBody as x, MessageBody as n } from "./styles.js";
import { Spinner as j } from "../Spinner/index.js";
import { getUploaderTitle as c, getUploaderDescription as a } from "./utils.js";
import h from "../../icons/AlertCircle.js";
import f from "../../icons/CheckCircle.js";
const T = ({
  file: i,
  uploaderTitle: t,
  maxSizeDescription: p,
  loading: s,
  successMessage: e,
  errorMessage: o
}) => /* @__PURE__ */ r.jsxs(m, { children: [
  /* @__PURE__ */ r.jsxs(d, { children: [
    s && /* @__PURE__ */ r.jsx("div", { children: /* @__PURE__ */ r.jsx(j, { variant: "secondary", size: "M" }) }),
    /* @__PURE__ */ r.jsx(l, { title: i && typeof i != "string" ? i.name : "", children: c({ file: i, uploaderTitle: t }) }),
    /* @__PURE__ */ r.jsx(x, { children: a({ file: i, maxSizeDescription: p }) })
  ] }),
  e && !o && /* @__PURE__ */ r.jsxs(n, { messageType: "success", children: [
    /* @__PURE__ */ r.jsx(f, {}),
    e
  ] }),
  o && !e && /* @__PURE__ */ r.jsxs(n, { messageType: "error", children: [
    /* @__PURE__ */ r.jsx(h, {}),
    o
  ] })
] });
export {
  T as FileInfoWrapper
};
