"use client"; import { memo } from "react"; import InputLabel from "../../type/InputLabel"; import type { UploadViewProps } from "./Upload.types"; function UploadView({ state, hasLabel, label, showHelpIcon = true, hintText, uploadButtonLabel, uploadAriaLabel, onClick, className = "", }: UploadViewProps) { const isActive = state !== "disabled"; const isDisabled = state === "disabled"; // Button styles based on active state const buttonBgClass = isActive ? "bg-[var(--color-surface-invert-primary)]" : "bg-[var(--color-surface-default-secondary)]"; const buttonTextColor = isActive ? "text-[color:var(--color-content-invert-primary)]" : "text-[color:var(--color-content-invert-tertiary)]"; // Description text color based on active state const descriptionTextColor = isActive ? "text-[color:var(--color-content-default-primary)]" : "text-[color:var(--color-content-default-tertiary)]"; // Icon color based on active state const iconColor = isActive ? "text-[color:var(--color-content-invert-primary)]" : "text-[color:var(--color-content-invert-tertiary)]"; return (
{/* Label using InputLabel component */} {hasLabel && label ? ( ) : null} {/* Upload container — max width per create-flow spec */}
{/* Upload button */} {/* Description text */}

{hintText}

); } UploadView.displayName = "UploadView"; export default memo(UploadView);