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;
}
import { ConfigProvider } from "antd";
import classNames from "classnames";
import React, { useContext } from "react";
import { BaseToolBar } from "./BaseBar";
import { useStyle } from "./toolBarStyle";
/**
 * 浮动工具栏,用于设置文本样式
 */ var ToolBar = function(props) {
    var context = useContext(ConfigProvider.ConfigContext);
    var baseClassName = context === null || context === void 0 ? void 0 : context.getPrefixCls("agentic-md-editor-toolbar");
    var _useStyle = useStyle(baseClassName), wrapSSR = _useStyle.wrapSSR, hashId = _useStyle.hashId;
    return wrapSSR(/*#__PURE__*/ React.createElement("div", {
        onMouseDown: function(e) {
            e.preventDefault();
            e.stopPropagation();
        },
        className: classNames(baseClassName, hashId, props.prefix)
    }, /*#__PURE__*/ React.createElement(BaseToolBar, _object_spread({
        prefix: baseClassName,
        showEditor: true,
        showInsertAction: true,
        hashId: hashId
    }, props))));
};
export default /*#__PURE__*/ React.memo(ToolBar);
