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; disabled?: boolean; }; // 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', disabled = false, }: SectionCardProps) => { const className = cx( 'group block w-full text-left rounded-xl border border-secondary p-5 shadow-xs transition', disabled ? 'cursor-not-allowed opacity-50 bg-disabled_subtle' : 'bg-primary hover:border-brand hover:shadow-md', ); const body = ( <>
{description}