Liferay.Loader.define("@liferay/frontend-data-set-web@1.0.31/views/emails_list/EmailsList",["module","exports","require","@frontend-taglib-clay$clayui/empty-state","@frontend-taglib-clay$clayui/label","@frontend-taglib-clay$clayui/list","@frontend-taglib-clay$clayui/loading-indicator","@frontend-taglib-clay$clayui/sticker","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../actions/Actions"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=u(a("@frontend-taglib-clay$clayui/empty-state")),r=u(a("@frontend-taglib-clay$clayui/label")),n=u(a("@frontend-taglib-clay$clayui/list")),c=u(a("@frontend-taglib-clay$clayui/loading-indicator")),o=u(a("@frontend-taglib-clay$clayui/sticker")),s=u(a("liferay!frontend-js-react-web$classnames")),i=(u(a("liferay!frontend-js-react-web$prop-types")),function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var a={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=l?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(a,r,n):a[r]=e[r]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react"))),d=u(a("../../actions/Actions"));function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function u(e){return e&&e.__esModule?e:{default:e}}function m(){return(m=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e}).apply(this,arguments)}function y({actionDropdownItems:e,author:t,borderBottom:a,date:l,frontendDataSetContext:n,href:c,status:f,subject:u,summary:m}){const{openSidePanel:y}=(0,i.useContext)(n);return i.default.createElement("li",{className:(0,s.default)("bg-white d-flex p-4",a?"border-top-0 border-left-0 border-right-0 border-bottom":"border-0")},i.default.createElement("div",{className:"row"},i.default.createElement("div",{className:"col"},i.default.createElement("div",{className:"row"},i.default.createElement("div",{className:"col"},i.default.createElement("div",{className:"row"},t.avatarSrc&&i.default.createElement("div",{className:"col-auto"},i.default.createElement(o.default,{className:"sticker-user-icon",size:"xl"},i.default.createElement("div",{className:"sticker-overlay"},i.default.createElement("img",{className:"sticker-img",src:t.avatarSrc})))),i.default.createElement("div",{className:"col d-flex flex-column justify-content-center"},i.default.createElement("small",{className:"d-block text-body"},i.default.createElement("strong",null,t.name)),i.default.createElement("small",{className:"d-block"},t.email)))),i.default.createElement("div",{className:"col-auto d-flex flex-column justify-content-center"},i.default.createElement(r.default,{displayType:f.displayStyle||"success"},f.label)),i.default.createElement("div",{className:"col-auto d-flex flex-column justify-content-center"},i.default.createElement("small",null,l)),i.default.createElement("div",{className:"col-12"},i.default.createElement("h5",{className:"mt-3"},i.default.createElement("a",{href:"#",onClick:function(e){e.preventDefault(),y({slug:"email",url:c})}},u)),i.default.createElement("div",null,m)))),e.length?i.default.createElement("div",{className:"col-auto d-flex flex-column justify-content-center"},i.default.createElement(d.default,{actions:e})):null))}function b({dataLoading:e,frontendDataSetContext:t,items:a}){const{style:r}=(0,i.useContext)(t);return e?i.default.createElement(c.default,{className:"mt-7"}):(null==a?void 0:a.length)?i.default.createElement(n.default,{className:(0,s.default)("mb-0","default"===r?"border-bottom":"border")},a.map(((e,l)=>i.default.createElement(y,m({key:l},e,{borderBottom:l!==a.length-1,frontendDataSetContext:t}))))):i.default.createElement(l.default,{description:Liferay.Language.get("sorry,-no-results-were-found"),imgSrc:"".concat(themeDisplay.getPathThemeImages(),"/states/search_state.gif"),title:Liferay.Language.get("no-results-found")})}y.defaultProps={actionItems:[]},b.defaultProps={items:[]};var p=b;t.default=p}}));
//# sourceMappingURL=EmailsList.js.map