<?php
/**
 * Name: Alert
 * Description: Alerts for AUX
 *
 * @var string $content Text content of the alert
 * @var array{
 *    type: string|null,
 *    title: string|null
 *  } $attributes
 */

declare(strict_types=1);

use WP_AUX\Entities\AuxFramework\Partials\AlertEntity;

$alert = AlertEntity::create(
  $attributes['type'] ?? 'info',
  @$attributes['title'],
  $content,
);

echo $alert;
