import React from 'react';

interface SvgTextLogoProps {
  text: string;
  className?: string;
  fontSize?: number;
  fontFamily?: string;
  fontWeight?: number | string;
  letterSpacing?: number;
  fill?: string;
  dominantBaseline?: 'auto' | 'hanging' | 'central' | 'middle' | 'ideographic' | 'mathematical' | 'alphabetic' | 'text-before-edge' | 'text-after-edge' | 'use-script' | 'no-change' | 'reset-size' | 'inherit';
}

const SvgTextLogo: React.FC<SvgTextLogoProps> = ({
  text,
  className = '',
  fontSize = 32,
  fontFamily = 'system-ui, -apple-system, sans-serif',
  fontWeight = 'bold',
  letterSpacing = 0,
  fill = 'currentColor',
  dominantBaseline = 'central',
}) => {
  return (
    <svg
      className={className}
      viewBox={`0 0 ${text.length * fontSize * 0.6} ${fontSize * 1.5}`}
      xmlns="http://www.w3.org/2000/svg"
    >
      <text
        x="50%"
        y="50%"
        textAnchor="middle"
        dominantBaseline={dominantBaseline}
        fontSize={fontSize}
        fontFamily={fontFamily}
        fontWeight={fontWeight}
        letterSpacing={letterSpacing}
        fill={fill}
      >
        {text}
      </text>
    </svg>
  );
};

export default SvgTextLogo;