import{r as e,a,e as t,h as s}from"./p-wX3eJOEL.js";const r=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){this.el.shadowRoot.querySelector(".templates__wrapper").querySelectorAll("ifx-template").forEach((a=>{a.toggleTemplate(e)}))}handleError(e){const a=this.el.shadowRoot.querySelector(".alert__wrapper");e.detail?a.classList.add("show"):a.classList.remove("show")}filterTemplates(e){const a=this.el.shadowRoot.querySelector(".templates__title"),t=this.el.shadowRoot.querySelector(".back__btn-wrapper");e.detail?(a.classList.add("hide"),"details"!==e.detail&&t.classList.add("show"),this.toggleTemplate(e.detail)):(a.classList.remove("hide"),t.classList.remove("show"),this.toggleTemplate(null))}closeAlert(){this.el.shadowRoot.querySelector(".alert__wrapper").classList.remove("show")}render(){return s("div",{key:"3ae6adab1629b5ccac588791ce2d309cacbebd9c",class:"templates__container"},s("div",{key:"67f33d446aebe5730b324eb0b8b0495e5c857252",class:"back__btn-wrapper"},s("ifx-icon-button",{key:"df2999672f040014da5015d53affad793c97ec50",onClick:()=>this.filterTemplates(!1),shape:"round",variant:"tertiary",icon:"arrow-left-16",target:"_blank",size:"m"}),s("div",{key:"e6ac0d1bbac185534fe9a1d3ce938dded2d963b4",class:"alert__wrapper"},s("ifx-alert",{key:"5d7017086dea0e7117d9d395b56f35eac880d7d4",onClick:()=>this.closeAlert(),"aria-live":"assertive",variant:"danger",icon:"c-info-16"},"All fields are mandatory"))),s("h2",{key:"df32be6104d3499874194d9f1d13a4fa894b2458",class:"templates__title"},"Choose your template"),s("div",{key:"3bad4733a12a1c1bbc79d5dcd1764770f31f9df5",class:"templates__wrapper"},s("ifx-template",{key:"e40c0cf0a6e215dd1a439f6d331d78b6c09245e2",name:"template-01",thumbnail:this.tableTemplate}),s("ifx-template",{key:"6dea865b691395ee513332687b9d33b8548435c9",name:"template-02",thumbnail:this.wizardTemplate})))}static get assetsDirs(){return["assets"]}};r.style="*{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}";export{r as ifx_templates_ui}