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