import{typeof as e}from"../../../../_virtual/_rollupPluginBabelHelpers.js";import s from"classnames";import t,{forwardRef as o}from"react";import{IconTypeEnum as a}from"./constants.js";import i from"./CustomSvgIcon/CustomSvgIcon.js";import r from"./FontIcon/FontIcon.js";import c from"./hooks/useIconProps.js";import{withStaticProps as n}from"../../../../packages/shared/dist/types/withStaticProps.js";import{useMergeRef as d}from"../../../../packages/shared/dist/hooks/useMergeRef.js";import{getTestId as l}from"../../../../packages/shared/dist/tests/test-ids-utils.js";import{ComponentDefaultTestId as m,ComponentVibeId as p}from"../../../../packages/shared/dist/tests/constants.js";var u=n(o((function(o,a){var n=o.id,u=o.icon,f=void 0===u?"":u,g=o.iconType,v=void 0===g?"svg":g,C=o.iconSize,j=void 0===C?16:C,b=o.ignoreFocusStyle,y=o.tabindex,k=o.style,I=o.useCurrentColor,N=void 0!==I&&I,O=o.customColor,h=o["data-testid"],S=c({iconLabel:o.iconLabel,className:o.className,isDecorationOnly:o.ariaHidden,ignoreFocusStyle:void 0!==b&&b,externalTabIndex:y&&+y||void 0}),x=S.screenReaderAccessProps,E=S.onClickCallback,F=S.computedClassName,P=d(a,S.iconRef);if(!f)return null;var T="function"==typeof f,R=h||l(m.ICON,n);return"svg"===v||T||"object"==e(f)?function(e,s){return t.createElement(e,Object.assign({},s,{"data-testid":s["data-testid"]||l(m.ICON,s.id),"data-vibe":p.ICON}))}(f,Object.assign(Object.assign({id:n},x),{ref:T?void 0:P,size:""+j,className:F,style:k,"data-testid":R})):"src"===v?t.createElement(i,Object.assign({id:n,src:f},x,{className:s(F),onClick:E,replaceToCurrentColor:N,customColor:O,"data-testid":R})):t.createElement(r,Object.assign({id:n},x,{className:s(F),onClick:E,ref:P,icon:f,"data-testid":R}))})),{type:a});export{u as default};
//# sourceMappingURL=Icon.js.map
