import Link from 'next/link'; interface WhyChooseUsProps { data: { heading: string; highlightWord?: string; subheading: string; description: string; mainImage?: string; secondaryImage?: string; items: { icon: string; title: string; description: string; }[]; features: string[]; ctaButton: { label: string; href: string; }; }; } const WhyChooseUs = ({ data }: WhyChooseUsProps) => { const highlight = data.highlightWord?.trim(); let headingContent: React.ReactNode = data.heading; if (highlight) { const index = data.heading.indexOf(highlight); if (index !== -1) { const before = data.heading.slice(0, index); const after = data.heading.slice(index + highlight.length); headingContent = ( <> {before} {highlight} {after} ); } } return (
img
img
img
img
img
img
{data.subheading}

{headingContent}

{data.description}

{data.items.map((item, index) => (
{item.title}-

{item.description}

))}
    {data.features.map((feature, index) => (
  • {feature}
  • ))}
{data.ctaButton.label}
); }; export default WhyChooseUs;