import{r as h,au as d,j as s,d as u}from"./index-CzUo07dn.js";import{s as g,p as S}from"./searchAndFilter-BEZtSWxl.js";const E=["Container","VM","Image","Custom"],P="query",n="pool",o="volume-type",c="content-type",r=[P,n,o,c],v=["Block","Filesystem","ISO"],x=({volumes:i})=>{const[a,l]=d(),p=[{id:1,heading:"Pool",chips:[...new Set(i.map(e=>e.pool))].map(e=>({lead:n,value:e}))},{id:2,heading:"Volume type",chips:E.map(e=>({lead:o,value:e}))},{id:3,heading:"Content type",chips:v.map(e=>({lead:c,value:e}))}],m=e=>{const t=S(e,a,r);t.toString()!==a.toString()&&l(t)};return s.jsxs("div",{className:"search-wrapper margin-right u-sv3",children:[s.jsx("h2",{className:"u-off-screen",children:"Search and filter"}),s.jsx(u.SearchAndFilter,{existingSearchData:g(a,r),filterPanelData:p,returnSearchData:m,onExpandChange:()=>{window.dispatchEvent(new CustomEvent("resize",{detail:"search-and-filter"}))},onPanelToggle:()=>{window.dispatchEvent(new CustomEvent("sfp-toggle"))}})]})},y=h.memo(x);export{c as C,n as P,P as Q,y as S,o as V};
