import{r as n,h as e,H as l}from"./p-9b6cc562.js";const t=class{constructor(e){n(this,e)}async selectPartial(n,e){e&&e.preventDefault(),document.dispatchEvent(new CustomEvent("fireenjinEditorClick",{detail:{event:e,template:{id:n.id,name:n.name?n.name:n.subject,html:n.html},blockId:this.blockId}}))}render(){return e(l,null,e("ion-header",null,e("ion-toolbar",null,e("ion-title",null,"Select a Template"),e("ion-buttons",{slot:"primary"},e("ion-button",{onClick:n=>document.dispatchEvent(new CustomEvent("fireenjinModalClose",{detail:{event:n}}))},e("ion-icon",{slot:"icon-only",name:"close"}))))),e("ion-content",{class:"ion-padding"},e("ion-grid",null,e("ion-row",null,(this.partials||[]).map((n=>e("ion-col",{size:"12",sizeMd:"6"},e("ion-item",{onClick:e=>this.selectPartial(n,e),detail:!0,href:"#"},e("ion-label",null,e("h2",null,(null==n?void 0:n.name)||(null==n?void 0:n.subject)||"No Name"),e("fireenjin-render-template",{template:{html:(null==n?void 0:n.html)||"",id:"partial"},zoom:.5,partials:this.partials,style:{height:"250px",width:"250px"}}))))))))))}};export{t as fireenjin_modal_component_select}