Liferay.Loader.define("@liferay/frontend-data-set-web@1.0.31/management_bar/components/FilterResume",["module","exports","require","@frontend-taglib-clay$clayui/drop-down","@frontend-taglib-clay$clayui/icon","@frontend-taglib-clay$clayui/label","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../FrontendDataSetContext","./filters/Filter"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=s(r("@frontend-taglib-clay$clayui/drop-down")),n=s(r("@frontend-taglib-clay$clayui/icon")),l=s(r("@frontend-taglib-clay$clayui/label")),o=s(r("liferay!frontend-js-react-web$classnames")),i=s(r("liferay!frontend-js-react-web$prop-types")),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={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var l=a?Object.getOwnPropertyDescriptor(e,n):null;l&&(l.get||l.set)?Object.defineProperty(r,n,l):r[n]=e[n]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),f=s(r("../../FrontendDataSetContext")),d=s(r("./filters/Filter"));function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?b(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b(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 m(e){const{setFilters:t}=(0,c.useContext)(f.default),[r,i]=(0,c.useState)(!1),u=c.default.createElement(l.default,{className:(0,o.default)("filter-resume component-label tbar-label mr-2",e.disabled&&"disabled",r&&"active"),closeButtonProps:{className:"filter-resume-close",disabled:e.disabled,onClick:()=>{t((t=>t.map((t=>p(p({},t),t.id===e.id?{active:!1,odataFilterString:void 0,selectedData:void 0}:{})))))}},role:"button"},c.default.createElement("div",{className:"filter-resume-content"},c.default.createElement(n.default,{className:"mr-2",symbol:r?"caret-top":"caret-bottom"}),c.default.createElement("div",{className:"label-section"},e.label,": ",e.selectedItemsLabel))),s=c.default.createElement(a.default,{active:r,className:"d-inline-flex",onActiveChange:i,trigger:u},c.default.createElement("li",{className:"dropdown-subheader"},e.label),c.default.createElement(d.default,e));return e.disabled?u:s}m.propTypes={disabled:i.default.bool,id:i.default.string,label:i.default.oneOfType([i.default.string,i.default.number]),selectedItemsLabel:i.default.oneOfType([i.default.string,i.default.number])};var O=m;t.default=O}}));
//# sourceMappingURL=FilterResume.js.map