@extends('layouts.app')

@section('title', __('medregistry::lang.setup_wizard'))

@section('content')
<section class="content-header">
    <h1>@lang('medregistry::lang.setup_wizard')
        <small>@lang('medregistry::lang.wizard_step1_title')</small>
    </h1>
</section>

<section class="content">
    @if($setup)
        <div class="alert alert-info">
            @lang('medregistry::lang.wizard_already_completed', [
                'type' => $setup->business_type_key,
                'date' => optional($setup->wizard_completed_at)->format('Y-m-d'),
            ])
        </div>
    @endif

    @component('components.widget', ['class' => 'box-primary', 'title' => __('medregistry::lang.wizard_step1_question')])
        <div class="row">
            @foreach($types as $type)
                <div class="col-md-3 col-sm-4 col-xs-6" style="margin-bottom:15px;">
                    <form method="post" action="{{ route('medreg.wizard.choose-type') }}">
                        @csrf
                        <input type="hidden" name="type_key" value="{{ $type->type_key }}">
                        <button type="submit" class="btn btn-default btn-block"
                                style="white-space:normal; min-height:110px; padding:15px 10px;">
                            <strong>{{ $type->label }}</strong>
                            <br>
                            <small class="text-muted">{{ \Illuminate\Support\Str::limit($type->description, 80) }}</small>
                        </button>
                    </form>
                </div>
            @endforeach
        </div>
        <p class="help-block">@lang('medregistry::lang.wizard_custom_hint')</p>
    @endcomponent
</section>
@endsection
