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 React from "react";
import { debugInfo } from "../../../../Utils/debugUtils";
/**
 * ReadonlyCard 组件 - 只读卡片预览组件
 *
 * 专门针对 readonly 模式优化的卡片组件，移除了选择状态和交互功能。
 * 简化渲染逻辑，提升预览模式性能。
 *
 * @component
 * @description 只读卡片预览组件，用于预览模式下的卡片渲染
 * @param {RenderElementProps} props - 组件属性
 * @param {any} props.element - 卡片节点元素
 * @param {React.ReactNode} props.children - 子组件内容
 * @param {Object} props.attributes - 元素属性
 *
 * @example
 * ```tsx
 * <ReadonlyCard
 *   element={cardNode}
 *   attributes={attributes}
 * >
 *   卡片内容
 * </ReadonlyCard>
 * ```
 *
 * @returns {React.ReactElement} 渲染的只读卡片组件
 *
 * @remarks
 * - 移除选择状态管理
 * - 移除交互功能（tabIndex、aria-selected 等）
 * - 使用 React.memo 优化性能
 * - 保持预览模式的视觉效果
 */ export var ReadonlyCard = /*#__PURE__*/ React.memo(function(props) {
    var _props_element_children;
    debugInfo('ReadonlyCard - 渲染只读卡片', {
        block: props.element.block,
        childrenCount: (_props_element_children = props.element.children) === null || _props_element_children === void 0 ? void 0 : _props_element_children.length
    });
    return /*#__PURE__*/ React.createElement("div", _object_spread_props(_object_spread({}, props.attributes), {
        "data-be": 'card',
        role: "button"
    }), props.children);
});
ReadonlyCard.displayName = 'ReadonlyCard';
