import { ReactNode } from 'react'; import clsx from 'clsx'; import { Widget } from '@@/Widget'; interface Props { icon: ReactNode; iconBackgroundClassName?: string; subtitleLabel?: string; subtitleClassName?: string; title: string; badge?: ReactNode; description?: ReactNode; rightInfo?: ReactNode; actionBar?: ReactNode; containerClassName?: string; widgetClassName?: string; } export function ResourceDetailHeader({ icon, iconBackgroundClassName = 'bg-group-accent-3 th-dark:bg-group-accent-10', subtitleLabel, subtitleClassName = 'text-group-accent-10 th-dark:text-group-accent-8', title, badge, description, rightInfo, actionBar, containerClassName = 'flex items-center gap-4 p-6', widgetClassName = 'widget-body', }: Props) { return (
{rightInfo}
{actionBar}
); } interface HeaderIconProps { icon: ReactNode; iconBackgroundClassName: string; } function HeaderIcon({ icon, iconBackgroundClassName }: HeaderIconProps) { return (
{icon}
); } interface HeaderInfoProps { subtitleLabel?: string; subtitleClassName: string; title: string; badge?: ReactNode; description?: ReactNode; } function HeaderInfo({ subtitleLabel, subtitleClassName, title, badge, description, }: HeaderInfoProps) { return (
{subtitleLabel && ( {subtitleLabel} )}

{title}

{badge &&
{badge}
}
{description && {description}}
); }