import React, { ReactNode } from 'react';
import { FilterProps } from '../../model';

export function FilterTagContent<V>({
  filterProps,
  children,
}: {
  filterProps?: FilterProps<V>;
  children?: ReactNode;
}) {
  const filterName =
    filterProps?.toolbarTagProps?.label ??
    filterProps?.accordionItemProps?.label;

  return (
    <>
      {filterName && (
        <span style={{ fontWeight: 530 }}>{`${filterName}: `}</span>
      )}
      {children}
    </>
  );
}
