import React from 'react';
import PropTypes from 'prop-types';
import SortableLabel from '../SortableLabel/SortableLabel';
import NonSortableLabel from '../NonSortableLabel/NonSortableLabel';
var ListingHeaderLabel = function (_a) {
    var className = _a.className, label = _a.label, sortByType = _a.sortByType, onSortChange = _a.onSortChange;
    var LabelComponent = sortByType ? SortableLabel : NonSortableLabel;
    if (!label) {
        return null;
    }
    return (React.createElement(LabelComponent, { className: [
            'listing__column-heading__label',
            className,
        ]
            .filter(Boolean)
            .join(' '), label: label, sortByType: sortByType, onSortChange: onSortChange }));
};
ListingHeaderLabel.propTypes = {
    label: PropTypes.string,
    className: PropTypes.string,
    sortByType: PropTypes.string,
    onSortChange: PropTypes.func,
};
ListingHeaderLabel.defaultProps = {};
export default ListingHeaderLabel;
//# sourceMappingURL=ListingHeaderLabel.js.map