Liferay.Loader.define("@liferay/frontend-data-set-web@1.0.31/views/cards/Cards",["module","exports","require","@frontend-taglib-clay$clayui/card","@frontend-taglib-clay$clayui/empty-state","@frontend-taglib-clay$clayui/loading-indicator","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../actions/Actions"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r("@frontend-taglib-clay$clayui/card"),a=f(r("@frontend-taglib-clay$clayui/empty-state")),o=f(r("@frontend-taglib-clay$clayui/loading-indicator")),l=f(r("liferay!frontend-js-react-web$classnames")),i=(f(r("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=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react"))),c=r("../../actions/Actions");function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function f(e){return e&&e.__esModule?e:{default:e}}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var b=function({dataLoading:e,frontendDataSetContext:t,items:r,schema:s}){const{executeAsyncItemAction:f,highlightItems:u,openModal:y,openSidePanel:b,selectItems:m,selectable:g,selectedItemsKey:O,selectedItemsValue:h,style:j}=(0,i.useContext)(t);return e?i.default.createElement(o.default,{className:"mt-7"}):(null==r?void 0:r.length)?i.default.createElement("div",{className:(0,l.default)("cards-container mb-n4","default"===j&&"px-3 pt-4")},i.default.createElement("div",{className:"row"},r.map((e=>i.default.createElement("div",{className:"col-md-3",key:e[O]},i.default.createElement(n.ClayCardWithInfo,{actions:e.actionDropdownItems.map((t=>{let{href:r}=t,n=p(t,["href"]);return d(d({},n),{},{href:(0,c.isLink)(n.target,n.onClick)?r:null,onClick:t=>{var a;(0,c.handleAction)(d({event:t,itemId:e[O],method:null===(a=n.data)||void 0===a?void 0:a.method,url:r},n),{executeAsyncItemAction:f,highlightItems:u,openModal:y,openSidePanel:b})}})})),description:s.description&&e[s.description],href:s.href&&e[s.href]||null,imgProps:s.image&&e[s.image],onSelectChange:g&&(()=>m(e[O])),selected:g&&!!h.find((t=>t===e[O])),stickerProps:s.sticker&&e[s.sticker],symbol:s.symbol&&e[s.symbol],title:s.title&&e[s.title]})))))):i.default.createElement(a.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")})};t.default=b}}));
//# sourceMappingURL=Cards.js.map