function _array_like_to_array(arr, len) {
    if (len == null || len > arr.length) len = arr.length;
    for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
    return arr2;
}
function _array_with_holes(arr) {
    if (Array.isArray(arr)) return arr;
}
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 _iterable_to_array_limit(arr, i) {
    var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
    if (_i == null) return;
    var _arr = [];
    var _n = true;
    var _d = false;
    var _s, _e;
    try {
        for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
            _arr.push(_s.value);
            if (i && _arr.length === i) break;
        }
    } catch (err) {
        _d = true;
        _e = err;
    } finally{
        try {
            if (!_n && _i["return"] != null) _i["return"]();
        } finally{
            if (_d) throw _e;
        }
    }
    return _arr;
}
function _non_iterable_rest() {
    throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _sliced_to_array(arr, i) {
    return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
}
function _unsupported_iterable_to_array(o, minLen) {
    if (!o) return;
    if (typeof o === "string") return _array_like_to_array(o, minLen);
    var n = Object.prototype.toString.call(o).slice(8, -1);
    if (n === "Object" && o.constructor) n = o.constructor.name;
    if (n === "Map" || n === "Set") return Array.from(n);
    if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
}
import { genStyleHooks, resetComponent } 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',
        flexDirection: 'column',
        alignItems: 'flex-start',
        gap: '2px',
        flex: 1
    }), _define_property(_obj, "".concat(token.componentCls, "-header-row"), {
        display: 'flex',
        alignItems: 'center',
        gap: '4px'
    }), _define_property(_obj, "".concat(token.componentCls, "-title"), {
        fontFamily: 'PingFang SC',
        fontSize: '13px',
        fontWeight: 500,
        color: 'var(--color-gray-text-default)',
        margin: 0
    }), _define_property(_obj, "".concat(token.componentCls, "-subtitle"), {
        fontFamily: 'PingFang SC',
        fontSize: '12px',
        fontWeight: 400,
        color: 'var(--color-gray-text-light)',
        margin: 0,
        lineHeight: 1.4
    }), _define_property(_obj, "".concat(token.componentCls, "-question-icon"), {
        fontSize: '14px',
        color: 'var(--color-gray-text-secondary)',
        fontWeight: 500
    }), _obj)), _define_property(_obj10, "".concat(token.componentCls, "-value"), (_obj1 = {
        fontFamily: 'Rubik',
        fontSize: '24px',
        fontWeight: 500,
        lineHeight: 1,
        color: 'var(--color-gray-text-default)'
    }, _define_property(_obj1, "".concat(token.componentCls, "-value-prefix"), {
        fontFamily: 'PingFang SC',
        fontSize: '13px',
        fontWeight: 'normal',
        color: 'var(--color-gray-text-default)',
        marginRight: '4px'
    }), _define_property(_obj1, "".concat(token.componentCls, "-value-suffix"), {
        fontFamily: 'PingFang SC',
        fontSize: '13px',
        fontWeight: 'normal',
        color: 'var(--color-gray-text-default)',
        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, "-subtitle"), {
        color: 'rgba(255, 255, 255, 0.45)'
    }), _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: 'var(--color-gray-bg-card-white)'
    }, _define_property(_obj3, "".concat(token.componentCls, "-value-prefix"), {
        color: 'var(--color-gray-bg-card-white)'
    }), _define_property(_obj3, "".concat(token.componentCls, "-value-suffix"), {
        color: 'var(--color-gray-bg-card-white)'
    }), _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, "-subtitle"), {
        fontSize: '11px'
    }), _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, "-subtitle"), {
        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
 */ var useGenStyle = genStyleHooks('ChartStatistic', function(token, info) {
    return [
        resetComponent(token),
        genStyle(token, info)
    ];
});
export function useStyle(prefixCls) {
    var _useGenStyle = _sliced_to_array(useGenStyle(prefixCls !== null && prefixCls !== void 0 ? prefixCls : 'Statistic'), 2), wrapSSR = _useGenStyle[0], hashId = _useGenStyle[1];
    return {
        wrapSSR: wrapSSR,
        hashId: hashId
    };
}
