PageSourceSearch

https://nwfloors.co.uk/assets/Category-CPIMg78V.js

js nwfloors.co.uk collected 2026-10-08 17:35:40 UTC 20,355 bytes, 6 lines download raw bytes

1import{h as E,r as u,j as e,B as f,n as B,u as T,L as F,i as W,k as U}from"./index-D2rUcUpe.js";import{P as V}from"./PageSeo-DcLyJZY5.js";import{C as A,a as D,b as $,c as L}from"./card-Bto263fv.js";import{P as q}from"./ProductCard-DbCMdlue.js";import{C as z}from"./checkbox-BmaTvz5L.js";import{L as O}from"./label-FpK1FRAL.js";import{S as I}from"./slider-CsbbdOaM.js";import{A as Z,a as Q,b as Y,c as _}from"./accordion-ULL4bNPf.js";import{F as G}from"./filter-D2GrYpuI.js";import{R as J}from"./refresh-cw-B97zkV44.js";import{S as X}from"./sliders-horizontal-BK585Jvn.js";import{L as K}from"./loader-circle-BLb9ftDd.js";import"./Helmet-D7MYuSoa.js";import"./imageFallback-DUuXydo8.js";/**
2 * @license lucide-react v0.453.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const ee=E("BadgeCheck",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),ae={engineered:{woodSpecies:[{id:"oak",label:"Oak"},{id:"walnut",label:"Walnut"},{id:"maple",label:"Maple"},{id:"hickory",label:"Hickory"},{id:"cherry",label:"Cherry"}],finish:[{id:"matt",label:"Matt"},{id:"satin",label:"Satin"},{id:"gloss",label:"Gloss"},{id:"oiled",label:"Oiled"},{id:"brushed",label:"Brushed"}],construction:[{id:"3-ply",label:"3-Ply Construction"},{id:"multi-ply",label:"Multi-Ply Construction"},{id:"hdf-core",label:"HDF Core"}],grade:[{id:"prime",label:"Prime Grade"},{id:"select",label:"Select Grade"},{id:"natural",label:"Natural Grade"},{id:"rustic",label:"Rustic Grade"}],installation:[{id:"click-lock",label:"Click-Lock"},{id:"tongue-groove",label:"Tongue & Groove"}]},"vinyl-lvt":{format:[{id:"plank",label:"Plank"},{id:"tile",label:"Tile"},{id:"herringbone",label:"Herringbone"}],wearLayer:[{id:"0.3mm",label:"0.3mm"},{id:"0.5mm",label:"0.5mm"},{id:"0.7mm",label:"0.7mm"}],backing:[{id:"rigid-core",label:"Rigid Core"},{id:"spc",label:"Stone Plastic Composite (SPC)"},{id:"wpc",label:"Wood Plastic Composite (WPC)"}],installation:[{id:"click",label:"Click"},{id:"glue-down",label:"Glue Down"},{id:"loose-lay",label:"Loose Lay"}],features:[{id:"waterproof",label:"Waterproof"},{id:"sound-reducing",label:"Sound Reducing"},{id:"underfloor-heating",label:"Underfloor Heating Compatible"}]},laminate:{thickness:[{id:"8mm",label:"8mm"},{id:"10mm",label:"10mm"},{id:"12mm",label:"12mm"}],abrasionClass:[{id:"ac3",label:"AC3 - Residential"},{id:"ac4",label:"AC4 - Commercial"},{id:"ac5",label:"AC5 - Heavy Commercial"}],edgeTreatment:[{id:"straight",label:"Straight Edge"},{id:"beveled",label:"Beveled Edge"},{id:"micro-beveled",label:"Micro-Beveled"}],waterResistance:[{id:"standard",label:"Standard"},{id:"water-resistant",label:"Water Resistant"},{id:"waterproof",label:"Waterproof"}],texture:[{id:"smooth",label:"Smooth"},{id:"hand-scraped",label:"Hand Scraped"},{id:"embossed",label:"Embossed"},{id:"distressed",label:"Distressed"}]},"solid-wood":{woodSpecies:[{id:"oak",label:"Oak"},{id:"walnut",label:"Walnut"},{id:"maple",label:"Maple"},{id:"hickory",label:"Hickory"},{id:"cherry",label:"Cherry"}],finish:[{id:"unfinished",label:"Unfinished"},{id:"prefinished",label:"Prefinished"},{id:"oiled",label:"Oiled"},{id:"lacquered",label:"Lacquered"}],texture:[{id:"smooth",label:"Smooth"},{id:"hand-scraped",label:"Hand Scraped"},{id:"wire-brushed",label:"Wire Brushed"},{id:"distressed",label:"Distressed"}],plankWidth:[{id:"narrow",label:'Narrow (< 5")'},{id:"medium",label:'Medium (5-7")'},{id:"wide",label:'Wide (> 7")'}]},accessories:{type:[{id:"underlay",label:"Underlay"},{id:"trim",label:"Trim & Mouldings"},{id:"adhesives",label:"Adhesives"},{id:"maintenance",label:"Maintenance Products"},{id:"tools",label:"Installation Tools"}]}},ie={color:[{id:"light",label:"Light"},{id:"medium",label:"Medium"},{id:"dark",label:"Dark"},{id:"grey",label:"Grey"},{id:"white",label:"White"}],roomSuitability:[{id:"living",label:"Living Room"},{id:"kitchen",label:"Kitchen"},{id:"bathroom",label:"Bathroom"},{id:"bedroom",label:"Bedroom"},{id:"hallway",label:"Hallway"},{id:"commercial",label:"Commercial"}],underfloorHeating:[{id:"compatible",label:"Underfloor Heating Compatible"}],available:[{id:"inStock",label:"In Stock Now"}],discount:[{id:"onSale",label:"Special Offers"}]},se=({categorySlug:g,onFilterChange:a})=>{const j=ae[g]||{},p={...ie,...j},[v,o]=u.useState({}),[t,c]=u.useState([0,100]),N=(s,m,r)=>{o(C=>{const i=C[s]||[],l=r?[...i,m]:i.filter(n=>n!==m);return{...C,[s]:l}})},k=()=>{o({}),c([0,100]),a({})},P=()=>{const s={...v,priceRange:t};a(s)},y=Object.values(v).reduce((s,m)=>s+m.length,0)+(t[0]>0||t[1]<100?1:0);return e.jsxs(A,{className:"bg-white shadow-sm",children:[e.jsx(D,{className:"border-b",children:e.jsxs($,{className:"flex items-center justify-between",children:[e.jsxs("span",{className:"flex items-center",children:[e.jsx(G,{className:"w-5 h-5 mr-2"}),"Filters"]}),y>0&&e.jsxs("span",{className:"text-sm font-normal text-primary",children:[y," active filter",y!==1?"s":""]})]})}),e.jsx(L,{className:"p-4",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h3",{className:"font-medium mb-3",children:"Price Range"}),e.jsxs("div",{className:"px-2",children:[e.jsx(I,{defaultValue:[0,100],value:t,max:100,step:1,onValueChange:s=>c(s),className:"my-6"}),e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsxs("span",{children:["£",t[0]]}),e.jsxs("span",{children:["£",t[1]]})]})]})]}),e.jsx(Z,{type:"multiple",defaultValue:["color","roomSuitability"],className:"space-y-2",children:Object.entries(p).map(([s,m])=>e.jsxs(Q,{value:s,className:"border-b",children:[e.jsx(Y,{className:"text-base font-medium hover:no-underline py-3",children:s.replace(/([A-Z])/g," $1").replace(/^./,r=>r.toUpperCase())}),e.jsx(_,{className:"pt-1 pb-3",children:e.jsx("div",{className:"space-y-2",children:Array.isArray(m)&&m.map(r=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(z,{id:`${s}-${r.id}`,checked:(v[s]||[]).includes(r.id),onCheckedChange:C=>N(s,r.id,C===!0)}),e.jsx(O,{htmlFor:`${s}-${r.id}`,className:"text-sm cursor-pointer",children:r.label})]},r.id))})})]},s))}),e.jsxs("div",{className:"flex flex-col sm:flex-row gap-2 pt-4 border-t",children:[e.jsxs(f,{variant:"default",className:"flex-1",onClick:P,children:[e.jsx(ee,{className:"w-4 h-4 mr-2"}),"Apply Filters"]}),e.jsxs(f,{variant:"outline",className:"flex-1",onClick:k,children:[e.jsx(J,{className:"w-4 h-4 mr-2"}),"Clear All"]})]})]})})]})},re=({categoryInfo:g})=>{const[a,j]=u.useState(!1);return e.jsxs("div",{className:"mb-8",children:[e.jsxs("div",{className:"max-w-3xl",children:[e.jsx("p",{className:"text-lg",children:a||!!0?g.description:`${g.description.substring(0,180)}...`}),e.jsx(f,{variant:"ghost",size:"sm",onClick:()=>j(!a),className:"mt-2 text-primary hover:text-primary/80 flex items-center gap-1",children:a?e.jsxs(e.Fragment,{children:["Read Less ",e.jsx(W,{className:"h-4 w-4"})]}):e.jsxs(e.Fragment,{children:["Read More ",e.jsx(U,{className:"h-4 w-4"})]})})]}),a&&e.jsxs("div",{className:"grid md:grid-cols-3 gap-8 mt-8 animate-in fade-in-50 duration-300",children:[e.jsx(A,{children:e.jsxs(L,{className:"p-6",children:[e.jsx("h3",{className:"text-xl font-semibold mb-4",children:"Key Features"}),e.jsx("ul",{className:"space-y-2",children:g.features.map((o,t)=>e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"text-primary mr-2",children:"•"}),e.jsx("span",{children:o})]},t))})]})}),e.jsx(A,{children:e.jsxs(L,{className:"p-6",children:[e.jsx("h3",{className:"text-xl font-semibold mb-4",children:"Ideal For"}),e.jsx("ul",{className:"space-y-2",children:g.idealFor.map((o,t)=>e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"text-primary mr-2",children:"•"}),e.jsx("span",{children:o})]},t))})]})}),e.jsx(A,{children:e.jsxs(L,{className:"p-6",children:[e.jsx("h3",{className:"text-xl font-semibold mb-4",children:"Maintenance Tips"}),e.jsx("ul",{className:"space-y-2",children:g.maintenanceTips.map((o,t)=>e.jsxs("li",{className:"flex items-start",children:[e.jsx("span",{className:"text-primary mr-2",children:"•"}),e.jsx("span",{children:o})]},t))})]})})]})]})},S={laminate:{title:"Laminate Flooring",description:"Laminate flooring is a durable and cost-effective alternative to hardwood that replicates the look of natural materials. Constructed with multiple layers including a photographic layer topped with a clear protective finish, laminate offers excellent resistance to wear, fading, and staining.",features:["Scratch and dent resistant for high-traffic areas","Available in a wide range of wood and stone looks","Typically easier to install than hardwood with click-lock systems","More affordable than solid hardwood or engineered wood","Resistant to fading from sunlight"],idealFor:["Living rooms and dining rooms","Hallways and entryways","Children's playrooms","Home office
6s"],maintenanceTips:["Clean with a damp mop and gentle cleaner made for laminate","Avoid excessive water which can damage the fiberboard core","Use furniture pads to prevent scratches","Don't use wax, polish, or abrasive cleaners"]},vinyl:{title:"Vinyl Flooring",description:"Vinyl flooring is a versatile, water-resistant option available in sheet, plank, and tile formats. Made primarily from PVC, vinyl flooring offers exceptional durability and comfort underfoot while being remarkably easy to maintain.",features:["100% waterproof in most quality vinyl products","Soft and warm underfoot compared to tile","Extremely durable with wear layers for protection","Available in realistic wood, stone, and decorative patterns","Quieter than laminate, reducing sound transmission"],idealFor:["Bathrooms and kitchens","Basements and laundry rooms","Commercial spaces","Areas prone to moisture"],maintenanceTips:["Regular sweeping and occasional mopping with vinyl floor cleaner","Can handle more moisture than laminate during cleaning","Use doormats at entrances to prevent dirt and grit","Avoid dragging heavy furniture across the surface"]},lvt:{title:"Luxury Vinyl Tile (LVT)",description:"Luxury Vinyl Tile (LVT) represents the premium end of vinyl flooring, offering exceptional realism and performance. With advanced printing technology and embossed textures, LVT provides authentic-looking wood and stone visuals with the practical benefits of vinyl.",features:["High-definition printing for ultra-realistic appearance","Textured surface that mimics natural materials","Thick 
6wear layers (often 20mil or higher) for extended durability","100% waterproof construction","Often features enhanced backing for comfort and stability"],idealFor:["High-end residential applications","Commercial spaces requiring style and durability","Areas with heavy foot traffic","Wet areas like bathrooms and kitchens"],maintenanceTips:["Regular sweeping and vacuuming without beater bar","Damp mopping with manufacturer-recommended cleaner","Immediately wipe up spills (though waterproof, liquids can cause slipping)","Use felt pads under furniture to prevent scratches"]},engineered:{title:"Engineered Wood Flooring",description:"Engineered wood flooring combines the beauty of real hardwood with enhanced stability and versatility. Constructed with a genuine hardwood veneer bonded to multiple layers of plywood or high-density fiberboard, engineered wood offers the authentic look and feel of solid wood with greater resistance to moisture and temperature fluctuations.",features:["Real wood appearance and texture","More dimensionally stable than solid hardwood","Can be installed in areas with moderate humidity changes","Available in a wide range of wood species and finishes","Can be refinished, depending on wear layer thickness"],idealFor:["Living rooms and dining areas","Bedrooms and studies","Basements (with proper moisture barriers)","Installations over concrete slabs"],maintenanceTips:["Sweep or vacuum regularly with a soft brush attachment","Clean with hardwood floor cleaner and microfiber mop","Wipe up spills promptly to prevent damage","Maintain consistent indoor humidity levels (35-55%)"]},carpet:{title:"Carpet Flooring",description:"Carpet flooring offers unmatched comfort and warmth while providing sound absorption and insulation benefits. Available in countless colors, patterns, and pile heights, carpet creates a cozy atmosphere that's perfect for relaxation and comfort.",features:["Soft and comfortable underfoot","Excellent sound absorption and insulation properties","Available in various pile types (cut, loop, or cut-and-loop)","Wide range of materials including nylon, polyester, and wool","Provides warmth and comfort in cooler climates"],idealFor:["Bedrooms and master suites","Living rooms and family rooms","Home theaters and media rooms","Children's playrooms"],maintenanceTips:["Vacuum regularly, at least once a week","Address spills immediately by blotting (not rubbing)","Professional deep cleaning recommended every 12-18 months","Use carpet protector sprays for high-traffic areas"]},accessories:{title:"Flooring Accessories",description:"Complete your flooring project with our range of essential accessories. From underlayment that enhances comfort and sound insulation to trim pieces that create professional finishing touches, our accessories ensure your flooring installation is perfect from start to finish.",features:["Underlayment options for sound reduction and comfort","Matching trim pieces for seamless transitions","Specialized adhesives and installation tools","Maintenance products to keep your floors looking their best","Stair nosing and edge finishing solutions"],idealFor:["New flooring installations","Renovations and floor replacements","DIY projects","Professional installers"],maintenanceTips:["Store adhesives and cleaning products according to manufacturer instructions","Replace worn underlayment when replacing flooring","Check trim pieces periodically for secure attachment","Use manufacturer-recommended maintenance products"]}},H={title:"Quality Flooring Solutions",description:"Explore our selection of premium flooring options designed to enhance any space. With a focus on durability, style, and value, our flooring products are suitable for both residential and commercial applications.",features:["Premium quality materials","Designed for longevity and performance","Available in various styles and finishes","Suitable for diverse applications"],idealFor:["Home renovations","New construction","Commercial projects","Property upgrades"],maintenanceTips:["Follow manufacturer cleaning guidelines","Regular maintenance extends product life","Use appropriate cleaning products","Protect floors from heavy furniture"]},ye=g=>{const{slug:a}=g.params,[,j]=B();u.useEffect(()=>{a&&a.toLowerCase()==="carpet"&&j("/shop/category/accessories",{replace:!0})},[a,j]);const[p,v]=u.useState(a||""),[o,t]=u.useState(a&&Object.keys(S).includes(a)?S[a]:H),[c,N]=u.useState({}),[k,P]=u.useState(!1),[y,s]=u.useState([]);u.useEffect(()=>{console.log("Category slug:",a),a&&a in S?(console.log("Category found in descriptions:",a),t(S[a])):(console.log("Using default description for category:",a),t(H)),v(a||"")},[a]);const{data:m}=T({queryKey:["/api/categories"]});m==null||m.find(i=>i.slug===p);const{data:r,isLoading:C}=T({queryKey:["/api/products",{category:p}],queryFn:async()=>{const i=await fetch(`/api/products?category=${p}`);
6if(!i.ok)throw new Error("Failed to fetch products");return i.json()},enabled:!!p});return u.useEffect(()=>{if(!r)return;let i=[...r];if(Object.keys(c).length>0){if(c.priceRange){const[l,n]=c.priceRange;i=i.filter(d=>{const x=d.originalPrice&&d.originalPrice<d.price?d.originalPrice:d.price;return x>=l&&x<=n})}Object.entries(c).forEach(([l,n])=>{l!=="priceRange"&&(!Array.isArray(n)||n.length===0||(i=i.filter(d=>{if(l==="available"&&n.includes("inStock"))return d.inStock===!0;if(l==="discount"&&n.includes("onSale"))return d.isSale===!0||d.originalPrice!==null&&d.originalPrice>d.price;const x=d.attributes||{};if(l==="color")return n.some(b=>{if(d.name.toLowerCase().includes(b))return!0;const h=x.color,w=x.colour;return h&&h.toLowerCase()===b||w&&w.toLowerCase()===b});if(l==="roomSuitability"){const b=d.suitableRooms||[],h=x.suitableFor,w=x.room_suitability;return n.some(R=>b.includes(R)||h&&h.includes(R)||w&&w.includes(R))}const M=[l,l.toLowerCase(),l.replace(/([A-Z])/g,"_$1").toLowerCase(),...l.split(/(?=[A-Z])/g).map(b=>b.toLowerCase())];for(const b of M){const h=x[b];if(h){if(Array.isArray(h)){if(n.some(w=>h.includes(w)))return!0}else if(typeof h=="string"&&n.includes(h.toLowerCase()))return!0}}return!1})))})}s(i)},[r,c]),p?e.jsxs(e.Fragment,{children:[e.jsx(V,{title:`${o.title} - Northwest Floors`,description:o.description,path:`/shop/category/${p}`}),e.jsxs("div",{className:"container mx-auto px-4 py-8",children:[e.jsxs("div",{className:"bg-primary/10 rounded-lg p-6 md:p-10 mb-10",children:[e.jsx("h1",{className:"text-3xl md:text-4xl font-bold mb-4",children:o.title}),e.jsx(re,{categoryInfo:o})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between items-center mb-6",children:[e.jsxs("h2",{className:"text-2xl font-bold",children:["Browse Our ",o.title]}),e.jsxs(f,{variant:"outline",size:"sm",className:"md:hidden flex items-center gap-2",onClick:()=>P(!k),children:[e.jsx(X,{size:16}),"Filters",Object.keys(c).length>0&&e.jsx("span",{className:"inline-flex items-center justify-center w-5 h-5 text-xs font-medium rounded-full bg-primary text-white",children:Object.entries(c).reduce((i,[l,n])=>l==="priceRange"?i+1:i+(Array.isArray(n)?n.length:0),0)})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[e.jsx("div",{className:`${k?"block":"hidden"} md:block md:col-span-1`,children:e.jsx(se,{categorySlug:p,onFilterChange:i=>N(i)})}),e.jsx("div",{className:"md:col-span-3",children:C?e.jsx("div",{className:"flex justify-center items-center min-h-[300px]",children:e.jsx(K,{className:"h-8 w-8 animate-spin text-primary"})}):r&&r.length>0?e.jsxs(e.Fragment,{children:[Object.keys(c).length>0&&e.jsxs("div",{className:"bg-gray-50 p-3 rounded-md mb-4 flex justify-between items-center",children:[e.jsxs("span",{className:"text-sm",children:["Showing ",y.length," of ",r.length," products"]}),e.jsx(f,{variant:"ghost",size:"sm",className:"text-sm",onClick:()=>N({}),children:"Clear All Filters"})]}),y.length>0?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:y.map(i=>e.jsx(q,{product:i},i.id))}):e.jsxs("div",{className:"text-center py-10 bg-gray-50 rounded-lg",children:[e.jsx("p",{className:"text-lg mb-2",children:"No products match your filter criteria."}),e.jsx("p",{className:"mb-4",children:"Try adjusting your filters or view all products in this category."}),e.jsx(f,{onClick:()=>N({}),children:"Clear Filters"})]})]}):e.jsxs("div",{className:"text-center py-10 bg-gray-50 rounded-lg",children:[e.jsx("p",{className:"text-lg mb-4",children:"No products currently available in this category."}),e.jsx("p",{className:"mb-6",children:"Please check back soon or explore our other flooring options."}),e.jsx(F,{href:"/shop",children:e.jsx(f,{children:"View All Products"})})]})})]})]}),e.jsxs("div",{className:"mt-16 mb-8 bg-primary/5 p-8 rounded-lg text-center",children:[e.jsx("h3",{className:"text-2xl font-bold mb-4",children:"Need Help with Your Flooring Project?"}),e.jsx("p",{className:"mb-6 max-w-2xl mx-auto",children:"Our flooring experts are ready to assist with product selection, measuring, and installation advice. Contact us today for personalized service."}),e.jsxs("div",{className:"flex flex-wrap justify-center gap-4",children:[e.jsx(F,{href:"/contact",children:e.jsx(f,{children:"Contact Us"})}),e.jsx(F,{href:"/home-appointment",children:e.jsx(f,{variant:"outline",children:"Book a Home Appointment"})})]})]})]})]}):e.jsxs("div",{className:"container mx-auto px-4 py-12",children:[e.jsx("h1",{className:"text-3xl font-bold mb-4",children:"Category not found"}),e.jsx("p",{className:"mb-6",children:"Please select a valid category from our shop."}),e.jsx(F,{href:"/shop",children:e.jsx(f,{children:"Return to Shop"})})]})};export{ye as default};

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.