import { COMPANY } from "@/lib/store";

export function BrandLogo({
  size = 48,
  showText = true,
  invert = false,
}: {
  size?: number;
  showText?: boolean;
  invert?: boolean;
}) {
  return (
    <div className="flex items-center gap-3">
      <img
        src={COMPANY.logo}
        alt="Nembo ya WAMAKINDA MICROFINANCE LTD"
        width={size}
        height={size}
        loading="lazy"
        className="rounded-xl object-contain"
        style={{ width: size, height: size }}
      />
      {showText && (
        <div className="leading-tight">
          <p
            className={`text-sm font-extrabold tracking-tight sm:text-base ${
              invert ? "text-sidebar-foreground" : "text-foreground"
            }`}
          >
            WAMAKINDA <span className="text-primary">MICROFINANCE</span> LTD
          </p>
          <p className="text-[10px] font-semibold tracking-[0.32em] text-muted-foreground">
            {COMPANY.tagline}
          </p>
        </div>
      )}
    </div>
  );
}

export function PoweredBy({ className = "" }: { className?: string }) {
  return (
    <a
      href={COMPANY.poweredByUrl}
      target="_blank"
      rel="noopener noreferrer"
      className={`text-xs font-semibold text-info hover:underline ${className}`}
    >
      by Selvix Technology
    </a>
  );
}
