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 _obj = {}, _define_property(_obj, "".concat(token.componentCls, "-container"), {
        // overflow: 'hidden', // 会把Quote的弹框遮挡
        borderTopLeftRadius: 'inherit',
        borderTopRightRadius: 'inherit',
        // 替代 framer-motion 的 height:0↔auto + opacity 入场/退出动画。
        // 使用 grid-template-rows 0fr↔1fr 实现"任意高度"过渡。
        display: 'grid',
        gridTemplateRows: '1fr',
        opacity: 1,
        transition: 'grid-template-rows 0.3s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.3s cubic-bezier(0.25, 0.1, 0.25, 1)',
        '&[data-state="exit"]': {
            gridTemplateRows: '0fr',
            opacity: 0,
            pointerEvents: 'none'
        }
    }), _define_property(_obj, "".concat(token.componentCls), {
        borderWidth: '0px 0px 1px 0px',
        width: '100%',
        height: 'fit-content',
        borderTopLeftRadius: 'inherit',
        borderTopRightRadius: 'inherit',
        minHeight: '48px',
        alignSelf: 'stretch',
        borderStyle: 'solid',
        display: 'flex',
        alignItems: 'flex-start',
        justifyContent: 'space-between',
        // 替代 framer-motion 的 padding/backgroundColor/borderColor 关键帧动画
        padding: '12px',
        backgroundColor: 'var(--color-gray-bg-page)',
        borderColor: 'rgba(0, 16, 64, 0.0627)',
        overflow: 'hidden',
        // 内层 padding/bg/border 同步过渡
        transition: 'padding 0.3s cubic-bezier(0.25, 0.1, 0.25, 1), background-color 0.3s cubic-bezier(0.25, 0.1, 0.25, 1), border-color 0.3s cubic-bezier(0.25, 0.1, 0.25, 1), min-height 0.3s cubic-bezier(0.25, 0.1, 0.25, 1)',
        '&[data-state="exit"]': {
            padding: '0px',
            backgroundColor: 'transparent',
            borderColor: 'transparent',
            minHeight: 0
        }
    }), _define_property(_obj, "".concat(token.componentCls, "-title"), {
        flex: 1,
        font: 'var(--font-text-h5-base)',
        letterSpacing: 'var(--letter-spacing-h5-base, normal)',
        color: 'var(--color-primary-control-fill-primary)',
        minHeight: '28px'
    }), _define_property(_obj, "".concat(token.componentCls, "-right"), {
        font: 'var(--font-text-body-sm)',
        letterSpacing: 'var(--letter-spacing-body-sm, normal)',
        color: 'var(--color-gray-text-secondary)'
    }), _define_property(_obj, "".concat(token.componentCls, "-divider"), {
        margin: '0'
    }), _define_property(_obj, "".concat(token.componentCls, "-close"), {
        cursor: 'pointer',
        outline: 'none',
        border: 'none',
        background: 'transparent',
        padding: '4px',
        borderRadius: '4px',
        display: 'inline-flex',
        alignItems: 'center',
        justifyContent: 'center',
        transition: 'all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)',
        color: 'var(--color-gray-text-light)',
        '&:hover': {
            backgroundColor: 'var(--color-gray-control-fill-active)',
            color: 'var(--color-gray-text-light)',
            borderRadius: 'var(--radius-control-sm)'
        },
        '&:active': {
            backgroundColor: 'var(--color-gray-control-fill-pressed, var(--color-gray-control-fill-secondary-active))',
            outline: 'none',
            border: 'none'
        },
        '&:focus': {
            outline: "2px solid ".concat(token.colorPrimary),
            outlineOffset: '2px'
        },
        '&:focus:not(:focus-visible)': {
            outline: 'none'
        }
    }), _obj;
};
/**
 * SkillModeBar 样式 Hook
 * @param prefixCls 类名前缀
 * @returns 样式相关函数和变量
 */ var useGenStyle = genStyleHooks('SkillModeBar', 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 : 'SkillModeBar'), 2), wrapSSR = _useGenStyle[0], hashId = _useGenStyle[1];
    return {
        wrapSSR: wrapSSR,
        hashId: hashId
    };
}
