import e,{useCallback as r}from"react";import s from"react-inlinesvg";import t from"../hooks/useIconScreenReaderAccessProps.js";import{useIsMounted as a}from"../../../../../packages/shared/dist/hooks/ssr/useIsMounted.js";import{getTestId as o}from"../../../../../packages/shared/dist/tests/test-ids-utils.js";import{ComponentDefaultTestId as i,ComponentVibeId as c}from"../../../../../packages/shared/dist/tests/constants.js";function n(e){return e.replace(/fill=".*?"/g,'fill="'.concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"currentColor",'"'))}var l=function(l){var d=l.className,m=l.ref,u=l.src,f=l.onClick,p=l.replaceToCurrentColor,C=void 0!==p&&p,k=l.customColor,g=l.id,v=l["data-testid"],b=t({isClickable:l.clickable,label:l.ariaLabel,isDecorationOnly:l.ariaHidden}),h=a(),j=r((function(e){return C?n(e,"currentColor"):k?n(e,k):e}),[C,k]);if("string"!=typeof u)return null;var N=s.default||s,I=e.createElement("div",{className:d,id:g});return h?e.createElement(N,Object.assign({innerRef:m},b,{onClick:f,loader:I,src:u,className:d,preProcessor:j,id:g,"data-testid":v||o(i.SVG_ICON,g),"data-vibe":c.ICON}),I):I};export{l as default};
//# sourceMappingURL=CustomSvgIcon.js.map
