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) {
    return _define_property({}, token.componentCls, _define_property({
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
        minWidth: '2em',
        height: '2em',
        fontSize: '16px',
        padding: '0.5em',
        borderRadius: '8px',
        transition: 'background-color 0.3s ease',
        cursor: 'pointer',
        color: 'var(--color-gray-text-secondary)',
        gap: 4,
        '&:hover': {
            backgroundColor: 'var(--color-gray-control-fill-hover)'
        }
    }, "".concat(token.componentCls, "-file-list"), {
        '&-item': {
            width: '178px',
            height: '56px',
            borderRadius: '12px',
            opacity: 1,
            background: '#FFFFFF',
            boxSizing: 'border-box',
            border: '1px solid #E6ECF4',
            padding: '8px',
            display: 'flex',
            flexDirection: 'row',
            alignItems: 'center',
            cursor: 'pointer',
            gap: '8px',
            position: 'relative',
            '&-file-icon': {
                width: '40px',
                height: '40px'
            },
            '&-file-info': {
                display: 'flex',
                flexDirection: 'column',
                gap: 2,
                '&-file-name': {
                    display: 'flex',
                    width: '112px',
                    '&-text': {
                        maxWidth: '98px',
                        overflow: 'hidden',
                        textOverflow: 'ellipsis',
                        WebkitLineClamp: 1,
                        height: 22,
                        WebkitBoxOrient: 'vertical'
                    },
                    '&-extension': {
                        color: 'rgba(0, 0, 0, 0.45)'
                    }
                },
                '&-file-size': {
                    color: '#B0B7C3',
                    fontSize: '12px'
                }
            },
            '&-close-icon': {
                width: '16px',
                height: '16px',
                opacity: 1,
                background: '#353E5C',
                fontSize: 12,
                position: 'absolute',
                top: 2,
                borderRadius: '50%',
                right: 2,
                color: '#FFFFFF',
                display: 'flex',
                justifyContent: 'center',
                alignItems: 'center',
                '&:hover': {
                    color: token.colorPrimary
                }
            }
        }
    }));
};
/**
 * Probubble
 * @param prefixCls
 * @returns
 */ export function useStyle(prefixCls) {
    return useEditorStyleRegister('md-editor-attachment-button', function(token) {
        var proChatToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(prefixCls)
        });
        return [
            resetComponent(proChatToken),
            genStyle(proChatToken)
        ];
    });
}
