<div class="w-full">
        {{-- @dump($this->viewFields) --}}

    @if (!$this->hide_form)
    <div class="flex flex-wrap -mx-2 min-w-full focus:outline-none">

        <div class="flex flex-wrap items-start -mx-2 w-full">
            @foreach($this->viewFields as $key => $field)
                <x-aura::fields.conditions :field="$field" :model="$model" wire:key="resource-field-{{ $key }}">
                    <x-dynamic-component :component="$field['field']->view()" :field="$field" :form="$form" mode="view" />
                </x-aura::fields.conditions>
            @endforeach
        </div>

    </div>

    <div class="mt-4">
        <div wire:loading wire:target="submit" class="opacity-50 cursor-not-allowed pointer-events-none">

            <x-aura::button.primary disabled>
                Loading...
            </x-aura::button.primary>
        </div>
        <div wire:loading.remove wire:target="submit">
            <x-aura::button.primary wire:click.prevent="submit">
                Absenden
            </x-aura::button.primary>
        </div>
    </div>
    @endif
</div>
