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

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

        <div class="flex flex-wrap items-start w-full -mx-2">
            @foreach($this->viewFields as $key => $field)
                <x-aura::fields.conditions :field="$field" :model="$model" wire:key="post-field-{{ $key }}">
                    <x-dynamic-component :component="$field['field']->component" :field="$field" />
                </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>
