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, _obj1, _obj2;
    return _define_property({}, token.componentCls, (_obj2 = {
        borderRadius: '11px',
        display: 'flex',
        alignItems: 'center',
        padding: '8px 12px',
        width: '100%',
        cursor: 'pointer',
        gap: '12px',
        justifyContent: 'space-between',
        transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
        backgroundColor: 'var(--color-gray-bg-card-white, #ffffff)',
        boxShadow: 'var(--shadow-border-base)',
        minHeight: 32,
        '&-overflow-container': {
            position: 'absolute',
            right: 0,
            top: 0,
            bottom: 0,
            pointerEvents: 'none',
            background: "linear-gradient(to right, transparent 0%, var(--color-gray-bg-card-white, #ffffff) 100%)",
            borderRadius: 12,
            width: 72,
            height: '100%',
            zIndex: 2,
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'flex-end',
            '&-placeholder': {
                width: 40,
                height: '100%',
                backgroundColor: 'linear-gradient(270deg, #F7F8F9 57%, rgba(255, 255, 255, 0) 100%)'
            },
            '&-indicator': {
                flex: 1,
                pointerEvents: 'auto',
                display: 'flex',
                alignItems: 'center',
                justifyContent: 'center',
                width: 32,
                height: 32,
                zIndex: 10,
                background: 'linear-gradient(270deg, #FFFFFF 57%, rgba(255, 255, 255, 0) 100%)',
                border: 'none',
                boxShadow: 'none',
                borderRadius: 0
            },
            '&-menu': {
                width: 32,
                height: 32,
                borderRadius: 'var(--radius-control-base)',
                background: '#FFFFFF',
                boxShadow: 'inset 0px 0px 1px 0px rgba(0, 19, 41, 0.15)',
                color: 'var(--color-gray-text-secondary)',
                display: 'flex',
                alignItems: 'center',
                justifyContent: 'center',
                cursor: 'pointer',
                transition: 'all 0.2s ease',
                '&:hover': {
                    backgroundColor: 'var(--color-gray-control-fill-hover)',
                    backgroundImage: 'none'
                },
                '&:active': {
                    backgroundColor: 'var(--color-gray-control-fill-active)',
                    backgroundImage: 'none'
                },
                '&-disabled': {
                    backgroundColor: 'var(--color-gray-bg-card-white, #ffffff)',
                    color: 'var(--color-gray-text-disabled)',
                    cursor: 'not-allowed',
                    backgroundImage: 'none',
                    boxShadow: 'var(--shadow-border-base)'
                },
                '&-disabled:hover': {
                    backgroundColor: 'var(--color-gray-bg-card-white, #ffffff)',
                    backgroundImage: 'none'
                },
                '&-disabled:active': {
                    backgroundColor: 'var(--color-gray-bg-card-white, #ffffff)',
                    backgroundImage: 'none'
                },
                '& svg': {
                    width: 16,
                    height: 16
                }
            },
            '&-popup': (_obj1 = {
                position: 'relative',
                maxHeight: 327,
                overflowY: 'auto',
                overscrollBehaviorX: 'contain',
                overscrollBehaviorY: 'contain',
                touchAction: 'pan-y',
                WebkitOverflowScrolling: 'touch',
                background: 'var(--color-gray-bg-card-white, #ffffff)',
                borderRadius: 'var(--radius-card-base)',
                marginBottom: 8,
                zIndex: 1000,
                padding: 8,
                display: 'flex',
                flexDirection: 'column',
                gap: 6,
                boxShadow: 'var(--shadow-popover-base)',
                // Hide scrollbar by default, show on hover
                scrollbarWidth: 'thin',
                scrollbarColor: 'transparent transparent'
            }, _define_property(_obj1, '&::-webkit-scrollbar', {
                width: 6,
                background: 'transparent'
            }), _define_property(_obj1, '&::-webkit-scrollbar-thumb', {
                background: 'transparent',
                borderRadius: 3
            }), _define_property(_obj1, '&:hover', (_obj = {
                scrollbarColor: 'rgba(0, 0, 0, 0.2) transparent'
            }, _define_property(_obj, '&::-webkit-scrollbar-thumb', {
                background: 'rgba(0, 0, 0, 0.2)'
            }), _define_property(_obj, '&::-webkit-scrollbar-thumb:hover', {
                background: 'rgba(0, 0, 0, 0.3)'
            }), _obj)), _define_property(_obj1, '> *', {
                width: '100%',
                maxWidth: '100%',
                boxSizing: 'border-box'
            }), _define_property(_obj1, '&-item', {
                display: 'flex',
                alignItems: 'stretch',
                gap: 8,
                alignSelf: 'stretch',
                width: '100%',
                minWidth: 0,
                borderRadius: 8,
                transition: 'background-color 0.2s ease'
            }), // make the wrapper around entry.node fill available width
            _define_property(_obj1, '&-item > div[draggable="false"]', {
                flex: 1,
                width: '100%',
                minWidth: 0,
                display: 'flex'
            }), // ensure the immediate child (motion.div) also stretches
            _define_property(_obj1, '&-item > div[draggable="false"] > div', {
                flex: '1 1 auto',
                width: '100%',
                minWidth: 0,
                display: 'flex'
            }), // ensure hover background applies regardless of which node captures hover
            _define_property(_obj1, "&-item:hover ".concat(token.componentCls), {
                backgroundColor: 'var(--color-gray-control-fill-hover);',
                backgroundImage: 'none',
                boxShadow: 'none'
            }), // drag states
            _define_property(_obj1, "&-item.".concat(token.componentCls.slice(1), "-dragging"), {
                opacity: 0.6
            }), _define_property(_obj1, "&-item.".concat(token.componentCls.slice(1), "-drag-over"), {
                backgroundColor: 'rgba(22, 119, 255, 0.08)',
                outline: '1px dashed rgba(22, 119, 255, 0.45)'
            }), // ensure the inner ActionItemBox layout inside popup
            _define_property(_obj1, "".concat(token.componentCls, "-container"), {
                background: 'transparent',
                padding: 0,
                width: '100%',
                boxShadow: 'none',
                border: 'none',
                '&:hover': {
                    backgroundColor: 'transparent',
                    backgroundImage: 'none'
                }
            }), _define_property(_obj1, token.componentCls, {
                background: 'transparent',
                boxShadow: 'none',
                border: 'none',
                width: '100%',
                minHeight: 28,
                height: 28,
                lineHeight: '28px',
                borderRadius: 8,
                padding: '3px 8px',
                '&:hover': {
                    backgroundColor: 'var(--color-gray-control-fill-hover)',
                    backgroundImage: 'none'
                }
            }), _define_property(_obj1, "".concat(token.componentCls, "-option"), {
                display: 'none'
            }), // drag handle visuals
            _define_property(_obj1, "".concat(token.componentCls, "-drag-handle"), {
                width: 14,
                height: 28,
                lineHeight: 28,
                display: 'inline-flex',
                alignItems: 'center',
                justifyContent: 'center',
                color: '#505C71',
                opacity: 0.6,
                cursor: 'grab',
                userSelect: 'none'
            }), _define_property(_obj1, "".concat(token.componentCls, "-drag-handle:active"), {
                cursor: 'grabbing',
                opacity: 1
            }), _define_property(_obj1, "".concat(token.componentCls, "-icon"), {
                width: 20,
                height: 20,
                borderRadius: 6,
                backgroundColor: '#F7F9FC'
            }), _define_property(_obj1, "".concat(token.componentCls, "-content-description"), {
                display: 'none'
            }), _define_property(_obj1, "".concat(token.componentCls, "-content-title"), {
                fontSize: '13px',
                lineHeight: '28px'
            }), _obj1)
        },
        '&-container': {
            borderRadius: 'var(--radius-control-base)',
            position: 'relative',
            backgroundColor: 'var(--color-gray-bg-card-white, #ffffff)',
            alignItems: 'center',
            width: '100%',
            cursor: 'pointer',
            overflow: 'visible'
        },
        '&-icon': {
            width: 40,
            height: 40,
            transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)',
            borderRadius: 12,
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'center',
            '&-small': {
                backgroundColor: 'transparent',
                borderRadius: 2
            }
        },
        '&-content': {
            display: 'flex',
            flexDirection: 'column',
            minWidth: 0,
            maxWidth: '100%',
            '&-title': {
                lineHeight: '24px',
                fontSize: '1em',
                color: 'var(--color-gray-text-default)'
            },
            '&-title-no-description': {
                letterSpacing: 'var(--letter-spacing-body-base, normal)',
                font: 'var(--font-text-body-base)',
                color: 'var(--color-gray-text-default)',
                lineHeight: '20px',
                fontWeight: 'normal'
            }
        },
        '&-option': {
            transition: 'all 0.3s cubic-bezier(0.4, 0, 0.2, 1)'
        }
    }, // hover background for item itself when `-hover-bg` class present
    _define_property(_obj2, '&-hover-bg:hover', {
        backgroundColor: 'var(--color-gray-control-fill-hover)',
        backgroundImage: 'none'
    }), // active (pressed) background for item itself when `-hover-bg` class present
    _define_property(_obj2, '&-hover-bg:active', {
        backgroundColor: 'var(--color-gray-control-fill-active)',
        backgroundImage: 'none'
    }), _define_property(_obj2, '&-container-hover-bg:active ' + token.componentCls, {
        backgroundColor: 'var(--color-gray-control-fill-active)',
        backgroundImage: 'none'
    }), // disabled state: base + suppress hover/active
    _define_property(_obj2, '&-disabled', {
        backgroundColor: 'var(--color-gray-bg-card-white, #ffffff)',
        color: 'var(--color-gray-text-disabled)',
        cursor: 'not-allowed',
        backgroundImage: 'none'
    }), _define_property(_obj2, '&-disabled:hover', {
        backgroundColor: 'var(--color-gray-bg-card-white, #ffffff)',
        backgroundImage: 'none'
    }), _define_property(_obj2, '&-disabled:active', {
        backgroundColor: 'var(--color-gray-bg-card-white, #ffffff)',
        backgroundImage: 'none'
    }), // when container is active but inner item is disabled, keep disabled bg
    _define_property(_obj2, '&-container-hover-bg:active ' + token.componentCls + '-disabled', {
        backgroundColor: 'var(--color-gray-bg-card-white, #ffffff)',
        backgroundImage: 'none'
    }), // disabled text color for inner content
    _define_property(_obj2, "&-disabled ".concat(token.componentCls, "-content-title"), {
        color: 'var(--color-gray-text-disabled)'
    }), _define_property(_obj2, "&-disabled ".concat(token.componentCls, "-content-description"), {
        color: 'var(--color-gray-text-disabled)'
    }), _define_property(_obj2, '&-scroll', _define_property({
        // Hide scrollbar visually but keep scrolling enabled
        scrollbarWidth: 'none',
        msOverflowStyle: 'none'
    }, '&::-webkit-scrollbar', {
        display: 'none',
        width: 0,
        height: 0,
        background: 'transparent'
    })), _obj2));
};
/**
 * ActionItemBox
 * @param prefixCls
 * @returns
 */ export function useStyle(prefixCls) {
    return useEditorStyleRegister('ActionItemBox', function(token) {
        var proChatToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(prefixCls)
        });
        // Apply reset first, then component styles to allow overrides like padding
        return [
            resetComponent(proChatToken),
            genStyle(proChatToken)
        ];
    });
}
