import { __assign, __rest } from "tslib";
import { Balloon, Icon } from '@alicloud/console-components';
import classnames from 'classnames';
import React from 'react';
// 无状态组件
var IconHelp = function (size, type, color, iconStyle) { return (React.createElement(Icon, { style: __assign({ color: color }, iconStyle), size: size, type: type })); };
var LPBalloonIcon = function (_a) {
    var container = _a.container, iconSize = _a.iconSize, iconType = _a.iconType, title = _a.title, children = _a.children, className = _a.className, iconColor = _a.iconColor, iconStyle = _a.iconStyle, other = __rest(_a, ["container", "iconSize", "iconType", "title", "children", "className", "iconColor", "iconStyle"]);
    return (React.createElement("span", { className: classnames('lp-balloon-container', className) },
        title ? React.createElement("span", { className: "lp-margin-right" }, title) : null,
        children ? React.createElement(Balloon, __assign({ popupContainer: container, 
            // TODO 无法拆分一个单独的无状态组件引用，会导致trigger无效
            // trigger={<IconHelp size={size} type={type} />}
            trigger: IconHelp(iconSize, iconType, iconColor, iconStyle) }, other), children) : IconHelp(iconSize, iconType, iconColor, iconStyle)));
};
export default LPBalloonIcon;
LPBalloonIcon.defaultProps = {
    iconType: 'help',
    iconSize: 'small',
    closable: false,
    align: 't',
    autoFocus: false,
    triggerType: 'hover',
    iconColor: '#cccccc'
};
