import React from 'react';
import { NavLink } from 'react-router-dom';
import { BrandMark, BrandWordmark } from '@/components/brand/Brand';
import { BRAND } from '@/lib/brand';

export const BrandBlock = React.memo(function BrandBlock({ adminMode = false }: { adminMode?: boolean }) {
  return (
    <NavLink
      to={adminMode ? '/admin' : '/'}
      aria-label={BRAND.name}
      className="group flex items-center gap-2 rounded-xl focus-visible:outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50"
    >
      <BrandMark className="h-12 w-auto max-w-[6.75rem] drop-shadow-[0_1px_2px_rgba(0,0,0,0.24)] transition-transform duration-200 group-hover:scale-[1.015]" />
      <BrandWordmark className="sr-only" />
      {adminMode && (
        <span className="hidden sm:inline-flex rounded-full border border-destructive/25 bg-destructive/10 px-2 py-0.5 text-[10px] font-semibold uppercase text-destructive">
          Admin
        </span>
      )}
    </NavLink>
  );
});

BrandBlock.displayName = 'BrandBlock';
