"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("classnames"),i=require("@material-ui/core"),r=require("lodash"),a=require("./utils.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(t),s=i.makeStyles((function(){return{icon:{borderRadius:function(e){return e.radius||"29%"}}}}));exports.AppIcon=function(t){var i=t.alt,n=void 0===i?"app icon":i,c=t.appDevType,u=void 0===c?"ui":c,d=t.className,l=t["data-testid"],p=void 0===l?"":l,f=t.height,h=void 0===f?16:f,m=t.iconUrl,v=void 0===m?null:m,g=t.radius,j=t.segment,y=t.width,q=void 0===y?16:y,x=s({radius:g,width:q}),w=r.castArray(j),A=a.getIconComponentBySegment(w,u),I="AppIcon_".concat(p,"_").concat(v||"");return v?e.jsx("img",{alt:n,className:o.default(x.icon,d),"data-testid":I,height:h,onError:function(e){e.target.src=a.getAppIcon(w,u)},src:v,width:q}):e.jsx(A,{"data-testid":I,className:o.default(x.icon,d),width:q,height:h})};
