Liferay.Loader.define("layout-admin-web@5.0.117/js/layout/look_and_feel/ThemeSpritemapCETsConfiguration",["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 ThemeSpritemapCETsConfiguration({portletNamespace:e,selectThemeSpritemapCETEventName:t,themeSpritemapCET:a={cetExternalReferenceCode:"",name:""},themeSpritemapCETSelectorURL:c}){const[o,u]=(0,i.useState)(a.name),[d,p]=(0,i.useState)(a.cetExternalReferenceCode),onClick=()=>{(0,l.openSelectionModal)({onSelect:e=>{const t=JSON.parse(e.value);p(t.cetExternalReferenceCode),u(t.name)},selectEventName:t,title:Liferay.Language.get("select-theme-spritemap-client-extension"),url:c})};return i.default.createElement(i.default.Fragment,null,i.default.createElement(r.ClayInput,{name:"".concat(e,"themeSpritemapCETExternalReferenceCode"),type:"hidden",value:d}),i.default.createElement(r.default.Group,null,i.default.createElement("label",{htmlFor:"".concat(e,"themeSpritemapExtensionNameInput")},Liferay.Language.get("theme-spritemap-client-extension")),i.default.createElement(r.ClayInput.Group,{className:"w-50",small:!0},i.default.createElement(r.ClayInput.GroupItem,null,i.default.createElement(r.ClayInput,{id:"".concat(e,"themeSpritemapExtensionNameInput"),onClick:onClick,placeholder:Liferay.Language.get("name"),readOnly:!0,type:"text",value:o})),i.default.createElement(r.ClayInput.GroupItem,{shrink:!0},o?i.default.createElement(i.default.Fragment,null,i.default.createElement(n.ClayButtonWithIcon,{"aria-label":Liferay.Language.get("replace"),className:"mr-2",displayType:"secondary",onClick:onClick,small:!0,symbol:"change"}),i.default.createElement(n.ClayButtonWithIcon,{"aria-label":Liferay.Language.get("delete"),displayType:"secondary",onClick:()=>{u(""),p("")},small:!0,symbol:"trash"})):i.default.createElement(n.ClayButtonWithIcon,{"aria-label":Liferay.Language.get("select"),displayType:"secondary",onClick:onClick,small:!0,symbol:"plus"})))))};var n=a("@frontend-taglib-clay$clayui/button"),r=_interopRequireWildcard(a("@frontend-taglib-clay$clayui/form")),l=a("frontend-js-web"),i=_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=ThemeSpritemapCETsConfiguration.js.map