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;
    return _define_property({}, token.componentCls, (_obj = {
        display: 'flex',
        gap: 4,
        flexWrap: 'wrap',
        flexDirection: 'column',
        padding: '4px 20px 4px',
        '&&-compact': {
            padding: '4px 12px 4px'
        },
        '&-label': {
            display: 'flex',
            color: 'rgba(0,0,0,0.85)',
            fontSize: '1em',
            width: '100%',
            gap: 4,
            alignItems: 'center',
            justifyContent: 'space-between'
        },
        '&-list': {
            alignItems: 'center',
            flexDirection: 'column',
            borderRadius: 16,
            display: 'flex',
            flexWrap: 'nowrap',
            gap: 4,
            padding: '0px',
            overflow: 'hidden',
            // 列表入场淡入（替代 framer-motion variants 的 opacity 动画）
            animationName: "".concat(token.componentCls, "-listFadeIn"),
            animationDuration: '0.3s',
            animationTimingFunction: 'cubic-bezier(0.4, 0, 0.2, 1)',
            animationFillMode: 'both',
            '&-item': {
                display: 'flex',
                gap: 4,
                borderRadius: 8,
                padding: '2px 8px',
                fontSize: 12,
                lineHeight: '14px',
                width: '100%',
                justifyContent: 'space-between',
                alignItems: 'center',
                color: 'rgba(0,0,0,0.65)',
                // 每项入场淡入，由 inline style 通过 --doc-item-delay 注入
                // 替代 framer-motion 父级 staggerChildren 的效果
                opacity: 0,
                animationName: "".concat(token.componentCls, "-listItemFadeIn"),
                animationDuration: '0.25s',
                animationTimingFunction: 'cubic-bezier(0.4, 0, 0.2, 1)',
                animationDelay: 'var(--doc-item-delay, 0s)',
                animationFillMode: 'forwards',
                '&:hover': {
                    backgroundColor: 'rgba(0,0,0,0.02)'
                },
                '&-title': {
                    display: 'flex',
                    maxWidth: '100%',
                    gap: 4,
                    width: '100%'
                },
                '&-icon': {
                    borderRadius: 4,
                    width: 16,
                    height: 16
                }
            }
        }
    }, _define_property(_obj, "@keyframes ".concat(token.componentCls, "-listFadeIn"), {
        from: {
            opacity: 0
        },
        to: {
            opacity: 1
        }
    }), _define_property(_obj, "@keyframes ".concat(token.componentCls, "-listItemFadeIn"), {
        from: {
            opacity: 0
        },
        to: {
            opacity: 1
        }
    }), _obj));
};
/**
 * Probubble
 * @param prefixCls
 * @returns
 */ var useGenStyle = genStyleHooks('BubbleDocInfo', 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 : 'DocInfo'), 2), wrapSSR = _useGenStyle[0], hashId = _useGenStyle[1];
    return {
        wrapSSR: wrapSSR,
        hashId: hashId
    };
}
