1import{d as f,j as e}from"./index-DR2FqLOh.js";import{r as n,L as l}from"./vendor-react-BQzD2VmY.js";import{H as g}from"./vendor-utils-Ce5p5qV0.js";import"./vendor-realtime-qXw27f4H.js";const b={"Maruti Suzuki":"suzuki","MARUTI SUZUKI":"suzuki",Maruti:"suzuki",MARUTI:"suzuki","Mercedes-Benz":"mercedes-benz","MERCEDES-BENZ":"mercedes-benz",Mercedes:"mercedes-benz",MERCEDES:"mercedes-benz","Land Rover":"land-rover","LAND ROVER":"land-rover","Range Rover":"land-rover","Rolls-Royce":"rolls-royce","ROLLS-ROYCE":"rolls-royce","Aston Martin":"aston-martin","ASTON MARTIN":"aston-martin","Alfa Romeo":"alfa-romeo","MG Motor":"mg"},c=t=>`https://raw.githubusercontent.com/filippofilip95/car-logos-dataset/master/logos/optimized/${b[t]||t.toLowerCase().replace(/\s+/g,"-")}.png`;function w(){const[t,o]=n.useState([]),[i,m]=n.useState(""),[x,u]=n.useState(!0);n.useEffect(()=>{window.scrollTo(0,0),h()},[]);const h=async()=>{try{const r=await f.getFilterOptions();if(r.success&&r.filters&&r.filters.brands){const a=r.filters.brands.filter(s=>s.brand&&s.brand.toLowerCase()!=="unknown").map(s=>({name:s.brand,count:parseInt(s.count),logo:c(s.brand)}));a.sort((s,p)=>s.name.localeCompare(p.name)),o(a)}}catch(r){console.error("Error fetching brands:",r);const a=["Maruti Suzuki","Hyundai","Tata","Mahindra","Honda","Toyota","Kia","MG","Volkswagen","Skoda","Renault","Nissan","Ford","BMW","Mercedes-Benz","Audi","Jeep","Volvo","Lexus","Porsche","Jaguar","Land Rover","Mini","Fiat"].map(s=>({name:s,count:0,logo:c(s)}));o(a)}finally{u(!1)}},d=t.filter(r=>r.name.toLowerCase().includes(i.toLowerCase()));return e.jsxs("div",{className:"all-brands-page",children:[e.jsxs(g,{children:[e.jsx("title",{children:"Browse Used Cars by Brand | Maruti, Honda, Toyota & More | CarArth"}),e.jsx("meta",{name:"description",content:"Find verified used cars from all major brands in India. Browse listings categorized by manufacturer for easier discovery."}),e.jsx("link",{rel:"canonical",href:"https://cararth.com/brands"})]}),e.jsxs("div",{className:"max-w-[1200px] mx-auto px-4 md:px-10 py-8",children:[e.jsxs("nav",{className:"brands-breadcrumb mb-6",children:[e.jsx(l,{to:"/",children:"Home"}),e.jsx("span",{className:"material-symbols-outlined text-base",children:"chevron_right"}),e.jsx("span",{className:"current",children:"All Brands"})]}),e.jsx("header",{className:"brands-header mb-8",children:e.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-bold text-text-primary",children:"All Car Brands"}),e.jsxs("p",{className:"text-text-secondary mt-1",children:["Explore cars from over ",t.length," manufacturers"]})]}),e.jsxs("div",{className:"relative w-full md:w-80",children:[e.jsx("span",{className:"material-symbols-outlined absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary",children:"search"}),e.jsx("input",{type:"text",placeholder:"Search brands...",className:"w-full pl-10 pr-4 py-2 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary transition-all",value:i,onChange:r=>m(r.target.value)})]})]})}),x?e.jsx("div",{className:"flex justify-center py-20",children:e.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-b-2 border-primary"})}):d.length===0?e.jsxs("div",{className:"text-center py-20 bg-white rounded-2xl border border-border",children:[e.jsx("span",{className:"material-symbols-outlined text-4xl text-text-secondary mb-3",children:"search_off"}),e.jsx("h3",{className:"text-xl font-semibold",children:"No brands found"}),e.jsx("p",{className:"text-text-secondary",children:"Try a different search term"})]}):e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-6 gap-4",children:d.map((r,a)=>e.jsxs(l,{to:"/used-cars?brand="+encodeURIComponent(r.name),className:"brand-card group bg-white border border-border rounded-xl p-6 flex flex-col items-center justify-center hover:shadow-lg hover:border-primary/30 transition-all",children:[e.jsxs("div",{className:"w-16 h-16 md:w-20 md:h-20 flex items-center justify-center mb-4 transition-transform group-hover:scale-110 bg-gray-50 rounded-lg relative",children:[e.jsx("img",{src:r.logo,alt:r.name,className:"max-w-full max-h-full object-contain",onError:s=>{s.target.style.display="none",s.target.nextSibling.style.display="flex"}}),e.jsx("span",{className:"hidden w-12 h-12 md:w-16 md:h-16 items-center justify-center text-xl md:text-2xl font-bold text-orange-500 bg-orange-50 rounded-lg",children:r.name.charAt(0)})]}),e.jsx("span",{className:"text-sm font-semibold text-text-primary text-center group-hover:text-primary transition-colors",children:r.name}),r.count>0&&e.jsxs("span",{className:"text-xs text-text-secondary mt-1",children:[r.count.toLocaleStr
1ing("en-IN")," Cars"]})]},a))}),e.jsx("div",{className:"mt-8",children:e.jsxs(l,{to:"/",className:"inline-flex items-center text-orange-500 text-sm font-medium hover:underline",children:[e.jsx("span",{className:"material-symbols-outlined text-lg mr-1",children:"arrow_back"}),"Back to Home"]})})]})]})}export{w 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.