/**
 * Internal dependencies
 */
import SidebarNavigationItem from '../sidebar-navigation-item';
import { jsx as _jsx } from "react/jsx-runtime";
export default function CategoryItem({
  count,
  icon,
  id,
  isActive,
  label,
  type
}) {
  if (!count) {
    return;
  }
  const queryArgs = [`postType=${type}`];
  if (id) {
    queryArgs.push(`categoryId=${id}`);
  }
  return /*#__PURE__*/_jsx(SidebarNavigationItem, {
    icon: icon,
    suffix: /*#__PURE__*/_jsx("span", {
      children: count
    }),
    "aria-current": isActive ? 'true' : undefined,
    to: `/pattern?${queryArgs.join('&')}`,
    children: label
  });
}
//# sourceMappingURL=category-item.js.map