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;
    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 样式相关函数和变量
 */ export function useStyle(prefixCls) {
    return useEditorStyleRegister('SkillModeBar', function(token) {
        var skillModeToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(prefixCls)
        });
        return [
            resetComponent(skillModeToken),
            genStyle(skillModeToken)
        ];
    });
}
