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 n}from"./utils.js";var e=r((function(){return{icon:{borderRadius:function(i){return i.radius||"29%"}}}})),c=function(r){var c=r.alt,s=void 0===c?"app icon":c,d=r.appDevType,m=void 0===d?"ui":d,u=r.className,l=r["data-testid"],p=void 0===l?"":l,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,T=e({radius:null!=w?w:0,width:x}),_=o(N),b=a(_,m),y="AppIcon_".concat(p,"_").concat(g||"");return g?i("img",{alt:s,className:t(T.icon,u),"data-testid":y,height:f,onError:function(i){i.currentTarget.src=n(_,m)},src:g,width:x}):i(b,{"data-testid":y,className:t(T.icon,u),width:x,height:f})};export{c as AppIcon};
//# sourceMappingURL=AppIcon.js.map
