<?php

$actions ??= [];

?>

@foreach($actions as $action=>$property)
    @php
    $type = $property?->type ?? '';
    @endphp
    @switch($type)
        @case("custom")
            <x-component name="{{ $property->component }}" :params="['app' => $app]"/>
        @break
        @default
            @if($property->show ?? false)
                <x-component name="Buttons.HeadActionButton" :params="[
                    'app' => $app,
                    'actionProps' => $property ?? null,
                    'label' => $property->label,
                    'btn' => $property->btn ?? null,
                ]"/>
            @endif
        @break
    @endswitch

@endforeach
