@props(['submit'])

<div {{ $attributes->merge(['class' => '']) }}>
    <div class="mt-5 px-6">
        <h2>{{ $title }}</h2>
    </div>

    <div class="mt-5 md:mt-0 md:col-span-1">
        <form wire:submit="{{ $submit }}" >
            <div class="px-4 py-5 bg-white sm:p-6 shadow {{ isset($actions) ? 'sm:rounded-tl-md sm:rounded-tr-md' : 'sm:rounded-md' }}">
                <div class="flex flex-col">
                    {{ $form }}
                </div>
                <span name="description">{{ $description }}</span>
            </div>

            @if (isset($actions))
                <div class="flex items-center justify-end px-4 py-3 bg-gray-50 text-right sm:px-6 shadow sm:rounded-bl-md sm:rounded-br-md">
                    {{ $actions }}
                </div>
            @endif

        </form>
    </div>
</div>
