File: /var/www/wp-content/themes/widget-area-1757317128/assets/js/hello-admin.min.js
(()=>{var e={160:(e,t,l)=>{"use strict";var n=l(836);Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsPage=void 0;var a=l(196),o=l(961),s=l(818),r=l(736),c=n(l(101)),i=l(609),_=l(730);const Notices=()=>{const e=(0,s.useSelect)((e=>e(o.store).getNotices().filter((e=>"snackbar"===e.type))),[]),{removeNotice:t}=(0,s.useDispatch)(o.store);return React.createElement(i.SnackbarList,{className:"edit-site-notices",notices:e,onRemove:t})},m={DESCRIPTION_META_TAG:"_description_meta_tag",SKIP_LINK:"_skip_link",PAGE_TITLE:"_page_title",HELLO_STYLE:"_hello_style",HELLO_THEME:"_hello_theme"};t.SettingsPage=()=>{const[e,t]=(0,a.useState)(!1),[l,n]=(0,a.useState)({}),o="hello_elementor_settings";return(0,a.useEffect)((()=>{e||(async()=>{try{await c.default.loadPromise;const e=new c.default.models.Settings,l=await e.fetch(),a={};Object.values(m).forEach((e=>a[e]=l[`${o}${e}`])),n(a),t(!0)}catch(e){console.error(e)}})()}),[l]),e?React.createElement(a.Fragment,null,React.createElement("div",{className:"hello_elementor__header"},React.createElement("div",{className:"hello_elementor__container"},React.createElement("div",{className:"hello_elementor__title"},React.createElement("h1",null,(0,r.__)("Hello Theme Settings","hello-elementor"))))),React.createElement("div",{className:"hello_elementor__main"},React.createElement(i.Panel,null,React.createElement(_.SettingsPanel,{SETTINGS:m,settingsData:l,updateSettings:(e,t)=>{n({...l,[e]:t})}}),React.createElement(i.Button,{isPrimary:!0,onClick:()=>{const e={};Object.values(m).forEach((t=>e[`${o}${t}`]=l[t]?"true":""));new c.default.models.Settings(e).save(),(0,s.dispatch)("core/notices").createNotice("success",(0,r.__)("Settings Saved","hello-elementor"),{type:"snackbar",isDismissible:!0})}},(0,r.__)("Save Settings","hello-elementor")))),React.createElement("div",{className:"hello_elementor__notices"},React.createElement(Notices,null))):React.createElement(i.Placeholder,null,React.createElement(i.Spinner,null))}},730:(e,t,l)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsPanel=void 0;var n=l(736),a=l(609);t.SettingsPanel=({SETTINGS:e,settingsData:t,updateSettings:l})=>{const o=(window.location.protocol||"https:")+"//"+(window.location.hostname||"example.com");return React.createElement(a.PanelBody,{title:(0,n.__)("Hello Theme Settings","hello-elementor")},React.createElement(a.Notice,{status:"warning",isDismissible:"false"},React.createElement(a.Dashicon,{icon:"flag"}),(0,n.__)("Be cautious, disabling some of the following options may break your website.","hello-elementor")),React.createElement(a.ToggleControl,{label:(0,n.__)("Disable description meta tag","hello-elementor"),help:(0,n.__)("Remove the description meta tag in singular content pages that contain an excerpt.","hello-elementor"),checked:!!t[e.DESCRIPTION_META_TAG]||!1,onChange:t=>l(e.DESCRIPTION_META_TAG,t)}),React.createElement("code",{className:"code-example"},' <meta name="description" content="..." /> '),React.createElement(a.ToggleControl,{label:(0,n.__)("Disable skip link","hello-elementor"),help:(0,n.__)('Remove the "Skip to content" link used by screen-readers and users navigating with a keyboard.',"hello-elementor"),checked:!!t[e.SKIP_LINK]||!1,onChange:t=>l(e.SKIP_LINK,t)}),React.createElement("code",{className:"code-example"},' <a class="skip-link screen-reader-text" href="#content"> Skip to content </a> '),React.createElement(a.ToggleControl,{label:(0,n.__)("Disable page title","hello-elementor"),help:(0,n.__)("Remove the section above the content that contains the main heading of the page.","hello-elementor"),checked:!!t[e.PAGE_TITLE]||!1,onChange:t=>l(e.PAGE_TITLE,t)}),React.createElement("code",{className:"code-example"},' <header class="page-header"> <h1 class="entry-title"> Post title </h1> </header> '),React.createElement(a.ToggleControl,{label:(0,n.__)("Unregister Hello style.css","hello-elementor"),help:(0,n.__)("Disable Hello theme's style.css file which contains CSS reset rules for unified cross-browser view.","hello-elementor"),checked:!!t[e.HELLO_STYLE]||!1,onChange:t=>l(e.HELLO_STYLE,t)}),React.createElement("code",{className:"code-example"},' <link rel="stylesheet" href="',o,'/wp-content/themes/hello-elementor/style.min.css" /> '),React.createElement(a.ToggleControl,{label:(0,n.__)("Unregister Hello theme.css","hello-elementor"),help:(0,n.__)("Disable Hello theme's theme.css file which contains CSS rules that style WordPress elements.","hello-elementor"),checked:!!t[e.HELLO_THEME]||!1,onChange:t=>l(e.HELLO_THEME,t)}),React.createElement("code",{className:"code-example"},' <link rel="stylesheet" href="',o,'/wp-content/themes/hello-elementor/theme.min.css" /> '))}},713:(e,t,l)=>{"use strict";l.r(t)},196:e=>{"use strict";e.exports=window.React},101:e=>{"use strict";e.exports=window.wp.api},609:e=>{"use strict";e.exports=window.wp.components},818:e=>{"use strict";e.exports=window.wp.data},307:e=>{"use strict";e.exports=window.wp.element},736:e=>{"use strict";e.exports=window.wp.i18n},961:e=>{"use strict";e.exports=window.wp.notices},836:e=>{e.exports=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}},t={};function __webpack_require__(l){var n=t[l];if(void 0!==n)return n.exports;var a=t[l]={exports:{}};return e[l](a,a.exports,__webpack_require__),a.exports}__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";__webpack_require__(713);var e=__webpack_require__(307),t=__webpack_require__(160);const App=()=>React.createElement(t.SettingsPage,null);document.addEventListener("DOMContentLoaded",(()=>{const t=document.getElementById("hello-elementor-settings");t&&(0,e.render)(React.createElement(App,null),t)}))})()})();
//# sourceMappingURL=hello-admin.min.js.map