function _define_property(obj, key, value) {
    if (key in obj) {
        Object.defineProperty(obj, key, {
            value: value,
            enumerable: true,
            configurable: true,
            writable: true
        });
    } else {
        obj[key] = value;
    }
    return obj;
}
function _object_spread(target) {
    for(var i = 1; i < arguments.length; i++){
        var source = arguments[i] != null ? arguments[i] : {};
        var ownKeys = Object.keys(source);
        if (typeof Object.getOwnPropertySymbols === "function") {
            ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
                return Object.getOwnPropertyDescriptor(source, sym).enumerable;
            }));
        }
        ownKeys.forEach(function(key) {
            _define_property(target, key, source[key]);
        });
    }
    return target;
}
function ownKeys(object, enumerableOnly) {
    var keys = Object.keys(object);
    if (Object.getOwnPropertySymbols) {
        var symbols = Object.getOwnPropertySymbols(object);
        if (enumerableOnly) {
            symbols = symbols.filter(function(sym) {
                return Object.getOwnPropertyDescriptor(object, sym).enumerable;
            });
        }
        keys.push.apply(keys, symbols);
    }
    return keys;
}
function _object_spread_props(target, source) {
    source = source != null ? source : {};
    if (Object.getOwnPropertyDescriptors) {
        Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
    } else {
        ownKeys(Object(source)).forEach(function(key) {
            Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
        });
    }
    return target;
}
import { useEditorStyleRegister } from "../../Hooks/useStyle";
var genStyle = function genStyle(token) {
    var _obj;
    return _obj = {}, // 加载状态容器（compact模式）
    _define_property(_obj, "".concat(token.componentCls, "-messages-content-loading"), {
        lineHeight: '24px',
        display: 'flex',
        alignItems: 'center',
        gap: 'var(--padding-2x)',
        padding: 'var(--padding-3x)',
        '&-compact': {
            padding: 'var(--padding-2x)'
        },
        '&-default': {
            padding: 'var(--padding-3x)'
        }
    }), // 消息内容容器
    _define_property(_obj, "".concat(token.componentCls, "-messages-content-message"), {
        lineHeight: '24px'
    }), // 用户消息文本颜色
    _define_property(_obj, "".concat(token.componentCls, "-messages-content-user-text"), {
        color: '#343A45'
    }), // Popover 标题容器
    _define_property(_obj, "".concat(token.componentCls, "-messages-content-popover-title"), {
        display: 'flex',
        justifyContent: 'space-between',
        alignItems: 'center',
        fontSize: '1em'
    }), // Popover 内容容器
    _define_property(_obj, "".concat(token.componentCls, "-messages-content-popover-content"), {
        width: 400,
        display: 'flex',
        maxHeight: 400,
        overflow: 'auto',
        flexDirection: 'column',
        gap: 'var(--padding-3x)'
    }), // MarkdownEditor 容器样式
    _define_property(_obj, "".concat(token.componentCls, "-messages-content-markdown-editor"), {
        padding: 0,
        width: '100%'
    }), // 重新生成按钮容器
    _define_property(_obj, "div[data-messages-content-retry]", {
        gap: 4,
        display: 'flex',
        cursor: 'pointer',
        alignItems: 'center'
    }), // 文档标签容器
    _define_property(_obj, "".concat(token.componentCls, "-messages-content-doc-tag"), {
        borderRadius: 'var(--padding-5x)',
        opacity: 1,
        display: 'flex',
        flexDirection: 'row',
        alignItems: 'center',
        padding: 'var(--padding-2x) var(--padding-3x)',
        gap: 'var(--padding-2x)',
        alignSelf: 'stretch',
        background: '#FBFCFD',
        cursor: 'pointer',
        zIndex: 1
    }), // 文档标签图标
    _define_property(_obj, "".concat(token.componentCls, "-messages-content-doc-tag-icon"), {
        width: 24
    }), // 文档名称文本
    _define_property(_obj, "".concat(token.componentCls, "-messages-content-doc-name"), {
        overflow: 'hidden',
        textOverflow: 'ellipsis',
        WebkitBoxOrient: 'vertical',
        WebkitLineClamp: 2,
        display: '-webkit-box'
    }), _obj;
};
export function useMessagesContentStyle(componentCls) {
    return useEditorStyleRegister('BubbleMessageDisplay', function(token) {
        var chatToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(componentCls)
        });
        return genStyle(chatToken);
    });
}
