import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { cnb } from "cnbuilder";
import { bem } from "../utils/bem.js";
const styles = bem("rmd-select-value");
/**
 * **Server Component**
 *
 * This component is used to render the current option.
 *
 * @remarks \@since 6.0.0
 * @internal
 */ export function SelectValue(props) {
    const { leftAddon, disableAddon, children: propChildren } = props;
    let children = propChildren;
    // when the children are a string or number, wrap it in additional span so
    // that overflow can be ellipsis-ed
    if (typeof children === "string" || typeof children === "number") {
        children = /*#__PURE__*/ _jsx("span", {
            className: styles("v"),
            children: children
        });
    }
    return /*#__PURE__*/ _jsxs("div", {
        className: cnb(styles()),
        children: [
            !disableAddon && leftAddon,
            children
        ]
    });
}

//# sourceMappingURL=SelectValue.js.map