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