> $asideActions */ use MintyPHP\Session; $asideActions = is_array($asideActions ?? null) ? $asideActions : []; if (!$asideActions) { return; } $appendCssClass = static function (string $baseClass, string $appendClass): string { $combined = trim($baseClass . ' ' . $appendClass); return preg_replace('/\s+/', ' ', $combined) ?? $combined; }; $resolveToneClass = static function (string $tone, string $detailActionKind, string $name, string $value): string { $normalizedTone = strtolower(trim($tone)); if ($normalizedTone === 'success') { return 'app-action-success'; } if ($normalizedTone === 'danger') { return 'app-action-danger'; } if ($normalizedTone === 'neutral') { return ''; } $normalizedActionKind = strtolower(trim($detailActionKind)); if (in_array($normalizedActionKind, ['delete', 'danger', 'purge', 'revoke'], true)) { return 'app-action-danger'; } if (in_array($normalizedActionKind, ['save', 'save-close', 'create', 'create-close'], true)) { return 'app-action-success'; } $normalizedName = strtolower(trim($name)); $normalizedValue = strtolower(trim($value)); if ( $normalizedName === 'action' && in_array($normalizedValue, ['create', 'create_close', 'save', 'save_close'], true) ) { return 'app-action-success'; } return ''; }; ?>