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

export default function NavLink({ active = false, className = '', children, ...props }: InertiaLinkProps & { active: boolean }) {
    return (
        <Link
            {...props}
            className={
                'btn m-0 bg-primary-background border-primary-background hover:bg-secondary-hover active:bg-secondary-pressed hover:bg-secondary-hover shadow-none ' +
                (active
                    ? 'bg-secondary-main border-secondary-main '
                    : ' ') +
                className
            }
        >
            {children}
        </Link>
    );
}
