import{jsx as i}from"react/jsx-runtime";import t from"classnames";import{makeStyles as r}from"@material-ui/core";import{castArray as o}from"lodash";import{getIconComponentBySegment as a,getAppIcon as e}from"./utils.js";var n=r((function(){return{icon:{borderRadius:function(i){return i.radius||"29%"}}}})),s=function(r){var s=r.alt,c=void 0===s?"app icon":s,d=r.appDevType,m=void 0===d?"ui":d,u=r.className,p=r["data-testid"],l=void 0===p?"":p,h=r.height,f=void 0===h?16:h,v=r.iconUrl,g=void 0===v?null:v,w=r.radius,N=r.segment,j=r.width,x=void 0===j?16:j,_=n({radius:w,width:x}),b=o(N),y=a(b,m),A="AppIcon_".concat(l,"_").concat(g||"");return g?i("img",{alt:c,className:t(_.icon,u),"data-testid":A,height:f,onError:function(i){i.target.src=e(b,m)},src:g,width:x}):i(y,{"data-testid":A,className:t(_.icon,u),width:x,height:f})};export{s as AppIcon};
