import React from 'react';

interface SvgTextLogoProps {
  text: string;
  className?: string;
  fontSize?: number;
  letterSpacing?: number;
  dominantBaseline?: 'auto' | 'middle' | 'hanging' | 'central' | 'text-bottom' | 'alphabetic' | 'ideographic' | 'mathematical';
}

const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
  text,
  className = '',
  fontSize = 48,
  letterSpacing = 0,
  dominantBaseline = 'middle',
}) => {
  return (
    <svg
      viewBox={`0 0 ${text.length * fontSize * 0.6} ${fontSize * 1.2}`}
      className={className}
      preserveAspectRatio="xMidYMid meet"
    >
      <text
        x="50%"
        y="50%"
        textAnchor="middle"
        dominantBaseline={dominantBaseline}
        fontSize={fontSize}
        letterSpacing={letterSpacing}
        fontWeight="bold"
        fill="currentColor"
      >
        {text}
      </text>
    </svg>
  );
};

export default SvgTextLogo;