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;
}
import { comboboxNewConfig, component, mergeConfig, fixedForwardRef } from '@salutejs/plasma-new-hope/styled-components';
import React from 'react';
import { config } from './Combobox.config';
import { Combobox as ComboboxOld } from './Legacy';
var mergedConfig = mergeConfig(comboboxNewConfig, config);
var ComboboxNew = component(mergedConfig);
var ComboboxComponent = function(props, ref) {
    if (props.items) {
        return /*#__PURE__*/ React.createElement(ComboboxNew, _object_spread({
            ref: ref
        }, props));
    }
    return /*#__PURE__*/ React.createElement(ComboboxOld, _object_spread({
        ref: ref
    }, props));
};
var Combobox = fixedForwardRef(ComboboxComponent);
export { Combobox };
