<?php
declare(strict_types=1);

namespace WP_AUX\Entities\AuxFramework\Partials;

class PrimaryAltButtonGroupEntity extends ButtonGroupEntity
{
  public static ?string $mode = 'primary';

  public function addButton(array $link): ButtonEntity
  {
    if (empty($this->buttons)) {
      $button = CtaPrimaryButtonEntity::create($link, $this);
      $button->setUseIcon(false);
    } else {
      $button = CtaAltButtonEntity::create($link, $this);
    }

    $this->buttons[] = $button;

    return $button;
  }
}
