import React from 'react';
import PropTypes from 'prop-types';
import { useManagementTableHeader } from '../../../utils/hooks/';
import { MaterialIcon } from '../../_shared/material-icon/MaterialIcon';
export function ManageUsersItemHeader(props) {
const [sort, order, isSelected, sortByColumn, checkAll] = useManagementTableHeader({ ...props, type: 'users' });
return (
Username
{props.has_roles ?
Role
: null}
{props.has_verified ?
Verified
: null}
{props.has_trusted ?
Trusted
: null}
Featured
);
}
ManageUsersItemHeader.propTypes = {
sort: PropTypes.string.isRequired,
order: PropTypes.string.isRequired,
selected: PropTypes.bool.isRequired,
onClickColumnSort: PropTypes.func,
onCheckAllRows: PropTypes.func,
has_roles: PropTypes.bool,
has_verified: PropTypes.bool,
has_trusted: PropTypes.bool,
};
ManageUsersItemHeader.defaultProps = {
has_roles: false,
has_verified: false,
has_trusted: false,
};