import{r as i,B as o,h as n}from"./p-9b6cc562.js";import{s as l}from"./p-889c70e7.js";import"./p-e5527167.js";import"./p-95e9f2f6.js";import"./p-86bd3473.js";import"./p-65879f9e.js";import"./p-60cf0cc2.js";const e=class{constructor(o){i(this,o),this.paginationEl=void 0}componentDidLoad(){}render(){var i,o,e,t,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===(e=null==l?void 0:l.locations)||void 0===e?void 0:e.length)?l.locations.map((i=>({label:i.name,value:i.id}))):[],value:(null===(t=null==l?void 0:l.claims)||void 0===t?void 0:t.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"}))]}};e.style="";export{e as app_inventory_list}