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 { resetComponent, useEditorStyleRegister } from "../../../Hooks/useStyle";
var genStyle = function(token) {
    var _obj, _obj1;
    return _define_property({}, "".concat(token.componentCls, "-container"), (_obj1 = {}, // 散点图容器样式
    _define_property(_obj1, "".concat(token.componentCls, "-chart-wrapper"), {
        width: '100%',
        height: 'calc(100% - 120px)',
        minHeight: '300px',
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
        overflow: 'hidden'
    }), // 统计数据容器样式
    _define_property(_obj1, "".concat(token.componentCls, "-statistic-container"), {
        display: 'flex',
        gap: '16px',
        marginBottom: '16px',
        flexWrap: 'wrap',
        alignItems: 'flex-start'
    }), // 确保图表不会超出容器边界
    _define_property(_obj1, "canvas", {
        maxWidth: '100% !important',
        maxHeight: '100% !important'
    }), _define_property(_obj1, // 移动端响应式样式
    '@media (max-width: 768px)', (_obj = {}, // 移动端优化
    _define_property(_obj, "".concat(token.componentCls, "-chart-wrapper"), {
        height: 'calc(100% - 100px)',
        minHeight: '250px'
    }), // 移动端图表标题样式优化
    _define_property(_obj, "".concat(token.componentCls, "-chart-title"), {
        fontSize: '14px',
        marginBottom: '8px',
        textAlign: 'center'
    }), // 移动端筛选器样式优化
    _define_property(_obj, "".concat(token.componentCls, "-chart-filter"), _define_property({
        flexWrap: 'wrap',
        gap: '8px',
        marginBottom: '12px'
    }, "".concat(token.componentCls, "-filter-button"), {
        fontSize: '12px',
        padding: '6px 12px'
    })), _obj)), // 超小屏幕优化 (375px以下)
    _define_property(_obj1, '@media (max-width: 375px)', _define_property({
        padding: '8px'
    }, "".concat(token.componentCls, "-chart-wrapper"), {
        minHeight: '220px'
    })), _obj1));
};
/**
 * ScatterChart Style
 * @param prefixCls
 * @returns
 */ export function useStyle(prefixCls) {
    return useEditorStyleRegister('ScatterChart', function(token) {
        var scatterChartToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(prefixCls)
        });
        return [
            resetComponent(scatterChartToken),
            genStyle(scatterChartToken)
        ];
    });
}
