import React from 'react';

export default function ModeToggle({ value, onChange }) {
  return (
    <div className="screener-mode-toggle" role="tablist" aria-label="화면 모드">
      <button
        type="button"
        role="tab"
        aria-selected={value === 'form'}
        className={value === 'form' ? 'active' : ''}
        onClick={() => onChange('form')}
      >
        폼
      </button>
      <button
        type="button"
        role="tab"
        aria-selected={value === 'canvas'}
        className={value === 'canvas' ? 'active' : ''}
        onClick={() => onChange('canvas')}
      >
        캔버스
      </button>
    </div>
  );
}
