Liferay.Loader.define("@liferay/analytics-settings-web@5.0.51/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,l=_interopRequireDefault(a("@frontend-taglib-clay$clayui/button")),n=_interopRequireDefault(a("@frontend-taglib-clay$clayui/modal")),u=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")),i=_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}}!function(e){e.Name="name",e.Type="type",e.Example="example",e.Source="source"}(r||(r={}));const e=[{expanded:!0,id:r.Name,label:Liferay.Language.get("attribute")},{id:r.Type,label:Liferay.Language.get("data-type")},{id:r.Example,label:Liferay.Language.get("sample-data"),sortable:!1},{id:r.Source,label:Liferay.Language.get("source"),sortable:!1}];var _default=({observer:t,onCancel:a,onSubmit:o,requestFn:d,title:c})=>{const[f,s]=(0,u.useState)({});return u.default.createElement(n.default,{center:!0,observer:t,size:"lg"},u.default.createElement(n.default.Header,null,c),u.default.createElement(n.default.Body,null,u.default.createElement(i.default,{columns:e,emptyState:{noResultsTitle:Liferay.Language.get("no-attributes-were-found"),title:Liferay.Language.get("there-are-no-attributes")},mapperItems:e=>e.map((({example:e,name:t,required:a,selected:l,source:n,type:u})=>({checked:l,columns:[{id:r.Name,value:t},{id:r.Type,value:u},{id:r.Example,value:e},{id:r.Source,value:n}],disabled:a,id:t+n}))),onItemsChange:s,requestFn:d})),u.default.createElement(n.default.Footer,{last:u.default.createElement(l.default.Group,{spaced:!0},u.default.createElement(l.default,{displayType:"secondary",onClick:a},Liferay.Language.get("cancel")),u.default.createElement(l.default,{onClick:()=>o(f)},Liferay.Language.get("sync")))}))};t.default=_default}}));
//# sourceMappingURL=Modal.js.map