'use server';

import Link from 'next/link';
import { Button, type buttonVariants } from '@/components/ui';
import { type ComponentProps } from 'react';
import { type VariantProps } from 'class-variance-authority';

type SignInSignUpProps = {
	className?: ComponentProps<'div'>['className'];
	signInSize?: VariantProps<typeof buttonVariants>['size'];
	signUpSize?: VariantProps<typeof buttonVariants>['size'];
	signInVariant?: VariantProps<typeof buttonVariants>['variant'];
	signUpVariant?: VariantProps<typeof buttonVariants>['variant'];
};

export const SignInSignUp = async ({
	className = 'flex gap-2',
	signInSize = 'default',
	signUpSize = 'sm',
	signInVariant = 'outline',
	signUpVariant = 'default',
}: SignInSignUpProps) => {
	return (
		<div className={className}>
			<Button asChild size={signInSize} variant={signInVariant}>
				<Link href='/sign-in'>Sign In</Link>
			</Button>
			<Button asChild size={signUpSize} variant={signUpVariant}>
				<Link href='/sign-up'>Sign Up</Link>
			</Button>
		</div>
	);
};
