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 { useEditorStyleRegister } from "../../../../Hooks/useStyle";
var genStyle = function genStyle(token) {
    return _define_property({}, token.componentCls, {
        // 图表容器基础样式
        position: 'relative',
        boxSizing: 'border-box',
        display: 'flex',
        flexDirection: 'column',
        // 响应式边框样式
        borderRadius: '6px',
        padding: '12px',
        minWidth: '300px',
        // 浅色主题边框
        '&&-light-theme': {
            border: '1px solid #e8e8e8',
            backgroundColor: '#fff'
        },
        // 深色主题：略浅于纯黑页面底，与雷达等图表的「卡片」层次一致
        '&&-dark-theme': {
            border: '1px solid rgba(255, 255, 255, 0.08)',
            backgroundColor: '#1f1f1f'
        },
        // 移动端适配
        '&&-mobile': {
            borderRadius: '6px',
            padding: '12px',
            margin: '0 auto',
            maxWidth: '100%',
            minWidth: '225px'
        },
        // 桌面端适配
        '&&-desktop': {
            borderRadius: '8px',
            padding: '16px',
            margin: 'initial',
            maxWidth: 'none'
        },
        '&&-borderless': {
            border: 'none!important',
            padding: 0
        },
        // 错误边界容器样式（简化版，使用 antd Result 组件）
        '&&-error-boundary': {
            // antd Result 组件已经有完善的样式，这里只需要基础容器样式
            minHeight: '200px'
        },
        // 统计数据容器样式
        '&-statistic-container': {
            display: 'flex',
            gap: '16px',
            marginBottom: '16px',
            flexWrap: 'wrap',
            alignItems: 'flex-start'
        },
        // 图表包装器样式
        '&-wrapper': {
            position: 'relative',
            width: '100%',
            height: '100%'
        }
    });
};
/**
 * 样式钩子
 * @param baseClassName 基础类名
 * @returns 样式相关对象
 */ export var useStyle = function useStyle(baseClassName) {
    return useEditorStyleRegister('Chart-Container' + baseClassName, function(token) {
        var containerToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(baseClassName)
        });
        return [
            genStyle(containerToken)
        ];
    });
};
