Liferay.Loader.define("@liferay/analytics-settings-web@5.0.42/js/pages/wizard/PropertyStep",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/empty-state","@frontend-taglib-clay$clayui/modal","liferay!frontend-js-react-web$react","../../components/BasePage","../../components/CreatePropertyModal","../../components/PropertiesTable","../../utils/api","./WizardPage"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=s(a("@frontend-taglib-clay$clayui/button")),n=s(a("@frontend-taglib-clay$clayui/empty-state")),l=a("@frontend-taglib-clay$clayui/modal"),o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var l=r?Object.getOwnPropertyDescriptor(e,n):null;l&&(l.get||l.set)?Object.defineProperty(a,n,l):a[n]=e[n]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react")),i=s(a("../../components/BasePage")),c=s(a("../../components/CreatePropertyModal")),u=s(a("../../components/PropertiesTable")),f=a("../../utils/api"),p=a("./WizardPage");function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function s(e){return e&&e.__esModule?e:{default:e}}var y=({onChangeStep:e})=>{const[t,a]=(0,o.useState)([]);(0,o.useEffect)((()=>{(async()=>{const e=await(0,f.fetchProperties)();a(e.items)})()}),[]);const{observer:d,onOpenChange:s,open:y}=(0,l.useModal)();return o.default.createElement(i.default,{description:Liferay.Language.get("property-description"),title:Liferay.Language.get("property-assignment")},o.default.createElement("div",{className:"text-right"},o.default.createElement(r.default,{displayType:"secondary",onClick:()=>s(!0),type:"button"},Liferay.Language.get("new-property"))),!!t.length&&o.default.createElement(u.default,{properties:t}),!t.length&&o.default.createElement("div",{className:"empty-state-border"},o.default.createElement(n.default,{description:Liferay.Language.get("create-a-property-to-add-sites-and-channels"),imgProps:{alt:Liferay.Language.get("create-a-new-property"),title:Liferay.Language.get("create-a-new-property")},imgSrc:"".concat(Liferay.ThemeDisplay.getPathThemeImages(),"/states/search_state.gif"),title:Liferay.Language.get("create-a-new-property")},o.default.createElement(r.default,{displayType:"secondary",onClick:()=>s(!0),type:"button"},Liferay.Language.get("new-property")))),y&&o.default.createElement(c.default,{observer:d}),o.default.createElement(i.default.Footer,null,o.default.createElement(r.default.Group,{spaced:!0},o.default.createElement(r.default,{onClick:()=>e(p.ESteps.People)},Liferay.Language.get("next")),o.default.createElement(r.default,{displayType:"secondary",onClick:()=>window.location.reload()},Liferay.Language.get("cancel")))))};t.default=y}}));
//# sourceMappingURL=PropertyStep.js.map