
<div class="card">
    <div class="card-body">
        <a class="btn btn-success" href="{{ route('formBuilder') }}" wire:navigate>{{__('Create')}}</a>
        <table class="table">
            <thead>
                <th>{{__('Name')}}</th>
                <th>{{__('Action')}}</th>
            </thead>
            <tbody>
                @foreach ($forms as $form)
                    <tr>
                        <td>{{ $form->name }}</td>
                        <td>
                            <a href="{{ route('formBuilder', $form->id) }}" class="btn btn-primary"  wire:navigate>{{__('Edit')}}</a>
                            <a href="{{ route('openForm', ['id' => $form->id, 'from' => 'form-builder']) }}" class="btn btn-primary" wire:navigate>{{__('Open')}}</a>
                            <button type="submit" class="btn btn-danger" wire:click="delete({{$form->id}})" 
                                wire:confirm.prompt='Deleting this table might delete all data from it?\n\nType "delete" to confirm|delete'>
                                {{__('Delete')}}
                            </button>
                        </td>
                    </tr>
                @endforeach
            </tbody>
        </table>
    </div>
</div>
