var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
import React, { forwardRef } from 'react';
import { Select as FusionSelect } from '@alifd/next';
import hoist from '../../utils/hoist';
import { hocPopup } from '../../hoc';
// 透传 ref 给 fusion class components，以实现 field autoUnmount 的能力
function NextSelect(props, ref) {
    var _a;
    return (React.createElement(FusionSelect, __assign({}, __assign(__assign({}, props), { ref: ref, autoWidth: (_a = props.autoWidth) !== null && _a !== void 0 ? _a : false }))));
}
var Select = hoist(hocPopup(forwardRef(NextSelect)), FusionSelect);
Select.AutoComplete = hocPopup(FusionSelect.AutoComplete);
export default Select;
export var SelectAutoComplete = Select.AutoComplete;
export var SelectOption = Select.Option;
export var SelectOptionGroup = Select.OptionGroup;
