Liferay.Loader.define("@liferay/analytics-settings-web@5.0.47/js/components/attributes/Modal",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/modal","liferay!frontend-js-react-web$react","../table/Table"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=_interopRequireDefault(a("@frontend-taglib-clay$clayui/button")),l=_interopRequireDefault(a("@frontend-taglib-clay$clayui/modal")),n=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var n=r?Object.getOwnPropertyDescriptor(e,l):null;n&&(n.get||n.set)?Object.defineProperty(a,l,n):a[l]=e[l]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react")),u=_interopRequireDefault(a("../table/Table"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var _default=({columns:e,observer:t,onCancel:a,onSubmit:i,requestFn:o,title:c})=>{const[d,f]=(0,n.useState)({});return n.default.createElement(l.default,{center:!0,observer:t,size:"lg"},n.default.createElement(l.default.Header,null,c),n.default.createElement(l.default.Body,null,n.default.createElement(u.default,{columns:e,emptyStateTitle:Liferay.Language.get("there-are-no-attributes"),mapperItems:e=>e.map((({example:e,name:t,required:a,selected:r,source:l,type:n})=>({checked:r,columns:[{label:t},{label:n},{label:e},{label:l,show:!1}],disabled:a,id:t}))),noResultsTitle:Liferay.Language.get("no-attributes-were-found"),onItemsChange:f,requestFn:o})),n.default.createElement(l.default.Footer,{last:n.default.createElement(r.default.Group,{spaced:!0},n.default.createElement(r.default,{displayType:"secondary",onClick:a},Liferay.Language.get("cancel")),n.default.createElement(r.default,{onClick:()=>i(function getFields(e){return Object.values(e).map((({checked:e,columns:[{label:t},{label:a},{label:r},{label:l}],disabled:n})=>({example:r,name:t,required:n,selected:e,source:l,type:a})))}(d))},Liferay.Language.get("sync")))}))};t.default=_default}}));
//# sourceMappingURL=Modal.js.map