import React from 'react';

interface SvgTextLogoProps {
  text: string;
  className?: string;
  fontSize?: number;
  fontWeight?: number | string;
  letterSpacing?: number;
  textAnchor?: 'start' | 'middle' | 'end';
  dominantBaseline?: 'auto' | 'baseline' | 'middle' | 'hanging';
}

const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
  text,
  className = '',
  fontSize = 48,
  fontWeight = 'bold',
  letterSpacing = 2,
  textAnchor = 'middle',
  dominantBaseline = 'middle',
}) => {
  return (
    <svg
      viewBox="0 0 400 100"
      className={className}
      xmlns="http://www.w3.org/2000/svg"
      aria-label={text}
    >
      <defs>
        <style>{`
          .logo-text {
            font-family: 'Arial', sans-serif;
            font-size: ${fontSize}px;
            font-weight: ${fontWeight};
            letter-spacing: ${letterSpacing}px;
            fill: currentColor;
          }
        `}</style>
      </defs>
      <text
        x="50%"
        y="50%"
        textAnchor={textAnchor}
        dominantBaseline={dominantBaseline}
        className="logo-text"
      >
        {text}
      </text>
    </svg>
  );
};

export default SvgTextLogo;
