Liferay.Loader.define("frontend-taglib-clay@12.0.3/cards/VerticalCard",["module","exports","require","@frontend-taglib-clay$clayui/card","@frontend-taglib-clay$clayui/icon","@frontend-taglib-clay$clayui/sticker","liferay!frontend-js-react-web$react","../constants","../get_data_attributes","../normalize_dropdown_items"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{actions:t,additionalProps:r,componentId:u,cssClass:f,description:p,disabled:b,displayType:m,flushHorizontal:g,flushVertical:h,href:j,imageAlt:k,imageSrc:_,inputName:P="",inputValue:w="",labels:v=[],locale:E,portletId:S,portletNamespace:I,selectable:L,selected:T,showSticker:M,stickerCssClass:A,stickerIcon:N,stickerImageAlt:C,stickerImageSrc:V,stickerLabel:$,stickerShape:D,stickerStyle:G,symbol:z,title:x}=e,H=O(e,["actions","additionalProps","componentId","cssClass","description","disabled","displayType","flushHorizontal","flushVertical","href","imageAlt","imageSrc","inputName","inputValue","labels","locale","portletId","portletNamespace","selectable","selected","showSticker","stickerCssClass","stickerIcon","stickerImageAlt","stickerImageSrc","stickerLabel","stickerShape","stickerStyle","symbol","title"]);const W=(0,c.useMemo)((()=>(0,s.default)(t)),[t]),[B,R]=(0,c.useState)(T),q=(0,c.useMemo)((()=>{const e={children:$,className:A,displayType:G,shape:D};return V?e.children=c.default.createElement(n.default.Image,{alt:C,src:V}):N&&(e.children=c.default.createElement(a.default,{symbol:N})),e}),[A,N,C,V,$,D,G]),F=(0,c.useCallback)((({checked:e})=>{R(e)}),[R]);return(0,c.useEffect)((()=>(Liferay.on(i.EVENT_MANAGEMENT_TOOLBAR_TOGGLE_ALL_ITEMS,F),()=>{Liferay.detach(i.EVENT_MANAGEMENT_TOOLBAR_TOGGLE_ALL_ITEMS,F)})),[F]),c.default.createElement(l.ClayCardWithInfo,d({actions:W,checkboxProps:{name:null!=P?P:"",value:null!=w?w:""},className:f,description:p,disabled:b,displayType:m,flushHorizontal:g,flushVertical:h,href:j,imgProps:_&&{alt:k,src:_},labels:null==v?void 0:v.map((e=>{let{closeable:t,data:r,label:l,style:a}=e,n=O(e,["closeable","data","label","style"]);return y(y({value:l},(0,o.default)(r)),n)})),onSelectChange:L?e=>{R(e)}:null,selectable:L,selected:B,stickerProps:M?q:null,symbol:z,title:x},H))};var l=r("@frontend-taglib-clay$clayui/card"),a=f(r("@frontend-taglib-clay$clayui/icon")),n=f(r("@frontend-taglib-clay$clayui/sticker")),c=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var r={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var n=l?Object.getOwnPropertyDescriptor(e,a):null;n&&(n.get||n.set)?Object.defineProperty(r,a,n):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),i=r("../constants"),o=f(r("../get_data_attributes")),s=f(r("../normalize_dropdown_items"));function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function f(e){return e&&e.__esModule?e:{default:e}}function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var l in r)Object.prototype.hasOwnProperty.call(r,l)&&(e[l]=r[l])}return e}).apply(this,arguments)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,l)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?p(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O(e,t){if(null==e)return{};var r,l,a=function(e,t){if(null==e)return{};var r,l,a={},n=Object.keys(e);for(l=0;l<n.length;l++)r=n[l],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(l=0;l<n.length;l++)r=n[l],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}}}));
//# sourceMappingURL=VerticalCard.js.map