import{r as e,e as t,h as a,a as s}from"./p-PqnYwNKt.js";const i="*{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 r=class{constructor(a){e(this,a);this.tableTemplate=t(`https://raw.githubusercontent.com/Infineon/public-assets/refs/heads/main/table_template.png`);this.wizardTemplate=t(`https://raw.githubusercontent.com/Infineon/public-assets/refs/heads/main/wizard_template.png`)}toggleTemplate(e){const t=this.el.shadowRoot.querySelector(".templates__wrapper").querySelectorAll("ifx-template");t.forEach((t=>{t.toggleTemplate(e)}))}handleError(e){const t=this.el.shadowRoot.querySelector(".alert__wrapper");if(e.detail){t.classList.add("show")}else{t.classList.remove("show")}}filterTemplates(e){const t=this.el.shadowRoot.querySelector(".templates__title");const a=this.el.shadowRoot.querySelector(".back__btn-wrapper");if(e.detail){t.classList.add("hide");if(e.detail!=="details"){a.classList.add("show")}this.toggleTemplate(e.detail)}else{t.classList.remove("hide");a.classList.remove("show");this.toggleTemplate(null)}}closeAlert(){const e=this.el.shadowRoot.querySelector(".alert__wrapper");e.classList.remove("show")}render(){return a("div",{key:"de3f1dd422965261933fbb63db9111f44822ab68",class:"templates__container"},a("div",{key:"66a080cd32140e6a3ceaa21bee1026a99c6f7b11",class:"back__btn-wrapper"},a("ifx-icon-button",{key:"89ec7da67d65d64816372f1f2b0cecf495ea5450",onClick:()=>this.filterTemplates(false),shape:"round",variant:"tertiary",icon:"arrow-left-16",target:"_blank",size:"m"}),a("div",{key:"bc1497bcf600610eeb2c8362d2f2345216121a1b",class:"alert__wrapper"},a("ifx-alert",{key:"9ed05181113e2b5dfe02dad42742a9ba1b5dc0d3",onClick:()=>this.closeAlert(),"aria-live":"assertive",variant:"danger",icon:"c-info-16"},"All fields are mandatory"))),a("h2",{key:"f3ea20197617a886e6d52b218588a3697d5ff582",class:"templates__title"},"Choose your template"),a("div",{key:"b9edc1b18196bbcbb8e1800db55628fab465009d",class:"templates__wrapper"},a("ifx-template",{key:"085075a6e78942f57ed4d48be203111dc43bd9af",name:"template-01",thumbnail:this.tableTemplate}),a("ifx-template",{key:"343585d1067360babceaf9399a8d66a35471e186",name:"template-02",thumbnail:this.wizardTemplate})))}static get assetsDirs(){return["assets"]}get el(){return s(this)}};r.style=i;export{r as ifx_templates_ui};
//# sourceMappingURL=p-cd7273a6.entry.js.map