/**
 * @fileoverview 代码块渲染条件Hook
 * 处理不同类型代码块的渲染逻辑
 */ import { useMemo } from "react";
export function useRenderConditions(element, readonly) {
    // 是否隐藏配置型HTML代码块
    var shouldHideConfigHtml = useMemo(function() {
        return element.language === 'html' && (element === null || element === void 0 ? void 0 : element.isConfig);
    }, [
        element.language,
        element === null || element === void 0 ? void 0 : element.isConfig
    ]);
    // 是否渲染为思考块（仅 think）
    var shouldRenderAsThinkBlock = useMemo(function() {
        return element.language === 'think' && readonly;
    }, [
        element.language,
        readonly
    ]);
    // 是否渲染为普通代码编辑器
    var shouldRenderAsCodeEditor = useMemo(function() {
        return !shouldHideConfigHtml && !shouldRenderAsThinkBlock;
    }, [
        shouldHideConfigHtml,
        shouldRenderAsThinkBlock
    ]);
    return {
        shouldHideConfigHtml: shouldHideConfigHtml,
        shouldRenderAsThinkBlock: shouldRenderAsThinkBlock,
        shouldRenderAsCodeEditor: shouldRenderAsCodeEditor
    };
}
