import{r as i,B as o,h as n}from"./p-846bd001.js";import{s as l}from"./p-4ff8bb4b.js";import"./p-5cd01495.js";import"./p-259f1737.js";import"./p-ae2fb9dc.js";import"./p-65879f9e.js";import"./p-dca1478c.js";const t=class{constructor(o){i(this,o),this.paginationEl=void 0}componentDidLoad(){}render(){var i,o,t,e,r,s;return[n("ion-content",{class:"ion-padding"},n("floodteam-title-bar",null,n("ion-router-link",{href:"/inventory"},"Inventory"),n("ion-buttons",{slot:"end"},n("ion-button",{fill:"solid",color:"primary",href:"/inventory/new"},"Add"))),n("fireenjin-search-bar",{paginationEl:this.paginationEl,filters:(null===(i=null==l?void 0:l.claims)||void 0===i?void 0:i.tester)||(null===(o=null==l?void 0:l.claims)||void 0===o?void 0:o.admin)?[{name:"tags",label:"Tags",icon:"pricetags",multiple:!0,options:[{label:"Imported",value:"imported"}]},{name:"locationId",label:"Location",icon:"business",options:(null===(t=null==l?void 0:l.locations)||void 0===t?void 0:t.length)?l.locations.map((i=>({label:i.name,value:i.id}))):[],value:(null===(e=null==l?void 0:l.claims)||void 0===e?void 0:e.tester)&&(null===(s=null===(r=null==l?void 0:l.profile)||void 0===r?void 0:r.location)||void 0===s?void 0:s.id)?l.profile.location.id:null}]:null}),n("fireenjin-pagination",{ref:i=>this.paginationEl=i,listEl:({result:i})=>n("ion-item",{href:`/inventory/${i.id}`,detail:!0},n("ion-label",null,n("h2",null,i.name?i.name:""," "))),endpoint:"listInventories",limit:20,resultsKey:"inventories",name:"inventories"}))]}};t.style="";export{t as app_inventory_list}