import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import { SoftIcon } from '../../Icon';
export const SoftFormControlLayoutCustomIcon = ({ className, onClick, type, iconRef, ...rest }) => {
    const classes = classNames('softFormControlLayoutCustomIcon', className, {
        'softFormControlLayoutCustomIcon--clickable': onClick,
    });
    if (onClick) {
        return (React.createElement("button", Object.assign({ type: "button", onClick: onClick, className: classes, ref: iconRef }, rest),
            React.createElement(SoftIcon, { className: "softFormControlLayoutCustomIcon__icon", "aria-hidden": "true", type: type })));
    }
    return (React.createElement("span", Object.assign({ className: classes, ref: iconRef }, rest),
        React.createElement(SoftIcon, { className: "softFormControlLayoutCustomIcon__icon", "aria-hidden": "true", type: type })));
};
// @ts-ignore
SoftFormControlLayoutCustomIcon.propTypes = {
    className: PropTypes.string,
    onClick: PropTypes.func,
    type: PropTypes.string,
    iconRef: PropTypes.func,
};
//# sourceMappingURL=SoftFormControlLayoutCustomIcon.js.map