/* global React */
(function () {
  const T = window.SC_T;

  function Spinner({ size = 16, color }) {
    const c = color || T.accent;
    return (
      <svg width={size} height={size} viewBox="0 0 24 24"
           style={{ animation: 'sc-spin 0.9s linear infinite' }}>
        <circle cx="12" cy="12" r="9" stroke={c} strokeWidth="2.5" fill="none" opacity="0.2" />
        <path d="M 12 3 A 9 9 0 0 1 21 12" stroke={c} strokeWidth="2.5" fill="none" strokeLinecap="round" />
      </svg>
    );
  }

  window.Spinner = Spinner;
})();
