"use client"; import React from "react"; import { Building2 } from "lucide-react"; import { Card, Badge, Button } from "../../"; import { HeaderProps } from "./type"; function Avatar({ avatar, initials, icon, }: Pick) { if (avatar) return <>{avatar}; if (initials) { return (
{initials}
); } return (
{icon ?? }
); } export default function HeaderDetails({ title, subtitle, subtitleIcon, avatar, initials, icon, badges, actions, actionsSlot, meta, accent = true, className = "", }: HeaderProps) { const hasActions = actionsSlot || (actions && actions.length > 0); const hasMeta = meta && meta.length > 0; return ( {accent && (
)}
{/* Top row: identity + actions */}

{title}

{/* {badges?.map((badge, i) => ( {badge.icon && ( {badge.icon} )} {badge.label} ))} */}
{subtitle && (

{subtitleIcon ?? } {subtitle}

)}
{hasActions && (
{actionsSlot} {actions?.map((action, i) => ( ))}
)}
{/* Lower meta section: Owner / Industry / Deal Value / Created, etc. */} {hasMeta && (
{meta!.map((item, i) => (
{item.icon}
{item.label} {item.value}
))}
)}
); }