<?php
declare(strict_types=1);

namespace WP_AUX\Entities\AuxFramework\Partials;

class CtaHeaderButtonGroupEntity extends ButtonGroupEntity
{
  public static ?string $mode = 'cta';

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

    $this->buttons[] = $button;

    return $button;
  }
}
