import PropTypes from 'prop-types';
import classNames from 'classnames';
import { useRouteMatch, NavLink } from 'react-router-dom';
import { Icon } from 'mastodon/components/icon';
const ColumnLink = ({ icon, activeIcon, iconComponent, activeIconComponent, text, to, href, method, badge, transparent, children, ...other }) => {
const match = useRouteMatch(to);
const className = classNames('column-link', { 'column-link--transparent': transparent });
const badgeElement = typeof badge !== 'undefined' ? {badge} : null;
const iconElement = (typeof icon === 'string' || iconComponent) ?
{children}
: null; if (href) { return ( {active ? activeIconElement : iconElement} {text} {badgeElement} ); } else { return (