import styles from './DirectionSwapButton.module.css'

interface Props {
  onClick: () => void
  compact?: boolean
}

export function DirectionSwapButton({ onClick, compact }: Props) {
  return (
    <div className={compact ? `${styles.swapWrap} ${styles.compact}` : styles.swapWrap}>
      <button
        type="button"
        className={styles.swapBtn}
        onClick={onClick}
        aria-label="Поменять направление"
      >
        <svg width={16} height={16} viewBox="0 0 16 16" fill="none">
          <path
            d="M8 2v12M4 10l4 4 4-4"
            stroke="currentColor"
            strokeWidth={1.5}
            strokeLinecap="round"
            strokeLinejoin="round"
          />
        </svg>
      </button>
    </div>
  )
}
