/**
 * @fileoverview 工具栏配置Hook
 * 负责组装工具栏的属性和事件处理
 */ import { useCallback } from "react";
export function useToolbarConfig(param) {
    var element = param.element, readonly = param.readonly, onCloseClick = param.onCloseClick, setLanguage = param.setLanguage, isSelected = param.isSelected, onSelectionChange = param.onSelectionChange, onViewModeToggle = param.onViewModeToggle, viewMode = param.viewMode, onLocalPreview = param.onLocalPreview;
    // 组装语言选择器属性
    var languageSelectorProps = useCallback(function() {
        return {
            element: element,
            containerRef: {
                current: null
            },
            setLanguage: setLanguage
        };
    }, [
        element,
        setLanguage
    ])();
    // 组装工具栏属性
    var toolbarProps = useCallback(function() {
        return {
            element: element,
            readonly: readonly,
            onCloseClick: onCloseClick,
            languageSelectorProps: languageSelectorProps,
            isSelected: isSelected,
            onSelectionChange: onSelectionChange,
            onViewModeToggle: onViewModeToggle,
            viewMode: viewMode,
            onLocalPreview: onLocalPreview
        };
    }, [
        element,
        readonly,
        onCloseClick,
        languageSelectorProps,
        isSelected,
        onSelectionChange,
        onViewModeToggle,
        viewMode,
        onLocalPreview
    ])();
    return {
        toolbarProps: toolbarProps
    };
}
