"use strict";(self.webpackChunkangular_storybook_project=self.webpackChunkangular_storybook_project||[]).push([[8590],{"./src/common/shared/header-footer.component.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.d(__webpack_exports__,{C:()=>HeaderFooterComponent});var _home_jenkins2_workspace_inail_storybook_inail_dev_ApacheStorybooks_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js");class HeaderFooterComponent{fetchData(){var _this=this;return(0,_home_jenkins2_workspace_inail_storybook_inail_dev_ApacheStorybooks_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__.A)(function*(){let responseHtml,responseHead;try{const response=yield fetch("/api/hf/public/fullhtml_rw?lang=it&isHeadSimple=false",{headers:{client_id:"ClientHF_v4"}}),json=yield response.json(),headContent=json.htmlHead;responseHtml=json,responseHead=headContent}catch(error){console.error("Error fetching header data:",error)}finally{return _this.addHeadScripts(responseHead),new Promise(resolve=>{resolve(responseHtml)})}})()}addHeadScripts(script){const headElement=document.getElementsByTagName("head").item(0),body=document.getElementsByTagName("body").item(0);if(body?.classList.add("container"),headElement){const tempDiv=document.createElement("div");for(tempDiv.innerHTML="\x3c!--SB-START--\x3e"+script+"\x3c!--SB-END--\x3e";tempDiv.firstChild;)headElement.appendChild(tempDiv.firstChild)}}CreateHeader(){var _this2=this;return(0,_home_jenkins2_workspace_inail_storybook_inail_dev_ApacheStorybooks_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__.A)(function*(){const html=yield _this2.fetchData();return html.htmlLogo+html.htmlHeader})()}CreateFooter(){var _this3=this;return(0,_home_jenkins2_workspace_inail_storybook_inail_dev_ApacheStorybooks_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__.A)(function*(){return(yield _this3.fetchData()).htmlFooter})()}}},"./src/stories/footer/footer.stories.ts"(__unused_webpack_module,__webpack_exports__,__webpack_require__){__webpack_require__.r(__webpack_exports__);var _common_shared_header_footer_component__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__("./src/common/shared/header-footer.component.ts");const __WEBPACK_DEFAULT_EXPORT__={title:"Patterns/Header & Footer/Footer",tags:["!autodocs"],decorators:[Story=>{document.createElement("div");return(()=>{const headerElement=document.createElement("header");(new _common_shared_header_footer_component__WEBPACK_IMPORTED_MODULE_0__.C).CreateFooter().then(html=>{headerElement.innerHTML=html});const body=document.querySelector("body");body&&!document.querySelector("header")&&body.appendChild(headerElement)})(),Story()}],parameters:{lighthouseAddon:{disable:!0},showCodeAddon:{disable:!0},userExperience:{disable:!0},controls:{disable:!0},actions:{disable:!0}}},Footer={};Footer.parameters={...Footer.parameters,docs:{...Footer.parameters?.docs,source:{originalSource:"{}",...Footer.parameters?.docs?.source}}},__webpack_require__.d(__webpack_exports__,["Footer",0,Footer,"__namedExportsOrder",0,["Footer"],"default",0,__WEBPACK_DEFAULT_EXPORT__])}}]);
//# sourceMappingURL=stories-footer-footer-stories.d905cd19.iframe.bundle.js.map