import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/helpers/objectWithoutProperties";import{forwardRef as i,useState as a}from"react";import o from"prop-types";import n from"classnames";import{makeStyles as s,Chip as c,Tooltip as l,Checkbox as p}from"@material-ui/core";import{CheckBoxOutlineBlank as m,CheckBox as d}from"@material-ui/icons";import{ACTIVE_STATUS as u}from"../constants.js";import f from"../../MiddleTruncate/MiddleTruncate.js";import{jsxs as b,jsx as h}from"react/jsx-runtime";var y=["data-testid","value","className","assetName","status","multiple","selected"];function g(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 j(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?g(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):g(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var O=s({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}}),v=i((function(e,i){var o=e["data-testid"],s=e.value,g=e.className,v=e.assetName,w=e.status,P=e.multiple,x=e.selected,N=r(e,y),C=a(null),T=t(C,2),I=T[0],S=T[1],k=!!I,D=O(),z=b("div",{className:D.itemContent,children:[h(f,{onTruncate:function(e){S(e)},truncatedText:I,maxWidth:380,children:v}),w===u&&h(c,{"data-not-migrated-muichip":!0,className:D.activeChip,label:"Active"})]});return h(l,{title:k?v:"",children:P?b("div",{className:n(D.option),children:[h(p,{disableRipple:!0,icon:h(m,{style:{fontSize:20}}),className:D.checkbox,checkedIcon:h(d,{style:{fontSize:20}}),checked:x}),z]}):h("div",j(j({"data-testid":o,value:s,className:n(D.menuItem,g)},N),{},{children:z}))})}));v.propTypes={"data-testid":o.string},v.defaultProps={"data-testid":"MenuItem"};export{v as default};
//# sourceMappingURL=SelectItem.js.map
