"use client"; import { memo } from "react"; import { useTranslation } from "../../../contexts/MessagesContext"; import UploadView from "./Upload.view"; import type { UploadStateValue } from "../../../../lib/propNormalization"; import type { UploadProps } from "./Upload.types"; /** * Figma: "Control / Upload". Click-to-upload tile with a label * and hint text used to add an image from the user's device. */ const UploadContainer = memo( ({ active = true, state, hasLabel, label, showHelpIcon = true, hintText, buttonLabel, previewSrc, previewAlt, fileName, onClick, className = "", }) => { const t = useTranslation("controlsChrome"); const resolvedState: UploadStateValue = state ?? (active ? "default" : "disabled"); const uploadButtonLabel = buttonLabel ?? t("uploadButton"); return ( ); }, ); UploadContainer.displayName = "Upload"; export default UploadContainer;