function _type_of(obj) {
    "@swc/helpers - typeof";
    return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
}
import React, { Children, cloneElement, isValidElement } from "react";
export var getCorrectHeight = function getCorrectHeight(listMaxHeight) {
    if (Number.isNaN(Number(listMaxHeight))) {
        return listMaxHeight.toString();
    }
    return "".concat(listMaxHeight, "rem");
};
export var childrenWithProps = function childrenWithProps(children, additionalProps) {
    return Children.map(children, function(child) {
        if (/*#__PURE__*/ React.isValidElement(child)) {
            return /*#__PURE__*/ React.cloneElement(child, additionalProps);
        }
        return child;
    });
};
var isReactObject = function isReactObject(element) {
    return (typeof element === "undefined" ? "undefined" : _type_of(element)) === 'object' || typeof element === 'function';
};
export var getValidComponent = function getValidComponent(element, props) {
    if (/*#__PURE__*/ isValidElement(element)) {
        return /*#__PURE__*/ cloneElement(element, props);
    }
    if (isReactObject(element)) {
        var Component = element;
        return /*#__PURE__*/ React.createElement(Component, props);
    }
    return element;
};
export { getItemId } from "./getItemId";
export { getItemByFocused } from "./getItemByFocused";
export { getPlacement } from "./getPlacement";
