import { Link } from 'react-router'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faArrowRight, faCircleCheck, faCircleExclamation } from '@fortawesome/pro-duotone-svg-icons'; import { cx } from '@/utils/cx'; type SectionStatus = 'complete' | 'incomplete' | 'unknown'; type SectionCardProps = { title: string; description: string; icon: any; iconColor?: string; // Either navigate (href) OR intercept the click (onClick). When onClick // is provided, href is ignored and the card renders as a button. Used // while self-serve setup is disabled — all clicks go through a // "contact product team" modal in settings.tsx. href?: string; onClick?: () => void; status?: SectionStatus; }; // Settings hub card. Each card represents one setup-able section (Branding, // Clinics, Doctors, Team, Telephony, AI, Widget, Rules) and either links to // its dedicated page or triggers a parent-owned callback. export const SectionCard = ({ title, description, icon, iconColor = 'text-brand-primary', href, onClick, status = 'unknown', }: SectionCardProps) => { const className = cx( 'group block w-full text-left rounded-xl border border-secondary bg-primary p-5 shadow-xs transition hover:border-brand hover:shadow-md', ); const body = ( <>

{title}

{description}

{status !== 'unknown' && (
{status === 'complete' ? ( Configured ) : ( Setup needed )}
)} ); if (onClick) { return ( ); } return ( {body} ); };