import React from "react";
import PropTypes from "prop-types";
import cn from "classnames";

export interface ICloudBeesNavigationItemTitleProps {
  ["data-testid"]?: string;
  className?: string;
  children?: React.ReactNode | React.ReactNode[];
}

const CloudBeesNavigationItemTitle = (props: ICloudBeesNavigationItemTitleProps) => {
  const { children, className } = props;

  const testId = props["data-testid"] || "honeyui-cloudbees-navigation-item-title";

  return (
    <span className={cn("h4", "mb-0", className)} data-testid={testId}>
      {children}
    </span>
  );
};

CloudBeesNavigationItemTitle.propTypes = {
  className: PropTypes.string
};

CloudBeesNavigationItemTitle.displayName = "Cloudbees Navigation Item Title";

export default CloudBeesNavigationItemTitle;
