// Shared components for BRA Tours
const ArrowI = ({ size = 14 }) => (
);
const PlusI = ({ size = 14 }) => (
);
const MinusI = ({ size = 14 }) => (
);
const Img = ({ src, alt, label, ratio, style, children }) => {
const wrap = ratio
? { aspectRatio: ratio, width: '100%', ...style }
: { ...style };
return (
{src ?

: (
{label || 'imagem'}
)}
{children}
);
};
const Logo = ({ onClick, variant = 'gold' }) => (
BRA
Tours
);
// Language switcher pill
const LangSwitch = () => {
const { lang, setLang } = useLang();
const opts = [['pt', 'PT'], ['en', 'EN'], ['es', 'ES']];
return (
{opts.map(([v, l]) => (
))}
);
};
// Top nav
const Nav = ({ page, go }) => {
const { t } = useLang();
const links = [
{ id: 'home', label: t.nav.home },
{ id: 'tours', label: t.nav.tours },
{ id: 'precos', label: t.nav.prices },
{ id: 'ingressos', label: t.nav.tickets },
{ id: 'sobre', label: t.nav.about },
{ id: 'contato', label: t.nav.contact },
];
return (
);
};
// Footer
const Footer = ({ go }) => {
const { t } = useLang();
return (
);
};
const FooterCol = ({ title, items }) => (
{title}
{items.map((i, idx) => (
- {i.label}
))}
);
// Tour card — tall portrait card
const TourCard = ({ tour, onOpen, layout = 'tall' }) => {
const { lang, t: tt } = useLang();
const tour_ = localizedTour(tour, lang);
if (layout === 'wide') {
return (
onOpen(tour.id)} style={{ cursor: 'pointer' }}>
{tour_.region} · {tour_.duration}
{tour_.name}
{tour_.summary}
);
}
return (
onOpen(tour.id)} style={{ cursor: 'pointer' }}>
{tour_.region} · {tour_.duration}
{tour_.name}
{tour_.summary}
{tour.price > 0
? {tt.common.fromShort} US$ {tour.price}
: {tt.common.consultPrice}}
{tour_.difficulty}
);
};
const Stat = ({ label, value }) => (
);
// Marquee strip
const Marquee = ({ items }) => {
const dup = [...items, ...items];
return (
{dup.map((it, i) => (
{it}
))}
);
};
// Section heading
const SectionHead = ({ eyebrow, title, action }) => (
{eyebrow &&
{eyebrow}
}
{title}
{action}
);
// Price table block
const PriceTable = ({ table }) => (
{table.title}
{table.note && {table.note}}
{table.cols.map((c, i) => | {c} | )}
{table.rows.map((row, i) => (
{row.map((c, j) => | {c} | )}
))}
);
Object.assign(window, {
ArrowI, PlusI, MinusI, Img, Logo, LangSwitch, Nav, Footer, FooterCol,
TourCard, Stat, Marquee, SectionHead, PriceTable,
});