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 _define_property({}, "".concat(token.componentCls), (_obj = {
        maxWidth: '100%',
        display: 'flex',
        minWidth: '0px',
        flexDirection: 'column',
        flexWrap: 'nowrap',
        overflow: 'auto',
        gap: '8px',
        borderRadius: 'inherit',
        padding: 8,
        position: 'relative',
        transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
        '&-left': {
            flexDirection: 'row'
        },
        '&-right': {
            flexDirection: 'row-reverse'
        },
        '&-vertical': {
            display: 'flex',
            flexDirection: 'row',
            flexWrap: 'wrap',
            alignItems: 'flex-start',
            gap: 4,
            maxWidth: 'calc(285px * 3 + 4px * 2)'
        },
        '&::-webkit-scrollbar': {
            width: 6
        },
        '&-collapse-button': {
            width: '68px',
            height: '32px',
            display: 'flex',
            flexDirection: 'row',
            alignItems: 'center',
            padding: '4px 8px',
            cursor: 'pointer',
            gap: 4,
            float: 'right',
            borderRadius: '18px',
            opacity: 1,
            boxSizing: 'border-box',
            color: 'var(--color-gray-a9)',
            fontSize: 'var(--font-size-base)',
            boxShadow: 'var(--shadow-control-base)',
            border: 'var(--color-gray-border-light)',
            '&:hover': {
                background: '#F7F8FA',
                transform: 'scale(1.05)'
            },
            '&-icon': {
                transform: 'rotate(-90deg)',
                transition: 'all 0.5s cubic-bezier(0.4, 0, 0.2, 1)',
                color: 'var(--color-gray-a9)',
                '&-collapse': {
                    transform: 'rotate(90deg)'
                }
            }
        }
    }, _define_property(_obj, "".concat(token.antCls, "-image-mask"), {
        borderRadius: 'var(--radius-card-base)'
    }), _define_property(_obj, "img", {
        objectFit: 'cover'
    }), _define_property(_obj, '&-image', {
        opacity: 1,
        background: 'var(--color-gray-bg-card-white)',
        boxSizing: 'border-box',
        boxShadow: 'var(--shadow-control-base)',
        borderRadius: 'var(--radius-card-base)',
        border: 'none',
        overflow: 'hidden',
        img: {
            maxWidth: '100%',
            maxHeight: '100%',
            borderRadius: 'inherit',
            transition: 'transform 0.3s'
        },
        '&:hover': {
            overflow: 'hidden',
            img: {
                transform: 'scale(1.1)',
                transition: 'transform 0.3s'
            }
        }
    }), _define_property(_obj, '&-video-row', {
        display: 'flex',
        flexWrap: 'wrap',
        gap: 8,
        width: 'fit-content',
        '&-right': {
            alignSelf: 'flex-end'
        }
    }), _define_property(_obj, '&-video-thumb', {
        position: 'relative',
        cursor: 'pointer',
        opacity: 1,
        background: 'var(--color-gray-bg-card-white)',
        boxSizing: 'border-box',
        boxShadow: 'var(--shadow-control-base)',
        borderRadius: 'var(--radius-card-base)',
        border: 'none',
        overflow: 'hidden',
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
        '&:hover': {
            boxShadow: 'var(--shadow-control-lg)',
            '& video': {
                transform: 'scale(1.05)'
            }
        },
        '& video': {
            transition: 'transform 0.3s'
        }
    }), _define_property(_obj, '&-video-play-overlay', {
        position: 'absolute',
        inset: 0,
        display: 'flex',
        alignItems: 'center',
        justifyContent: 'center',
        background: 'rgba(0, 0, 0, 0.35)',
        borderRadius: 'inherit',
        pointerEvents: 'none',
        opacity: 0.9,
        '& svg': {
            width: 48,
            height: 48,
            color: '#fff'
        }
    }), _define_property(_obj, '&-image-list-view', {
        background: 'var(--color-gray-bg-tip)',
        padding: '4px',
        borderRadius: 'var(--radius-card-base)'
    }), _define_property(_obj, '&-more-file-container', {
        width: '285px',
        height: '56px',
        borderRadius: 'var(--radius-card-base)',
        background: 'var(--color-gray-bg-card-white)',
        boxShadow: 'var(--shadow-control-base)',
        margin: 0,
        display: 'flex',
        alignItems: 'center',
        gap: '8px',
        cursor: 'pointer',
        justifyContent: 'center',
        '&:hover': {
            boxShadow: 'var(--shadow-control-lg)'
        }
    }), _define_property(_obj, '&-more-file-icon', {
        width: '16px',
        height: '16px'
    }), _define_property(_obj, '&-more-file-name', {
        font: 'var(--font-size-h6)',
        color: 'var(--color-gray-text-secondary)'
    }), _define_property(_obj, '&-item', {
        width: '285px',
        height: '56px',
        borderRadius: 'var(--radius-card-base)',
        opacity: 1,
        background: 'var(--color-gray-bg-card-white)',
        boxSizing: 'border-box',
        boxShadow: 'var(--shadow-control-base)',
        padding: '8px',
        display: 'flex',
        flexDirection: 'row',
        alignItems: 'center',
        cursor: 'pointer',
        gap: '4px',
        position: 'relative',
        '&:hover': {
            boxShadow: 'var(--shadow-control-lg)'
        },
        '&-action-bar': {
            position: 'absolute',
            right: 8,
            top: 8,
            display: 'flex',
            gap: 2
        },
        '&-action-btn': {
            width: 36,
            height: 36,
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'center',
            position: 'relative',
            borderRadius: 'var(--radius-control-base)',
            background: 'var(--color-gray-control-fill-secondary)',
            backdropFilter: 'blur(40px)',
            cursor: 'pointer',
            '&:hover': {
                background: 'var(--color-gray-a4)'
            }
        },
        '&-more-custom': {
            position: 'absolute',
            inset: 0,
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'center',
            background: 'transparent'
        },
        '&-file-icon': {
            width: '40px',
            height: '40px',
            opacity: 1,
            overflow: 'hidden',
            '&-img': {
                width: '40px',
                height: '40px',
                opacity: 1,
                background: 'var(--color-gray-bg-card-white)',
                boxSizing: 'border-box',
                boxShadow: 'var(--shadow-control-base)',
                borderRadius: 'var(--radius-base)',
                border: 'none',
                overflow: 'hidden',
                img: {
                    maxWidth: '100%',
                    maxHeight: '100%',
                    borderRadius: 'inherit',
                    transition: 'transform 0.3s'
                },
                '&:hover': {
                    overflow: 'hidden',
                    img: {
                        transform: 'scale(1.1)',
                        transition: 'transform 0.3s'
                    }
                }
            },
            '> svg': {
                width: '40px',
                height: '40px'
            }
        },
        '&-file-info': {
            display: 'flex',
            flexDirection: 'column',
            justifyContent: 'space-between',
            gap: 2
        },
        '&-file-name': {
            color: 'var(--color-gray-text-default)',
            fontSize: 'var(--font-text-h6-base)',
            width: '150px',
            alignItems: 'center',
            lineHeight: '18px',
            fontFamily: token.fontFamily,
            gap: -1,
            display: 'flex',
            overflow: 'hidden',
            '&-text': {
                maxWidth: '150px',
                whiteSpace: 'nowrap !important',
                wordWrap: 'normal',
                wordBreak: 'keep-all',
                width: '100%',
                overflow: 'hidden',
                display: 'inline-block',
                textOverflow: 'ellipsis',
                height: 18,
                lineHeight: 1,
                verticalAlign: 'top'
            }
        },
        '&-file-name-extension-container': {
            display: 'flex',
            alignItems: 'center',
            gap: 2,
            color: 'var(--color-gray-text-light)',
            fontSize: '12px'
        },
        '&-separator': {
            margin: '0 4px'
        },
        '&-file-size': {
            color: 'var(--color-gray-text-light)',
            fontSize: '12px'
        }
    }), _obj));
};
/**
 * Probubble
 * @param prefixCls
 * @returns
 */ export function useStyle(prefixCls) {
    return useEditorStyleRegister('md-md-editor-file-view', function(token) {
        var proChatToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(prefixCls)
        });
        return [
            resetComponent(proChatToken),
            genStyle(proChatToken)
        ];
    });
}
