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 { useEditorStyleRegister } from "../../Hooks/useStyle";
export var prefixCls = 'top-operating-area';
// 样式生成函数
var genTopOperatingAreaStyle = function(token) {
    var _obj;
    return _define_property({}, token.componentCls, (_obj = {
        position: 'relative',
        display: 'grid',
        gridTemplateColumns: '1fr auto 1fr',
        alignItems: 'center',
        height: 32,
        marginBottom: 8,
        width: '100%'
    }, _define_property(_obj, '&-left', {
    }), _define_property(_obj, '&-center', _define_property({
        display: 'flex',
        justifyContent: 'center',
        alignItems: 'center',
        gridColumn: 2
    }, '&-buttons', {
        display: 'flex',
        justifyContent: 'center',
        alignItems: 'center',
        gap: token.marginXS,
        height: '100%'
    })), _define_property(_obj, '&-right', {
        display: 'flex',
        alignItems: 'center',
        gap: token.marginXS,
        justifyContent: 'flex-end',
        gridColumn: 3,
        minWidth: 40
    }), _define_property(_obj, '&-back-buttons', {
        display: 'flex',
        alignItems: 'center',
        gap: 4,
        transition: 'opacity 0.3s ease',
        // 显示状态
        '&-visible': {
            visibility: 'visible',
            opacity: 1
        },
        // 隐藏状态
        '&-hidden': {
            visibility: 'hidden',
            opacity: 0
        }
    }), _obj));
};
export var useStyle = function(prefixCls) {
    return useEditorStyleRegister(prefixCls, function(token) {
        var topOperatingAreaToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(prefixCls)
        });
        return [
            genTopOperatingAreaStyle(topOperatingAreaToken)
        ];
    });
};
