import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useCallback as r}from"react";import i from"moment";import s from"classnames";import{Menu as o}from"../../../../Menu/Menu.js";import{TextMiddleTruncated as m}from"../../../../TextMiddleTruncated/TextMiddleTruncated.js";import"../../../../TextMiddleTruncated/TextMiddleTruncated.constants.js";import{TypeToIconMap as c}from"../constants.js";import{Text as a}from"../../../../Text/Text.js";import{checkIsAssetActive as l}from"../utils.js";import n from"./AssetSelectorSelect.scss.js";import{ChipIndicator as d}from"../../../../ChipIndicator/ChipIndicator.js";var p=function(p){var f=p.asset,u=p.onClick,T=p.isActive,x=f.type,j=c[x],v=r((function(){u(f)}),[u,f]);return e(o.Item,{size:"medium",prefix:j?e(j,{className:s(l(f)&&n.active)}):void 0,onClick:v,children:t("div",{className:n.label,children:[e(m,{className:n.labelText,children:f.name}),T&&e(d,{size:"small",state:"success",children:"Active"}),"well"===f.type&&e(a,{size:"inherit",color:"T6",className:n.lastActive,children:i(f.last_active_at).format("MMM DD YYYY")})]})})};export{p as AssetItem};
//# sourceMappingURL=AssetItem.js.map
