import{r as o,h as l}from"./p-9b6cc562.js";const i=class{constructor(l){o(this,l),this.importId=void 0,this.results=[],this.query=void 0}onSuccess(o){var l,i,n,t;console.log(o),"importer"===(null===(l=null==o?void 0:o.detail)||void 0===l?void 0:l.endpoint)&&(this.results=(null===(t=null===(n=null===(i=null==o?void 0:o.detail)||void 0===i?void 0:i.data)||void 0===n?void 0:n.importer)||void 0===t?void 0:t.results)||[])}onChange(o){var l,i;console.log(o);const n=null==o?void 0:o.target;"ION-SEARCHBAR"===(null==n?void 0:n.tagName)&&(this.query=(null===(i=null===(l=null==o?void 0:o.target)||void 0===l?void 0:l.value)||void 0===i?void 0:i.length)>0?o.target.value:null)}render(){return[l("ion-content",{class:"ion-padding"},l("floodteam-title-bar",null,l("ion-router-link",{href:"/imports"},"Import"),l("ion-buttons",{slot:"end"},l("ion-button",{disabled:!0,fill:"outline"},"Import"),l("ion-button",{fill:"solid",color:"primary",onClick:()=>{var o,l;return null===(l=null===(o=this.formEl)||void 0===o?void 0:o.submit)||void 0===l?void 0:l.call(o)}},"Search"))),l("fireenjin-form",{ref:o=>this.formEl=o,hideControls:!0,endpoint:"importer",beforeSubmit:o=>({...o,limit:parseInt(null==o?void 0:o.limit)>0?parseInt(o.limit):null})},l("ion-card",null,l("ion-card-header",null,l("ion-grid",null,l("ion-row",null,l("ion-col",null,l("ion-item",null,l("ion-label",{position:"stacked"},"Import"),l("ion-select",{name:"type"},l("ion-select-option",{value:"ftms-users"},"FTMS Users"),l("ion-select-option",{value:"ftms-jobs"},"FTMS Jobs")))),l("ion-col",null,l("fireenjin-input",{label:"Limit",labelPosition:"stacked",name:"limit",type:"number",step:"1",min:"0"}))))),l("ion-card-content",null,l("div",{class:"table-responsive"},l("table",{class:"table",style:{background:"var(--background-color)"}},l("tbody",null,(this.results||[]).map(((o,i)=>[0===i&&l("tr",{style:{color:"var(--ion-text-color)",borderBottom:"1px solid var(--ion-color-light-shade)"}},Object.keys(o).map((o=>l("td",null,o)))),l("tr",null,Object.values(o).map((o=>l("td",null,["string","number"].includes(typeof o)?o:(null==o?void 0:o._path)?o._path.segments.join("/"):l("code",null,JSON.stringify(o,null,4))))))]))))))))),l("floodteam-navigation-footer",null)]}};i.style="app-import ion-card,app-import ion-card-content{overflow:visible !important}";export{i as app_import}