<?php

/**
 * @var string $infoTileLabel
 * @var string $infoTileValue
 * @var string $infoTileTone
 */

$infoTileLabel = trim((string) ($infoTileLabel ?? ''));
$infoTileValue = trim((string) ($infoTileValue ?? ''));
$infoTileTone = strtolower(trim((string) ($infoTileTone ?? 'neutral')));
if (!in_array($infoTileTone, ['neutral', 'info', 'success', 'warning'], true)) {
    $infoTileTone = 'neutral';
}

?>
<article class="app-form-info-tile app-form-info-tile--<?php e($infoTileTone); ?>">
  <?php if ($infoTileLabel !== ''): ?>
    <small class="app-form-info-tile-label"><?php e($infoTileLabel); ?></small>
  <?php endif; ?>
  <?php if ($infoTileValue !== ''): ?>
    <strong class="app-form-info-tile-value"><?php e($infoTileValue); ?></strong>
  <?php endif; ?>
</article>
