Liferay.Loader.define("layout-admin-web@5.0.150/js/layout/look_and_feel/StyleBookConfiguration",["module","exports","require","@frontend-taglib-clay$clayui/button","@frontend-taglib-clay$clayui/form","frontend-js-web","liferay!frontend-js-react-web$react"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function StyleBookConfiguration({changeStyleBookURL:e,isReadOnly:t,portletNamespace:a,styleBookEntryId:c,styleBookEntryName:i}){const[u,d]=(0,o.useState)({name:i,styleBookEntryId:c}),handleChangeStyleBookClick=()=>{t||(0,l.openSelectionModal)({iframeBodyCssClass:"",onSelect(e){if(e){const t=JSON.parse(e.value);d({name:t.name,styleBookEntryId:t.styleBookEntryId})}},selectEventName:"".concat(a,"selectStyleBook"),title:Liferay.Language.get("select-style-book"),url:e})};return o.default.createElement(o.default.Fragment,null,o.default.createElement("input",{name:"".concat(a,"styleBookEntryId"),type:"hidden",value:u.styleBookEntryId}),o.default.createElement("label",{htmlFor:"".concat(a,"styleBookEntry")},Liferay.Language.get("style-book")),o.default.createElement("div",{className:"d-flex"},o.default.createElement(r.default.Group,{className:"c-mb-0 flex-grow-1"},o.default.createElement(r.ClayInput,{id:"".concat(a,"styleBookEntry"),onClick:handleChangeStyleBookClick,readOnly:!0,value:u.name})),o.default.createElement(n.ClayButtonWithIcon,{"aria-label":Liferay.Language.get("change-style-book"),className:"c-ml-2",disabled:t,displayType:"secondary",onClick:handleChangeStyleBookClick,symbol:"plus"})))};var n=a("@frontend-taglib-clay$clayui/button"),r=_interopRequireWildcard(a("@frontend-taglib-clay$clayui/form")),l=a("frontend-js-web"),o=_interopRequireWildcard(a("liferay!frontend-js-react-web$react"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}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={},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]}return a.default=e,t&&t.set(e,a),a}}}));
//# sourceMappingURL=StyleBookConfiguration.js.map