import React from 'react';
import RawText, { RawTextDefaultProps } from './RawText';
import { st, classes } from './Text.st.css.js';
import Ellipsis, { extractEllipsisProps } from '../common/Ellipsis';
const TextWithEllipsis = ({ ellipsis = false, appendTo = Ellipsis.defaultProps.appendTo, flip = Ellipsis.defaultProps.flip, fixed = Ellipsis.defaultProps.fixed, placement = Ellipsis.defaultProps.placement, zIndex = Ellipsis.defaultProps.zIndex, enterDelay = Ellipsis.defaultProps.enterDelay, exitDelay = Ellipsis.defaultProps.exitDelay, showTooltip = Ellipsis.defaultProps.showTooltip, size = RawTextDefaultProps.size, secondary = RawTextDefaultProps.secondary, skin = RawTextDefaultProps.skin, light = RawTextDefaultProps.light, weight = RawTextDefaultProps.weight, tagName = RawTextDefaultProps.tagName, listStyle = RawTextDefaultProps.listStyle, widows = RawTextDefaultProps.widows, overflowWrap = RawTextDefaultProps.overflowWrap, id, ...propsWithNoDefaults }) => {
    const { className, tooltipProps, ...props } = {
        ...RawTextDefaultProps,
        ...Ellipsis.defaultProps,
        ellipsis,
        appendTo,
        flip,
        fixed,
        placement,
        zIndex,
        enterDelay,
        exitDelay,
        showTooltip,
        size,
        secondary,
        skin,
        light,
        weight,
        tagName,
        listStyle,
        id,
        widows,
        overflowWrap,
        ...propsWithNoDefaults,
    };
    const { ellipsisProps, componentProps } = extractEllipsisProps(props);
    return (React.createElement(Ellipsis, { ...ellipsisProps, ...tooltipProps, wrapperClassName: st(classes.root, {
            size: props.size,
            weight: props.weight,
            listStyle: props.listStyle,
        }), render: ({ ref, ellipsisClasses, ellipsisInlineStyle, renderChildren, renderElement, }) => (React.createElement(RawText, { ...componentProps, tagName: tagName, ref: ref, className: ellipsisClasses(className), style: ellipsisInlineStyle, renderChildren: renderChildren, renderElement: renderElement })) }));
};
TextWithEllipsis.displayName = 'Text';
export default TextWithEllipsis;
//# sourceMappingURL=Text.js.map