"use client";
import { memo } from "react";
import Image from "next/image";
import type { MiniViewProps } from "./Mini.types";
function MiniView({
children,
className,
backgroundColor,
panelContent,
label,
labelLine1,
labelLine2,
computedAriaLabel,
wrapperElement,
wrapperProps,
}: MiniViewProps) {
const cardContentElement = (
{/* Top part - Inner panel */}
{/* Content for the inner panel */}
{panelContent && (
)}
{children}
{/* Bottom part - Text container */}
{labelLine1 && labelLine2 ? (
<>
{labelLine1}
{labelLine2}
>
) : (
label
)}
);
if (wrapperElement === "a") {
return (
)}>
{cardContentElement}
);
}
if (wrapperElement === "button") {
return (
);
}
return (
)}>
{cardContentElement}
);
}
MiniView.displayName = "MiniView";
export default memo(MiniView);