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 clsx from "clsx";
import React from "react";
/**
 * ReadonlyBlockquote 组件 - 只读引用块预览组件
 *
 * 专门针对 readonly 模式优化的引用块组件，移除了拖拽功能。
 * 当 otherProps 含 markdownContainerType 时渲染为 div.markdown-container（提示块）。
 *
 * @component
 * @description 只读引用块预览组件，用于预览模式下的引用块渲染
 * @param {ElementProps<BlockQuoteNode>} props - 组件属性
 * @param {BlockQuoteNode} props.element - 引用块节点元素
 * @param {React.ReactNode} props.children - 子组件内容
 * @param {Object} props.attributes - 元素属性
 *
 * @example
 * ```tsx
 * <ReadonlyBlockquote
 *   element={blockquoteNode}
 *   attributes={attributes}
 * >
 *   引用内容
 * </ReadonlyBlockquote>
 * ```
 *
 * @returns {React.ReactElement} 渲染的只读引用块组件
 *
 * @remarks
 * - 移除拖拽相关事件处理
 * - 使用 React.memo 优化性能
 * - 保持预览模式的视觉效果
 * - 支持 ::: 提示块（info/warning/success/error/tip）渲染为 markdown-container
 */ export var ReadonlyBlockquote = /*#__PURE__*/ React.memo(function(props) {
    var _props_element_otherProps, _props_element, _props_element_otherProps1, _props_element1;
    var containerType = (_props_element = props.element) === null || _props_element === void 0 ? void 0 : (_props_element_otherProps = _props_element.otherProps) === null || _props_element_otherProps === void 0 ? void 0 : _props_element_otherProps.markdownContainerType;
    var containerTitle = (_props_element1 = props.element) === null || _props_element1 === void 0 ? void 0 : (_props_element_otherProps1 = _props_element1.otherProps) === null || _props_element_otherProps1 === void 0 ? void 0 : _props_element_otherProps1.markdownContainerTitle;
    if (containerType) {
        var _props_attributes;
        return /*#__PURE__*/ React.createElement("div", _object_spread_props(_object_spread({}, props.attributes), {
            "data-be": "blockquote",
            className: clsx('markdown-container', containerType, (_props_attributes = props.attributes) === null || _props_attributes === void 0 ? void 0 : _props_attributes.className)
        }), containerTitle ? /*#__PURE__*/ React.createElement("div", {
            className: "markdown-container__title"
        }, containerTitle) : null, props.children);
    }
    return /*#__PURE__*/ React.createElement("blockquote", _object_spread({
        "data-be": 'blockquote'
    }, props.attributes), props.children);
});
ReadonlyBlockquote.displayName = 'ReadonlyBlockquote';
