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";
var genStyle = function genStyle(token) {
    var _obj;
    return _define_property({}, token.componentCls, {
        display: 'flex',
        flexDirection: 'column',
        gap: 4,
        padding: 0,
        background: 'transparent',
        borderRadius: 0,
        boxShadow: 'none',
        width: '100%',
        '&-suggestions': {
            display: 'flex',
            flexDirection: 'column',
            gap: 4,
            width: '100%',
            // 横向布局
            '&-horizontal': {
                flexDirection: 'row',
                flexWrap: 'wrap',
                gap: 8
            }
        },
        // 搜索更多
        '&-more': (_obj = {
            alignSelf: 'flex-start',
            display: 'inline-flex',
            alignItems: 'center',
            gap: 4,
            marginBottom: 4,
            cursor: 'default'
        }, _define_property(_obj, "".concat(token.componentCls, "-more-text"), {
            color: 'var(--color-gray-text-light)',
            font: 'var(--font-text-body-emphasized-base)',
            letterSpacing: 'var(--letter-spacing-body-emphasized-base, normal)'
        }), _define_property(_obj, "".concat(token.componentCls, "-more-icon"), {
            display: 'inline-flex',
            alignItems: 'center',
            justifyContent: 'center',
            width: 28,
            height: 28,
            fontSize: 14,
            color: 'var(--color-gray-text-light)',
            borderRadius: 'var(--radius-control-base)',
            cursor: 'pointer',
            transition: 'background-color .2s cubic-bezier(0.645, 0.045, 0.355, 1)',
            '&:hover': {
                background: 'var(--color-gray-control-fill-hover)'
            },
            '&:active': {
                background: 'var(--color-gray-control-fill-active)'
            }
        }), _obj),
        '&-suggestion': // hover 时箭头位移动画
        _define_property({
            width: 'max-content',
            maxWidth: '100%',
            alignSelf: 'flex-start',
            height: 37,
            padding: 8,
            boxSizing: 'border-box',
            borderRadius: 'var(--radius-card-base)',
            background: 'var(--color-gray-bg-card-white)',
            border: 'none',
            boxShadow: 'var(--shadow-control-base)',
            color: 'var(--color-gray-text-secondary)',
            cursor: 'pointer',
            fontSize: 13,
            lineHeight: '21px',
            textAlign: 'left',
            display: 'inline-flex',
            flexDirection: 'row',
            alignItems: 'center',
            justifyContent: 'flex-start',
            transition: 'background-color .2s ease, box-shadow .2s ease, transform .08s ease',
            // hover 态（非禁用）
            '&:hover:not(&-disabled)': {
                background: 'var(--color-gray-bg-card-light, var(--color-gray-bg-card-white))',
                boxShadow: 'var(--shadow-control-base)'
            },
            // active 态（非禁用）
            '&:active:not(&-disabled)': {
                transform: 'scale(0.99)'
            },
            // 禁用态
            '&-disabled': {
                opacity: 0.5,
                cursor: 'not-allowed',
                boxShadow: 'none'
            }
        }, "&:hover:not(&-disabled) ".concat(token.componentCls, "-arrow:not(").concat(token.componentCls, "-arrow-action)"), {
            transform: 'translateX(2px)'
        }),
        // 类型：基础版
        '&-basic': _define_property({}, "".concat(token.componentCls, "-suggestion"), {
            background: 'var(--color-gray-bg-card-light)',
            boxShadow: 'none',
            '&:hover:not(&-disabled)': {
                background: 'var(--color-gray-control-fill-active)',
                boxShadow: 'none'
            }
        }),
        // 类型：透明版
        '&-transparent': _define_property({}, "".concat(token.componentCls, "-suggestion"), {
            background: 'var(--color-gray-bg-transparent)',
            boxShadow: 'none',
            '&:hover:not(&-disabled)': {
                background: 'var(--color-gray-control-fill-hover)',
                boxShadow: 'none'
            }
        }),
        // 类型：白色版
        '&-white': _define_property({}, "".concat(token.componentCls, "-suggestion"), {
            background: 'var(--color-gray-bg-card-white)',
            boxShadow: 'var(--shadow-control-base)',
            '&:hover:not(&-disabled)': {
                background: 'var(--color-gray-bg-card-white)',
                boxShadow: 'var(--shadow-control-lg)'
            }
        }),
        '&-icon': {
            flex: '0 0 auto',
            display: 'inline-flex',
            alignItems: 'center',
            justifyContent: 'center',
            fontSize: 16,
            color: 'var(--color-gray-text-secondary)',
            marginRight: 8
        },
        '&-label': {
            display: 'inline-block',
            minWidth: 0,
            maxWidth: '100%',
            whiteSpace: 'nowrap',
            overflow: 'hidden',
            textOverflow: 'ellipsis',
            color: 'var(--color-gray-text-default)',
            fontSize: 13
        },
        '&-arrow': {
            flex: '0 0 auto',
            display: 'inline-flex',
            alignItems: 'center',
            justifyContent: 'center',
            color: 'var(--color-gray-text-light)',
            fontSize: 16,
            marginLeft: 12,
            transition: 'transform .2s cubic-bezier(0.645, 0.045, 0.355, 1)'
        }
    });
};
export function useStyle(prefixCls) {
    return useEditorStyleRegister('follow-up', function(token) {
        var followToken = _object_spread_props(_object_spread({}, token), {
            componentCls: ".".concat(prefixCls)
        });
        return [
            genStyle(followToken)
        ];
    });
}
