1import{j as e}from"./index-W04rzwDS.js";import{C as E,a as q,P as z,b as D}from"./ProductCatalogCard-DJ_HHE5B.js";import{u as Q,S as V}from"./useProductCatalogPage-CHCGufsS.js";import{H as _}from"./HtmlContent-DG8VV4yV.js";import{S as G}from"./StorefrontSkeleton-CcfRzVRz.js";import"./ProductImage-DxdKdEFd.js";import"./ProductCardShell-DkRiI_im.js";import"./catalogState-DpWMcpNp.js";function ee({initialCategory:m="",initialSubCategory:C="",initialSubCategory2:y=""}){const{products:p,categories:S,loading:o,error:a,message:l,busyProductId:x,totalPages:i,currentPage:c,pageWindow:d,hasProducts:j,rangeStart:P,rangeEnd:b,totalProducts:v,draftFilters:t,appliedViewState:s,subCategoryOptions:N,subCategory2Options:f,activeCategoryDescriptionHtml:n,activeCategoryHeading:w,isInWishlist:F,isWishlistBusy:I,setSelectedCategory:O,setSelectedSubCategory:T,setSelectedSubCategory2:W,handleApplyFilters:A,handleResetFilters:H,handleSortChange:L,handlePageChange:u,handleAddToCart:R,handleToggleWishlist:k,warmCategories:B}=Q(m,C,y);return e.jsxs("section",{className:"catalog-page stack",children:[e.jsx("h2",{children:"Products"}),e.jsx("div",{className:"page-header product-page-header catalog-page-header",children:e.jsx(E,{categories:S,subCategoryOptions:N,subCategory2Options:f,selectedCategory:t.category,selectedSubCategory:t.subCategory,selectedSubCategory2:t.subCategory2,selectedSort:t.sort,sortOptions:V,onCategoryChange:O,onSubCategoryChange:T,onSubCategory2Change:W,onSortChange:L,onApplyFilters:A,onResetFilters:H,onWarmCategories:B})}),l&&e.jsx("p",{className:"success",children:l}),a&&e.jsx("p",{className:"error",children:a}),!o&&!a&&n&&e.jsxs("section",{className:"catalog-description-card stack","aria-label":"Selected category description",children:[e.jsxs("div",{className:"catalog-description-header",children:[e.jsx("h3",{children:w||"Category overview"}),e.jsx("div",{className:"muted compact-copy",children:"Legacy category description"})]}),e.jsx(_,{value:n,className:"legacy-rich-text"})]}),o&&!a&&e.jsx(G,{title:"Products",message:"Loading product cards, filters and catalog totalsâ¦",layout:"catalog"}),!o&&!a&&e.jsxs(e.Fragment,{children:[e.jsx(q,{hasProducts:j,rangeStart:P,rangeEnd:b,totalProducts:v,activeQuery:s.q,activeCategory:s.category,activeSubCategory:s.subCategory,activeSubCategory2:s.subCategory2,currentPage:c,totalPages:i,pageWindow:d,onPageChange:u}),e.jsx("div",{className:"product-grid product-grid-catalog",children:p.map((r,h)=>e.jsx(z,{product:r,imageLoading:h===0?"eager":"lazy",imageFetchPriority:h===0?"high":"low",busyProductId:x,wishlisted:F(r.productId),wishlistBusy:I(r.productId),onAddToCart:g=>void R(g),onToggleWishlist:g=>void k(g)},r.productId))}),e.jsxs("div",{className:"catalog-summary-row catalog-summary-card",children:[e.jsxs("div",{className:"muted",children:["Page ",c," of ",i]}),e.jsx(D,{currentPage:c,totalPages:i,pageWindow:d,onPageChange:u})]})]})]})}export{ee as ProductListPage};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.