class ClaudeKeyboard {
  constructor(onSendText, onSendKey) {
    this.onSendText = onSendText;
    this.onSendKey = onSendKey;
    this._active = false;
    this._actionBar = null;
  }

  activate() {
    if (this._active) return;
    this._active = true;
  }

  deactivate() {
    if (!this._active) return;
    this._active = false;
  }

  _makeBtn(extraClass, icon, label, onClick) {
    const btn = document.createElement('button');
    btn.className = `cc-action-btn ${extraClass}`;

    const iconEl = document.createElement('span');
    iconEl.className = 'cc-action-icon';
    iconEl.textContent = icon;

    const labelEl = document.createElement('span');
    labelEl.className = 'cc-action-label';
    labelEl.textContent = label;

    btn.appendChild(iconEl);
    btn.appendChild(labelEl);
    btn.addEventListener('click', () => {
      if (navigator.vibrate) navigator.vibrate(8);
      onClick();
    });

    return btn;
  }

}

window.ClaudeKeyboard = ClaudeKeyboard;
