"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),r=require("@babel/runtime/helpers/objectWithoutProperties"),i=require("react"),a=require("prop-types"),n=require("classnames"),s=require("@material-ui/core"),c=require("@material-ui/icons"),l=require("../constants.js"),o=require("../../MiddleTruncate/MiddleTruncate.js"),u=require("react/jsx-runtime");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=d(e),f=d(t),m=d(r),h=d(a),b=d(n),j=["data-testid","value","className","assetName","status","multiple","selected"];function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function x(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){p.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var g=s.makeStyles({menuItem:{display:"flex",justifyContent:"space-between",width:"100%",height:36,paddingBottom:0,paddingTop:0},option:{display:"flex",alignItems:"center",justifyContent:"space-between"},itemContent:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},activeChip:{fontWeight:500,backgroundColor:"#75DB29",color:"#212121",fontSize:10,cursor:"pointer",height:12,textTransform:"uppercase",marginRight:12,letterSpacing:1}}),O=i.forwardRef((function(e,t){var r=e["data-testid"],a=e.value,n=e.className,d=e.assetName,p=e.status,h=e.multiple,y=e.selected,O=m.default(e,j),v=i.useState(null),C=f.default(v,2),w=C[0],T=C[1],q=!!w,P=g(),k=u.jsxs("div",{className:P.itemContent,children:[u.jsx(o,{onTruncate:function(e){T(e)},truncatedText:w,maxWidth:380,children:d}),p===l.ACTIVE_STATUS&&u.jsx(s.Chip,{"data-not-migrated-muichip":!0,className:P.activeChip,label:"Active"})]});return u.jsx(s.Tooltip,{title:q?d:"",children:h?u.jsxs("div",{className:b.default(P.option),children:[u.jsx(s.Checkbox,{disableRipple:!0,icon:u.jsx(c.CheckBoxOutlineBlank,{style:{fontSize:20}}),className:P.checkbox,checkedIcon:u.jsx(c.CheckBox,{style:{fontSize:20}}),checked:y}),k]}):u.jsx("div",x(x({"data-testid":r,value:a,className:b.default(P.menuItem,n)},O),{},{children:k}))})}));O.propTypes={"data-testid":h.default.string},O.defaultProps={"data-testid":"MenuItem"},module.exports=O;
//# sourceMappingURL=SelectItem.js.map
