'use client';

import Link from 'next/link';

import { DropdownMenuItem } from '@kit/ui/dropdown-menu';
import { Trans } from '@kit/ui/trans';

export default function DropdownLink(
  props: React.PropsWithChildren<{
    path: string;
    label: string;
    labelOptions?: Record<string, any>;
    Icon?: React.ReactNode;
  }>,
) {
  return (
    <DropdownMenuItem asChild key={props.path}>
      <Link
        href={props.path}
        className={'flex h-12 w-full items-center space-x-4'}
      >
        {props.Icon}

        <span>
          <Trans
            i18nKey={props.label}
            defaults={props.label}
            values={props.labelOptions}
          />
        </span>
      </Link>
    </DropdownMenuItem>
  );
}
