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