1import{u as f,_ as p,S as b,B as i}from"./index-pawrQU7m.js";import{a as o,j as e}from"./vendor-react-DP1M2pbw.js";import{L as j}from"./vendor-router-Yxf7jkmL.js";import{l as v,P as N,A as w}from"./vendor-icons-DL-oK0q_.js";import"./vendor-ui-BF8qQhP0.js";function c({pest:t}){return e.jsx(j,{href:`/pest-library/${t.slug}`,children:e.jsxs("div",{className:"group cursor-pointer bg-white rounded-2xl border border-border overflow-hidden hover:shadow-xl transition-all duration-300 hover:-translate-y-1 h-full flex flex-col",children:[e.jsx("div",{className:"aspect-[4/3] overflow-hidden bg-muted/30",children:e.jsx("img",{src:t.imageUrl,alt:t.name,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500",loading:"lazy"})}),e.jsxs("div",{className:"p-5 flex flex-col flex-1",children:[e.jsx("h3",{className:"text-lg font-serif font-bold mb-1 group-hover:text-accent transition-colors",children:t.name}),e.jsx("p",{className:"text-xs text-muted-foreground italic mb-2",children:t.scientificName}),e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 flex-1",children:t.shortDescription}),e.jsxs("div",{className:"mt-3 flex items-center gap-2 text-accent text-sm font-semibold",children:["Learn More About ",t.name," ",e.jsx(w,{className:"w-3.5 h-3.5 group-hover:translate-x-1 transition-transform"})]})]})]})})}function L(){const[t,d]=o.useState(""),{openQuoteModal:x}=f(),[n,m]=o.useState([]),[u,h]=o.useState([]);o.useEffect(()=>{p(()=>import("./data-pest-library-B_SR-KJI.js"),[]).then(s=>{m(s.PESTS),h(s.PEST_CATEGORIES)})},[]);const r=o.useMemo(()=>{if(!t.trim())return null;const s=t.toLowerCase();return n.filter(l=>l.name.toLowerCase().includes(s)||l.commonNames.some(a=>a.toLowerCase().includes(s))||l.category.toLowerCase().includes(s)||l.shortDescription.toLowerCase().includes(s))},[t,n]),g=t.trim().length>0;return e.jsxs("div",{className:"flex flex-col w-full pb-24 bg-background",children:[e.jsx(b,{title:"Pest Library",description:"Identify common pests in Bowling Green, KY. Browse 37+ pests including ants, spiders, cockroaches, rodents, termites, bed bugs & more. Expert identification, prevention tips, and treatment info.",canonical:"https://bowlinggreenpestcontrol.com/pest-library"}),e.jsxs("section",{className:"bg-primary text-primary-foreground py-24 px-4 relative overflow-hidden",children:[e.jsxs("div",{className:"absolute inset-0 opacity-10",children:[e.jsx("div",{className:"absolute w-[500px] h-[500px] rounded-full border-2 border-white/20 -top-40 -right-40"}),e.jsx("div",{className:"absolute w-[300px] h-[300px] rounded-full border-2 border-white/20 bottom-20 left-20"})]}),e.jsxs("div",{className:"max-w-4xl mx-auto text-center relative z-10",children:[e.jsx("h1",{className:"text-5xl md:text-6xl font-serif font-bold mb-6",children:"The Pest Files"}),e.jsx("p",{className:"text-xl text-primary-foreground/80 leading-relaxed max-w-2xl mx-auto mb-10",children:"A crash course on all the critters, creepers, and crawlers common to Bowling Green, Kentucky."}),e.jsxs("div",{className:"max-w-lg mx-auto relative",children:[e.jsx(v,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-5 h-5 text-muted-foreground"}),e.jsx("input",{type:"text",placeholder:"Search pests by name or type...",value:t,onChange:s=>d(s.target.value),className:"w-full pl-12 pr-4 py-4 rounded-full bg-white text-foreground placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-accent shadow-lg text-base","aria-label":"Search pest library"})]})]})]}),e.jsx("div",{className:"max-w-7xl mx-auto px-4 lg:px-8 w-full mt-12",children:g?e.jsxs("div",{children:[e.jsx("p",{className:"text-lg text-muted-foreground mb-6","aria-live":"polite",role:"status",children:r&&r.length>0?`Found ${r.length} pest${r.length===1?"":"s"} matching "${t}"`:`No pests found matching "${t}"`}),r&&r.length>0&&e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 gap-5",children:r.map(s=>e.jsx(c,{pest:s},s.slug))})]}):e.jsx("div",{className:"flex flex-col gap-16",children:u.map(s=>{const l=n.filter(a=>a.categorySlug===s.slug);return l.length===0?null:e.jsxs("section",{id:s.slug,children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("span",{className:"text-3xl",role:"img","aria-label":s.name,children:s.icon}),e.jsx("h2",{className:"text-3xl font-serif font-bold text-foreground",children:s.name})]}),e.jsx("p",{className:"text-muted-foreground mb-6 max-w-2xl",children:s.description}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 ga
1p-5",children:l.map(a=>e.jsx(c,{pest:a},a.slug))})]},s.slug)})})}),e.jsx("section",{className:"mt-20 py-16 bg-primary text-primary-foreground",children:e.jsxs("div",{className:"max-w-4xl mx-auto px-4 text-center",children:[e.jsx("h2",{className:"text-3xl font-serif font-bold mb-4",children:"Found a Pest? We Can Help."}),e.jsx("p",{className:"text-primary-foreground/80 text-lg mb-8 max-w-xl mx-auto",children:"Don't let pests take over your home. Our expert technicians provide fast, effective treatment for every pest in our library."}),e.jsxs("div",{className:"flex flex-wrap justify-center gap-4",children:[e.jsx(i,{size:"lg",variant:"secondary",className:"rounded-full font-bold",onClick:x,children:"Get a Free Quote"}),e.jsx("a",{href:"tel:(270)510-0473",children:e.jsxs(i,{size:"lg",className:"rounded-full font-bold bg-accent hover:bg-accent/90 gap-2",children:[e.jsx(N,{className:"w-4 h-4"})," (270) 510-0473"]})})]})]})})]})}export{L as PestIndex};
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.