import { Link, InertiaLinkProps } from '@inertiajs/react';

export default function NavLink({ active = false, className = '', children, ...props }: InertiaLinkProps & { active: boolean }) {
    return (
        <Link
            {...props}
            className={
                'btn transition font-semibold text-base leading-6 bg-primary-background border-primary-background shadow-none ' +
                (active
                    ? 'bg-secondary-main text-white border-secondary-main '
                    : 'text-black ') +
                'hover:bg-secondary-hover hover:text-white hover:border-secondary-border ' +
                'active:bg-secondary-pressed active:border-secondary-border ' +
                className
            }
        >
            {children}
        </Link>
    );
}
