const { Button, IconButton, Badge, Card, Icon, MediaFrame, ProductCard, SectionHeading, StatGrid, FeatureCard, Timeline, FAQ, CTASection } = window.FriendsCarsDesignSystem_f69f0e;
/* ---------- shared ---------- */
function Shell({ children, tight, style }) {
return ;
}
function CarCard({ car, onOpen, style }) {
const store = window.useStore();
const specs = [{ icon: "fuel", label: car.fuel }, { icon: "gauge", label: car.gearbox }, { icon: "user", label: car.seats + " seats" }];
return (
onOpen(car)}
className={car.pos ? "fc-pos" : ""} style={car.pos ? { "--fc-pos": car.pos } : undefined} />
{ e.stopPropagation(); store.toggle("wish", car.id); }}
style={store.has("wish", car.id) ? { color: "var(--accent-hover)", borderColor: "var(--border-strong)" } : undefined} />
{ e.stopPropagation(); store.toggle("compare", car.id); }}
style={store.has("compare", car.id) ? { color: "var(--accent-hover)", borderColor: "var(--border-strong)" } : undefined} />
);
}
function Rail({ children, label }) {
const ref = React.useRef(null);
return (
{children}
window.railScroll(ref.current, -1)} />
window.railScroll(ref.current, 1)} />
);
}
function Heading({ eyebrow, title, body, action }) {
return (
{action || null}
);
}
/* ---------- home sections ---------- */
function StatsBand() {
const [r1, cars] = window.useCountUp(window.BIZ.cars);
const [r2, cust] = window.useCountUp(window.BIZ.customers);
const [r3, yrs] = window.useCountUp(new Date().getFullYear() - window.BIZ.since);
const items = [
{ ref: r1, value: cars + "+", label: "Cars on the fleet", note: "Across eleven marques" },
{ ref: r2, value: cust + "+", label: "Customers driven", note: "Since " + window.BIZ.since },
{ ref: r3, value: yrs + " yrs", label: "On the road", note: "Family run, " + window.BIZ.city },
{ value: "24 / 7", label: "Two lines, always open", note: "Owners answer" }
];
return (
{items.map((s) => (
{s.value}
{s.label}
{s.note}
))}
);
}
function FleetPicks({ onOpen, onNavigate }) {
const picks = ["gle", "thar", "crysta", "creta-new", "520d", "sonet", "baleno"].map((id) => window.FLEET.find((c) => c.id === id));
return (
onNavigate("Fleet")}>See all 27} />
{picks.map((c) => )}
);
}
function CategoryExplorer({ onOpen }) {
const [cat, setCat] = React.useState(window.CATEGORIES[0].id);
const active = window.CATEGORIES.find((c) => c.id === cat);
const cars = window.FLEET.filter((c) => c.cat === cat);
return (
{window.CATEGORIES.map((c) => (
))}
{cars.map((c) => )}
);
}
function MarqueGrid({ onNavigate }) {
return (
{window.MARQUES.map((m) => (
))}
);
}
function WhyUs() {
return (
{window.WHY.map((w, i) => (
))}
);
}
function FeaturedCar({ onOpen }) {
const car = window.FLEET.find((c) => c.id === "gle");
return (
Flagship of the fleet
The one you book for the weekend that matters.
Diesel, automatic, five seats and a boot that swallows a wedding's worth of luggage. Delivered to your door in {window.BIZ.city}.
{car.fuel}
{car.gearbox}
{car.seats} seats
Roadside assistance
{window.rupees(car.price)} / day
);
}
function HowItWorks() {
return (
);
}
function Reviews() {
return (
Reviews
Sixty thousand customers, and every word of it public.
We do not write our own testimonials. Read what people who have driven our cars said on Google, then decide.
);
}
function FaqBlock() {
return (
);
}
function ClosingCTA({ onBook }) {
return (
{ window.location.href = "tel:" + window.BIZ.tel1; }} />
);
}
Object.assign(window, { Shell, CarCard, Rail, Heading, StatsBand, FleetPicks, CategoryExplorer, MarqueGrid, WhyUs, FeaturedCar, HowItWorks, Reviews, FaqBlock, ClosingCTA });