Liferay.Loader.define("@liferay/notification-web@1.0.27/js/NotificationQueueEntryStatusDataRenderer",["module","exports","require","@frontend-taglib-clay$clayui/popover","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationQueueEntryToDataRenderer=function NotificationQueueEntryToDataRenderer({value:e}){const[t,a]=(0,l.useState)(!1);return l.default.createElement(r.default,{"data-testid":"clayPopover",disableScroll:!0,header:Liferay.Language.get("to"),onShowChange:a,show:t,style:{width:256},trigger:l.default.createElement("span",{className:"ddm-tooltip",onMouseOut:()=>a(!1),onMouseOver:()=>a(!0)},e.length>25?e.slice(0,25).trim()+"...":e)},getToTooltipText(e))},t.NotificationQueueEntryStatusDataRenderer=function NotificationQueueEntryStatusDataRenderer({value:e}){const t="number"==typeof e?(e=>{switch(e){case 0:return{className:"label-danger",label:Liferay.Language.get("failed")};case 1:return{className:"label-success",label:Liferay.Language.get("sent")};case 2:return{className:"label-warning",label:Liferay.Language.get("unsent")};default:return null}})(e):null;return t?l.default.createElement("strong",{className:"label ".concat(t.className)},t.label):l.default.createElement("strong",{className:(0,n.default)("label",{"label-danger":!e,"label-success":e})},e?Liferay.Language.get("sent"):Liferay.Language.get("unsent"))};var r=_interopRequireDefault(a("@frontend-taglib-clay$clayui/popover")),n=_interopRequireDefault(a("liferay!frontend-js-react-web$classnames")),l=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var l=r?Object.getOwnPropertyDescriptor(e,n):null;l&&(l.get||l.set)?Object.defineProperty(a,n,l):a[n]=e[n]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const getToTooltipText=e=>{const t=e.split(","),a=t.length>1?t.pop():null;return t.length>1?t.join(",")+" "+Liferay.Language.get("and").toLowerCase()+a+".":e}}}));
//# sourceMappingURL=NotificationQueueEntryStatusDataRenderer.js.map