Liferay.Loader.define("layout-admin-web@5.0.145/js/layout/look_and_feel/ThemeSpritemapCETsConfiguration",["module","exports","require","@frontend-taglib-clay$clayui/alert","@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:u}){const[c,d]=(0,o.useState)(a.name),[f,p]=(0,o.useState)(a.cetExternalReferenceCode),onClick=()=>{(0,i.openSelectionModal)({onSelect:e=>{const t=JSON.parse(e.value);p(t.cetExternalReferenceCode),d(t.name)},selectEventName:t,title:Liferay.Language.get("select-theme-spritemap-client-extension"),url:u})};return o.default.createElement(o.default.Fragment,null,o.default.createElement(n.default,{displayType:"info",title:Liferay.Language.get("info")},Liferay.Language.get("to-add-or-edit-the-existing-spritemap-simply-copy-paste-and-make-changes-as-needed-to-your-registered-extension")),o.default.createElement("p",{className:"text-secondary"},Liferay.Language.get("use-this-client-extension-to-fully-replace-the-default-spritemap-contained-in-the-theme")),o.default.createElement(l.ClayInput,{name:"".concat(e,"themeSpritemapCETExternalReferenceCode"),type:"hidden",value:f}),o.default.createElement(l.default.Group,null,o.default.createElement("label",{htmlFor:"".concat(e,"themeSpritemapExtensionNameInput")},Liferay.Language.get("theme-spritemap-client-extension")),o.default.createElement(l.ClayInput.Group,null,o.default.createElement(l.ClayInput.GroupItem,null,o.default.createElement(l.ClayInput,{id:"".concat(e,"themeSpritemapExtensionNameInput"),onClick:onClick,placeholder:Liferay.Language.get("name"),readOnly:!0,type:"text",value:c})),o.default.createElement(l.ClayInput.GroupItem,{shrink:!0},c?o.default.createElement(o.default.Fragment,null,o.default.createElement(r.ClayButtonWithIcon,{"aria-label":Liferay.Language.get("replace"),className:"c-mr-2",displayType:"secondary",onClick:onClick,symbol:"change"}),o.default.createElement(r.ClayButtonWithIcon,{"aria-label":Liferay.Language.get("delete"),displayType:"secondary",onClick:()=>{d(""),p("")},symbol:"trash"})):o.default.createElement(r.ClayButtonWithIcon,{"aria-label":Liferay.Language.get("select"),displayType:"secondary",onClick:onClick,symbol:"plus"})))))};var n=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(a("@frontend-taglib-clay$clayui/alert")),r=a("@frontend-taglib-clay$clayui/button"),l=_interopRequireWildcard(a("@frontend-taglib-clay$clayui/form")),i=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=ThemeSpritemapCETsConfiguration.js.map