import{typeof as o}from"../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as e}from"react/jsx-runtime";import{forwardRef as s}from"react";import i from"classnames";import t from"../../hooks/useMergeRefs.js";import{IconType as r}from"./IconConstants.js";import c from"./CustomSvgIcon/CustomSvgIcon.js";import n from"./FontIcon/FontIcon.js";import a from"./hooks/useIconProps.js";import"./Icon.scss.js";var l=function(o){};var m=s((function(s,m){var d=s.id,u=s.onClick,f=void 0===u?l:u,p=s.icon,C=void 0===p?"":p,v=s.clickable,b=s.iconType,j=void 0===b?r.SVG:b,g=s.iconSize,k=void 0===g?16:g,y=s.ignoreFocusStyle,I=s.tabindex,S=s.style,N=s.useCurrentColor,O=void 0!==N&&N,x=s.customColor,F=s["data-testid"],R=a({onClick:f,iconLabel:s.iconLabel,clickable:void 0===v||v,className:s.className,isDecorationOnly:s.ariaHidden,ignoreFocusStyle:void 0!==y&&y,externalTabIndex:I&&+I}),P=R.screenReaderAccessProps,T=R.onClickCallback,h=R.computedClassName,z=t({refs:[m,R.iconRef]});if(!C)return null;var G="function"==typeof C;return j===r.SVG||G||"object"===o(C)?function(o,s){return e(o,Object.assign({},s))}(C,Object.assign(Object.assign({id:d},P),{ref:G?void 0:z,size:""+k,onClick:f,className:h,style:S,"data-testid":F})):j===r.SRC?e(c,Object.assign({id:d,src:C},P,{className:i(h),onClick:T,replaceToCurrentColor:O,customColor:x,"data-testid":F})):e(n,Object.assign({id:d},P,{className:i(h),onClick:T,ref:z,icon:C,"data-testid":F}))}));m.type=r;var d=m;export{d as default};
