import{r as o,h as l}from"./p-03169580.js";const i="app-import ion-card,app-import ion-card-content{overflow:visible !important}";let n=class{constructor(l){o(this,l);this.results=[]}onSuccess(o){var l,i,n,t;console.log(o);if(((l=o===null||o===void 0?void 0:o.detail)===null||l===void 0?void 0:l.endpoint)!=="importer")return;this.results=((t=(n=(i=o===null||o===void 0?void 0:o.detail)===null||i===void 0?void 0:i.data)===null||n===void 0?void 0:n.importer)===null||t===void 0?void 0:t.results)||[]}onChange(o){var l,i;console.log(o);const n=o===null||o===void 0?void 0:o.target;if((n===null||n===void 0?void 0:n.tagName)==="ION-SEARCHBAR"){this.query=((i=(l=o===null||o===void 0?void 0:o.target)===null||l===void 0?void 0:l.value)===null||i===void 0?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("fireenjin-form",{endpoint:"importer",beforeSubmit:o=>({...o,limit:parseInt(o===null||o===void 0?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("ion-searchbar",{color:"light",placeholder:"Search Results"}),l("div",{class:"table-responsive"},l("table",{class:"table"},l("tbody",null,(this.results||[]).map(((o,i)=>[i===0&&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:(o===null||o===void 0?void 0:o._path)?o._path.segments.join("/"):l("code",null,JSON.stringify(o,null,4))))))]))))))))),l("floodteam-navigation-footer",null)]}};n.style=i;export{n as app_import};
//# sourceMappingURL=p-65857ee3.entry.js.map