import{r as e,a,e as t,h as s}from"./p-Cby2wKoI.js";const r=()=>`*{padding:0;margin:0}.templates__container{display:flex;flex-direction:column;align-items:center}.templates__container .back__btn-wrapper{display:none}.templates__container .back__btn-wrapper.show{display:flex;justify-content:space-between;width:100%}.templates__container .back__btn-wrapper .alert__wrapper{display:none}.templates__container .back__btn-wrapper .alert__wrapper.show{display:block}.templates__container .templates__wrapper{display:flex;padding:20px 0px;gap:20px;flex-wrap:wrap}.templates__container .templates__title.hide{display:none}`;const i=class{constructor(a){e(this,a)}get el(){return a(this)}tableTemplate=t(`https://raw.githubusercontent.com/Infineon/public-assets/refs/heads/main/table_template.png`);wizardTemplate=t(`https://raw.githubusercontent.com/Infineon/public-assets/refs/heads/main/wizard_template.png`);toggleTemplate(e){const a=this.el.shadowRoot.querySelector(".templates__wrapper").querySelectorAll("ifx-template");a.forEach((a=>{a.toggleTemplate(e)}))}handleError(e){const a=this.el.shadowRoot.querySelector(".alert__wrapper");if(e.detail){a.classList.add("show")}else{a.classList.remove("show")}}filterTemplates(e){const a=this.el.shadowRoot.querySelector(".templates__title");const t=this.el.shadowRoot.querySelector(".back__btn-wrapper");if(e.detail){a.classList.add("hide");if(e.detail!=="details"){t.classList.add("show")}this.toggleTemplate(e.detail)}else{a.classList.remove("hide");t.classList.remove("show");this.toggleTemplate(null)}}closeAlert(){const e=this.el.shadowRoot.querySelector(".alert__wrapper");e.classList.remove("show")}render(){return s("div",{key:"29c772490e68cc71ee5115470c7be4769ed4d321",class:"templates__container"},s("div",{key:"e01f48549b2f41541d7bf09ed784bee2503582bf",class:"back__btn-wrapper"},s("ifx-icon-button",{key:"a58c2fa0fcd6f2bf04dfd4f71aede46bb1071c8b",onClick:()=>this.filterTemplates(false),shape:"round",variant:"tertiary",icon:"arrow-left-16",target:"_blank",size:"m"}),s("div",{key:"7acfbaf0dd6bb121cbc597779d9608aef8e994e3",class:"alert__wrapper"},s("ifx-alert",{key:"cea1452563f7f7a015e0cd3796fd225aac95db77",onClick:()=>this.closeAlert(),"aria-live":"assertive",variant:"danger",icon:"c-info-16"},"All fields are mandatory"))),s("h2",{key:"77f108daf1d6ee1431b75b7dea7650d254e59012",class:"templates__title"},"Choose your template"),s("div",{key:"aa1795f74d93e14abd98c116ae832529caaef353",class:"templates__wrapper"},s("ifx-template",{key:"c1dd2731ef19aebb90a5446d6bb09dc121450a51",name:"template-01",thumbnail:this.tableTemplate}),s("ifx-template",{key:"a6f8d753ce70bb3d4d1799496935e6887bc9a76d",name:"template-02",thumbnail:this.wizardTemplate})))}static get assetsDirs(){return["assets"]}};i.style=r();export{i as ifx_templates_ui};
//# sourceMappingURL=p-1b6f69ff.entry.js.map