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