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 genStyle(token) {
    var _obj, _obj1, _obj2, _obj3, _obj4, _obj5, _obj6, _obj7, _obj8, _obj9, _obj10;
    return _define_property({}, token.componentCls, (_obj10 = {
        display: 'flex',
        flexDirection: 'column',
        gap: '12px',
        minWidth: '160px'
    }, _define_property(_obj10, "".concat(token.componentCls, "-header"), (_obj = {
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'space-between'
    }, _define_property(_obj, "".concat(token.componentCls, "-header-left"), {
        display: 'flex',
        alignItems: 'center',
        gap: '4px',
        flex: 1
    }), _define_property(_obj, "".concat(token.componentCls, "-title"), {
        fontFamily: 'PingFang SC',
        fontSize: '13px',
        fontWeight: 500,
        color: '#2C3E5D',
        margin: 0
    }), _define_property(_obj, "".concat(token.componentCls, "-question-icon"), {
        fontSize: '14px',
        color: '#B3B9C4',
        fontWeight: 500
    }), _obj)), _define_property(_obj10, "".concat(token.componentCls, "-value"), (_obj1 = {
        fontFamily: 'Rubik',
        fontSize: '24px',
        fontWeight: 500,
        lineHeight: 1,
        color: '#2C3E5D'
    }, _define_property(_obj1, "".concat(token.componentCls, "-value-prefix"), {
        fontFamily: 'PingFang SC',
        fontSize: '13px',
        fontWeight: 'normal',
        color: '#2C3E5D',
        marginRight: '4px'
    }), _define_property(_obj1, "".concat(token.componentCls, "-value-suffix"), {
        fontFamily: 'PingFang SC',
        fontSize: '13px',
        fontWeight: 'normal',
        color: '#2C3E5D',
        marginLeft: '4px'
    }), _obj1)), _define_property(_obj10, // Dark theme styles
    '&-dark', (_obj4 = {}, _define_property(_obj4, "".concat(token.componentCls, "-header"), (_obj2 = {}, _define_property(_obj2, "".concat(token.componentCls, "-title"), {
        color: 'rgba(255, 255, 255, 0.65)'
    }), _define_property(_obj2, "".concat(token.componentCls, "-question-icon"), {
        color: 'rgba(255, 255, 255, 0.45)',
        '&:hover': {
            color: 'rgba(255, 255, 255, 0.65)'
        }
    }), _obj2)), _define_property(_obj4, "".concat(token.componentCls, "-value"), (_obj3 = {
        color: '#fff'
    }, _define_property(_obj3, "".concat(token.componentCls, "-value-prefix"), {
        color: '#fff'
    }), _define_property(_obj3, "".concat(token.componentCls, "-value-suffix"), {
        color: '#fff'
    }), _obj3)), _obj4)), _define_property(_obj10, // Size variants
    '&-small', (_obj6 = {}, _define_property(_obj6, "".concat(token.componentCls, "-header"), (_obj5 = {}, _define_property(_obj5, "".concat(token.componentCls, "-title"), {
        fontSize: '12px'
    }), _define_property(_obj5, "".concat(token.componentCls, "-question-icon"), {
        fontSize: '14px'
    }), _obj5)), _define_property(_obj6, "".concat(token.componentCls, "-value"), {
        fontSize: '20px'
    }), _obj6)), _define_property(_obj10, '&-large', (_obj8 = {
        gap: '12px'
    }, _define_property(_obj8, "".concat(token.componentCls, "-header"), (_obj7 = {}, _define_property(_obj7, "".concat(token.componentCls, "-title"), {
        fontSize: '13px'
    }), _define_property(_obj7, "".concat(token.componentCls, "-question-icon"), {
        fontSize: '14px'
    }), _obj7)), _define_property(_obj8, "".concat(token.componentCls, "-value"), {
        fontSize: '30px'
    }), _obj8)), _define_property(_obj10, // Block mode - 占满整个区域，多个时平分父容器，左对齐
    '&-block', (_obj9 = {
        flex: 1,
        minWidth: 0,
        textAlign: 'left'
    }, _define_property(_obj9, "".concat(token.componentCls, "-header"), {
        justifyContent: 'flex-start'
    }), _define_property(_obj9, "".concat(token.componentCls, "-value"), {
        textAlign: 'left'
    }), _obj9)), _obj10));
};
/**
 * Statistic Style
 * @param prefixCls
 * @returns
 */ export function useStyle(prefixCls) {
    return useEditorStyleRegister('Statistic', function(token) {
        var statisticToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(prefixCls)
        });
        return [
            resetComponent(statisticToken),
            genStyle(statisticToken)
        ];
    });
}
