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(token) {
    var _obj;
    return _obj = {}, _define_property(_obj, token.componentCls, {
        contentEditable: false,
        cursor: 'pointer',
        backgroundColor: 'var(--color-gray-control-fill-secondary)',
        '&:hover': {
            backgroundColor: 'var(--color-gray-control-fill-secondary-hover)'
        }
    }), _define_property(_obj, "".concat(token.componentCls, "-action-buttons"), {
        position: 'absolute',
        top: '-28px',
        right: '50%',
        transform: 'translateX(50%)',
        zIndex: 10,
        display: 'flex',
        alignItems: 'center',
        gap: '2px',
        opacity: 0,
        transition: 'opacity 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)'
    }), _define_property(_obj, "".concat(token.componentCls, "-action-buttons-visible"), {
        opacity: 1
    }), _define_property(_obj, "".concat(token.componentCls, "-action-button"), {
        padding: '2px',
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
        fontSize: 12,
        border: '1px solid var(--table-border-color)',
        width: '20px',
        height: '20px',
        cursor: 'pointer',
        backgroundPosition: '50%',
        backgroundRepeat: 'no-repeat',
        transition: 'color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1), background-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)',
        borderRadius: '4px',
        background: 'var(--color-gray-bg-card-white)',
        boxShadow: 'var(--shadow-border-base)',
        color: 'var(--color-gray-text-secondary)',
        '&:hover': {
            backgroundColor: '#FFF',
            boxShadow: 'var(--shadow-control-lg)'
        }
    }), _define_property(_obj, "".concat(token.componentCls, "-delete-icon"), {
        '&:hover': {
            color: '#ff4d4f'
        }
    }), _define_property(_obj, "".concat(token.componentCls, "-insert-column-before"), {
        '&:hover': {
            color: '#52c41a'
        }
    }), _define_property(_obj, "".concat(token.componentCls, "-insert-column-after"), {
        '&:hover': {
            color: '#52c41a'
        }
    }), _obj;
};
/**
 * TableCellIndexSpacer 样式 hook
 * @param prefixCls 组件前缀类名
 * @returns 样式相关的对象
 */ export function useStyle(prefixCls) {
    return useEditorStyleRegister('md-editor-table-cell-index-spacer', function(token) {
        var editorToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(prefixCls)
        });
        return [
            resetComponent(editorToken),
            genStyle(editorToken)
        ];
    });
}
