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 } from "../../../Hooks/useStyle";
var SINGLE_COLUMN_BREAKPOINT = 480;
var genStyle = function genStyle(token) {
    return _define_property({}, token.componentCls, _define_property({
        display: 'flex',
        flexDirection: 'column',
        gap: token.paddingSM,
        width: '100%',
        '&-header': {
            display: 'flex',
            alignItems: 'center',
            gap: token.paddingSM,
            padding: "".concat(token.paddingXS, "px 0"),
            flexWrap: 'wrap'
        },
        '&-title': {
            fontSize: token.fontSizeLG,
            fontWeight: token.fontWeightStrong,
            color: token.colorTextHeading,
            margin: 0,
            lineHeight: token.lineHeightHeading4
        },
        '&-toolbar': {
            marginInlineStart: 'auto',
            display: 'flex',
            gap: token.paddingXS,
            alignItems: 'center',
            flexWrap: 'wrap'
        },
        '&-grid': {
            display: 'grid',
            gridTemplateColumns: '1fr 1fr',
            gridTemplateRows: '1fr 1fr',
            border: "1px solid ".concat(token.colorBorderSecondary),
            borderRadius: token.borderRadiusLG,
            overflow: 'hidden',
            minHeight: 200
        },
        '&-quadrant': {
            display: 'flex',
            flexDirection: 'column',
            padding: token.paddingSM,
            minHeight: 80,
            overflow: 'hidden',
            '&--q0': {
                backgroundColor: "".concat(token.colorSuccessBg),
                borderInlineEnd: "1px dashed ".concat(token.colorBorderSecondary),
                borderBlockEnd: "1px dashed ".concat(token.colorBorderSecondary)
            },
            '&--q1': {
                backgroundColor: "".concat(token.colorInfoBg),
                borderBlockEnd: "1px dashed ".concat(token.colorBorderSecondary)
            },
            '&--q2': {
                backgroundColor: "".concat(token.colorWarningBg),
                borderInlineEnd: "1px dashed ".concat(token.colorBorderSecondary)
            },
            '&--q3': {
                backgroundColor: "".concat(token.colorFillQuaternary)
            }
        },
        '&-quadrant-label': {
            fontSize: token.fontSizeSM,
            fontWeight: token.fontWeightStrong,
            color: token.colorTextSecondary,
            marginBlockEnd: token.paddingXS,
            lineHeight: token.lineHeightSM
        },
        '&-quadrant-items': {
            display: 'flex',
            flexWrap: 'wrap',
            gap: token.paddingXXS,
            flex: 1,
            alignContent: 'flex-start'
        },
        '&-item': {
            display: 'inline-flex',
            alignItems: 'center',
            padding: "".concat(token.paddingXXS, "px ").concat(token.paddingXS, "px"),
            borderRadius: token.borderRadiusSM,
            backgroundColor: token.colorBgContainer,
            border: "1px solid ".concat(token.colorBorderSecondary),
            fontSize: token.fontSizeSM,
            color: token.colorText,
            lineHeight: token.lineHeightSM,
            maxWidth: '100%',
            overflow: 'hidden',
            textOverflow: 'ellipsis',
            whiteSpace: 'nowrap',
            transition: "border-color ".concat(token.motionDurationMid, " ").concat(token.motionEaseOut, ", box-shadow ").concat(token.motionDurationMid, " ").concat(token.motionEaseOut)
        },
        '@media (hover: hover)': _define_property({}, "".concat(token.componentCls, "-item:hover"), {
            borderColor: token.colorPrimaryBorderHover,
            boxShadow: token.boxShadowTertiary
        }),
        '&-empty': {
            padding: token.paddingLG,
            color: token.colorTextDescription,
            textAlign: 'center'
        }
    }, "@media (max-width: ".concat(SINGLE_COLUMN_BREAKPOINT, "px)"), {
        '&-grid': {
            gridTemplateColumns: '1fr',
            gridTemplateRows: 'repeat(4, auto)'
        },
        '&-quadrant': {
            '&--q0': {
                borderInlineEnd: 'none',
                borderBlockEnd: "1px dashed ".concat(token.colorBorderSecondary)
            },
            '&--q1': {
                borderBlockEnd: "1px dashed ".concat(token.colorBorderSecondary)
            },
            '&--q2': {
                borderInlineEnd: 'none',
                borderBlockEnd: "1px dashed ".concat(token.colorBorderSecondary)
            }
        }
    }));
};
var useGenStyle = genStyleHooks('QuadrantChart', genStyle);
export var useStyle = function useStyle(prefixCls) {
    var _useGenStyle = _sliced_to_array(useGenStyle(prefixCls), 2), wrapSSR = _useGenStyle[0], hashId = _useGenStyle[1];
    return {
        wrapSSR: wrapSSR,
        hashId: hashId
    };
};
