import { jsx as _jsx } from "react/jsx-runtime";
import { b } from "./iconBem.js";
import { iconPaths } from "./icons.js";
import { UiIconBackground } from "./UiIconBackground.js";
/**
 * @internal
 */
export function UiIcon({ type, color, layout = "inline", disableAnimation, accessibilityConfig, size = 20, backgroundSize, backgroundColor, backgroundType, backgroundShape, }) {
    // If ariaHidden is explicitly set, use it. Otherwise, use ariaLabel to determine if the icon is hidden.
    const effectiveAriaHidden = accessibilityConfig?.ariaHidden ?? !accessibilityConfig?.ariaLabel;
    return (_jsx(UiIconBackground, { size: backgroundSize, color: backgroundColor, type: backgroundType, shape: backgroundShape, children: _jsx("svg", { className: b({ color: color ?? false, layout, disableAnimation: disableAnimation ?? false }), width: size, height: size, viewBox: "0 0 20 20", "aria-hidden": effectiveAriaHidden, "aria-label": accessibilityConfig?.ariaLabel, role: "img", children: iconPaths[type] }) }));
}
