"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");require("../../node_modules/react-redux/es/index.js"),require("../../node_modules/@babel/runtime/helpers/defineProperty.js"),require("../../node_modules/@babel/runtime/helpers/objectWithoutProperties.js"),require("../../node_modules/@babel/runtime/helpers/typeof.js"),require("../../node_modules/html-parse-stringify/dist/html-parse-stringify.js"),require("../../node_modules/react-i18next/dist/es/context.js");var t=require("../../node_modules/react-i18next/dist/es/useTranslation.js");require("../../node_modules/@babel/runtime/helpers/slicedToArray.js");var i=require("./DisplayNameUtils.js"),r=require("../TextScroll.js"),l=require("../../node_modules/react-redux/es/hooks/useSelector.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(e),s=function(e){var t,i;return{displayName:null===(t=null==e?void 0:e.currentCall)||void 0===t?void 0:t.displayName,incoming:null===(i=null==e?void 0:e.currentCall)||void 0===i?void 0:i.incoming}},u=function(e){return e.listen},a=e.memo((function(){var n=l.useSelector(s),a=n.displayName,d=n.incoming,c=l.useSelector(u),m=t.useTranslation().t,p=e.useMemo((function(){return i.getDisplayText({intrudeListenStatus:c,displayName:a,incoming:d,t:m})}),[c,a,d,m]),f=p.content,v=e.useMemo((function(){return i.getTextClassName()}),[]);return o.default.createElement("div",{className:"pi-relative pi-block pi-w-full pi-min-w-0 pi-overflow-hidden pi-whitespace-nowrap pi-text-lg pi-font-medium","data-tooltip-id":f?"tooltip-display-name":void 0,"data-tooltip-content":f||""},o.default.createElement("div",{className:"".concat(v," pi-w-full pi-min-w-0")},"scroll"===p.type?o.default.createElement(r.default,{text:f}):o.default.createElement("span",{className:"pi-block pi-max-w-full pi-truncate"},f)))}));exports.default=a;
//# sourceMappingURL=DisplayName.js.map
