Liferay.Loader.define("layout-admin-web@5.0.101/js/layout/look_and_feel/MasterLayoutConfiguration",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/link","frontend-js-web","liferay!frontend-js-react-web$react"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({changeMasterLayoutURL:t,editMasterLayoutURL:a,masterLayoutName:i,masterLayoutPlid:o,portletNamespace:d}){const[c,s]=(0,u.useState)({name:i,plid:o||e}),f=()=>{const e=(0,l.createRenderURL)(t,{masterLayoutPlid:c.plid});(0,l.openSelectionModal)({buttonAddLabel:Liferay.Language.get("done"),iframeBodyCssClass:"",multiple:!0,onSelect(e){e&&s({name:e.name,plid:e.plid})},selectEventName:"".concat(d,"selectMasterLayout"),title:Liferay.Language.get("select-master"),url:e.toString()})};return(0,u.useEffect)((()=>{const t=document.getElementById("".concat(d,"themeContainer"));t&&(c.plid===e?(t.classList.remove("hide"),t.removeAttribute("aria-hidden")):(t.classList.add("hide"),t.setAttribute("aria-hidden","true")))}),[c.plid,d]),u.default.createElement(u.default.Fragment,null,u.default.createElement("input",{name:"".concat(d,"masterLayoutPlid"),type:"hidden",value:c.plid}),u.default.createElement("h3",{className:"sheet-subtitle"},Liferay.Language.get("master")),u.default.createElement("p",null,u.default.createElement("strong",null,"".concat(Liferay.Language.get("master-name"),": ")),c.name),a&&c.plid&&c.plid!==e?u.default.createElement(n.default.Group,{spaced:!0},u.default.createElement(r.default,{className:"btn btn-secondary btn-sm",href:a},Liferay.Language.get("edit-master")),u.default.createElement(n.default,{displayType:"secondary",onClick:f,small:!0},Liferay.Language.get("change-master"))):u.default.createElement(n.default,{displayType:"secondary",onClick:f,small:!0},Liferay.Language.get("change-master")))};var n=o(a("@frontend-taglib-clay$clayui/button")),r=o(a("@frontend-taglib-clay$clayui/link")),l=a("frontend-js-web"),u=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=i();if(t&&t.has(e))return t.get(e);var a={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var l=n?Object.getOwnPropertyDescriptor(e,r):null;l&&(l.get||l.set)?Object.defineProperty(a,r,l):a[r]=e[r]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react"));function i(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return i=function(){return e},e}function o(e){return e&&e.__esModule?e:{default:e}}const e="0"}}));
//# sourceMappingURL=MasterLayoutConfiguration.js.map