"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("classnames"),i=require("react"),t=require("../../../../constants/mixpanel.js"),s=require("../../../Chip/Chip.js"),l=require("../../../TextMiddleTruncated/TextMiddleTruncated.js");require("../../../TextMiddleTruncated/TextMiddleTruncated.constants.js");var n=require("../../AppAssets/utils.js"),a=require("../../../UniversalLink/UniversalLink.js"),u=require("../../../Tooltip/Tooltip.js"),o=require("./AssetChips.scss.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=d(r);exports.AssetChips=function(r){var d=r.chipsWidth,p=n.useAssetLabels(),T=i.useCallback((function(){var e,r;null===(e=(r=window)[Symbol.for("logToMixpanel")])||void 0===e||e.call(r,t.MIXPANEL_ACTION_TYPES.REDIRECT.ASSET_DASHBOARD,{referer:"Asset Chip"})}),[]);return 0===p.length?null:e.jsx(e.Fragment,{children:p.map((function(r,i,t){var p=r.className,h=r.prefix,x=r.link,j=r.title,f=r.entity,C=r.tooltip,v=e.jsx(s.Chip,{prefix:h,size:"small",className:c.default(o.chip,1===t.length&&o.onlyChip,"narrow"===d&&o.narrowChip,"ultranarrow"===d&&o.ultranarrowChip,p),onClick:x?T:void 0,children:e.jsx(l.TextMiddleTruncated,{testId:n.AssetLabelEntityToTestId[f],disableTooltip:!!C,children:j})},i),A=C?e.jsx(u.Tooltip,{title:C,children:v}):v;return x?e.jsx(a.UniversalLink,{href:x,children:A},i):A}))})};
//# sourceMappingURL=AssetChips.js.map
