Liferay.Loader.define("frontend-js-web@5.0.45/liferay/portlet/RenderState.es",["module","exports","require","./../util/is_object","./portlet_constants.es"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.RenderState=void 0;var a=o(r("./../util/is_object")),s=o(r("./portlet_constants.es"));function o(e){return e&&e.__esModule?e:{default:e}}class e{constructor(e){(0,a.default)(e)?this.from(e):(this.parameters={},this.portletMode=s.default.VIEW,this.windowState=s.default.NORMAL)}clone(){return new e(this)}from(e){this.parameters={},Object.keys(e.parameters).forEach((t=>{Array.isArray(e.parameters[t])&&(this.parameters[t]=e.parameters[t].slice(0))})),this.setPortletMode(e.portletMode),this.setWindowState(e.windowState)}getPortletMode(){return this.portletMode}getValue(e,t){if("string"!=typeof e)throw new TypeError("Parameter name must be a string");let r=this.parameters[e];return Array.isArray(r)&&(r=r[0]),void 0===r&&void 0!==t&&(r=t),r}getValues(e,t){if("string"!=typeof e)throw new TypeError("Parameter name must be a string");const r=this.parameters[e];return r||t}getWindowState(){return this.windowState}remove(e){if("string"!=typeof e)throw new TypeError("Parameter name must be a string");void 0!==this.parameters[e]&&delete this.parameters[e]}setPortletMode(e){if("string"!=typeof e)throw new TypeError("Portlet Mode must be a string");e!==s.default.EDIT&&e!==s.default.HELP&&e!==s.default.VIEW||(this.portletMode=e)}setValue(e,t){if("string"!=typeof e)throw new TypeError("Parameter name must be a string");if("string"!=typeof t&&null!==t&&!Array.isArray(t))throw new TypeError("Parameter value must be a string, an array or null");Array.isArray(t)||(t=[t]),this.parameters[e]=t}setValues(e,t){this.setValue(e,t)}setWindowState(e){if("string"!=typeof e)throw new TypeError("Window State must be a string");e!==s.default.MAXIMIZED&&e!==s.default.MINIMIZED&&e!==s.default.NORMAL||(this.windowState=e)}}t.RenderState=e;var i=e;t.default=i}}));
//# sourceMappingURL=RenderState.es.js.map