Liferay.Loader.define("frontend-taglib-clay@12.0.6/cards/UserCard",["module","exports","require","@frontend-taglib-clay$clayui/card","liferay!frontend-js-react-web$react","../constants","../normalize_dropdown_items"],(function(e,t,r){var n;window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{actions:t,additionalProps:r,componentId:n,cssClass:s,inputName:i="",inputValue:f="",locale:d,portletId:p,portletNamespace:y,selectable:b,selected:O,symbol:m}=e,_=function(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}(e,["actions","additionalProps","componentId","cssClass","inputName","inputValue","locale","portletId","portletNamespace","selectable","selected","symbol"]);const j=(0,o.useMemo)((()=>(0,c.default)(t)),[t]),[v,E]=(0,o.useState)(O),g=(0,o.useCallback)((({checked:e})=>{E(e)}),[E]);return(0,o.useEffect)((()=>(Liferay.on(l.EVENT_MANAGEMENT_TOOLBAR_TOGGLE_ALL_ITEMS,g),()=>{Liferay.detach(l.EVENT_MANAGEMENT_TOOLBAR_TOGGLE_ALL_ITEMS,g)})),[g]),o.default.createElement(a.ClayCardWithUser,u({actions:j,checkboxProps:{name:null!=i?i:"",value:null!=f?f:""},className:s,onSelectChange:b?()=>{E(!v)}:null,selected:v,userSymbol:m},_))};var a=r("@frontend-taglib-clay$clayui/card"),o=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")),l=r("../constants"),c=(n=r("../normalize_dropdown_items"))&&n.__esModule?n:{default:n};function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}}}));
//# sourceMappingURL=UserCard.js.map