<div class="card mb-2  border-primary">
    <h6 class="card-header  bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseLeadDetail" aria-expanded="false" aria-controls="collapseLeadDetail">
        <strong style="line-height: 1.6em">Anfrage</strong>
    </h6>
    <div class="collapse" id="collapseLeadDetail">
        <div class="card-body row">
            @if($lead->count())

                <div class="form-group col-sm-6 col-md-4">
                    <label class="form-label" for="lead_id">{{ __('Anfrage ID') }}</label>
                    <div class="input-group">
                        <div class="input-group-prepend">
                            <span class="input-group-text">
                            <a class="text-primary" href="{{route('lead_detail', [$lead->id])}}"><i class="fa fa-edit"></i></a></span>
                        </div>
                        {{ Form::text('lead[id]', $lead->id,  array('placeholder'=>__('Anfrage ID'), 'class'=>'form-control', 'id'=>'lead_id', 'readonly')) }}
                    </div>
                </div>
                <div class="form-group col-sm-6 col-md-4">
                    <label for="sf_guard_user_id" class="form-label">{{ __('Sachbearbeiter') }}*</label>
                    {{ Form::select('sf_guard_user_id', \App\Services\Model::getSfGuardUserArray() , $lead->sf_guard_user_id, array('class'=>'custom-select', 'required'=>true)) }}
                </div>
                <div class="form-group col-sm-6 col-md-4">
                    <label class="form-label" for="request_date">{{ __('Anfragedatum') }}*</label>
                    {{ Form::text('request_date', _format_date($lead->request_date),  array('placeholder'=>__('Anfragedatum'), 'class'=>'form-control datepicker-base', 'id'=>'request_date', 'required'=>true)) }}
                </div>

                <div class="form-group col-sm-6 col-md-4">
                    <label class="form-label" for="travelperiod_start">{{ __('Reisezeitraum vom') }}</label>
                    {{ Form::text('travelperiod_start', _format_date($lead->travelperiod_start),  array('placeholder'=>__('Reisezeitraum vom'), 'class'=>'form-control  datepicker-base', 'id'=>'travelperiod_start')) }}
                </div>
                <div class="form-group col-sm-6 col-md-4">
                    <label class="form-label" for="travelperiod_end">{{ __('Reisezeitraum bis') }}</label>
                    {{ Form::text('travelperiod_end', _format_date($lead->travelperiod_end),  array('placeholder'=>__('Reisezeitraum bis'), 'class'=>'form-control  datepicker-base', 'id'=>'travelperiod_end')) }}
                </div>

                <div class="form-group col-sm-6 col-md-2">
                    <label class="form-label" for="travelperiod_length">{{ __('Reisedauer (Tage)') }}</label>
                    {{ Form::text('travelperiod_length', $lead->travelperiod_length,  array('placeholder'=>__('Reisedauer (Tage)'), 'class'=>'form-control', 'id'=>'travelperiod_length')) }}
                </div>
                <div class="form-group col-sm-6  col-md-2">
                    <label class="form-label" for="pax">{{ __('Pax bis') }}</label>
                    {{ Form::text('pax', $lead->pax,  array('placeholder'=>__('Pax'), 'class'=>'form-control', 'id'=>'pax')) }}
                </div>

                <div class="form-group col-sm-6 col-md-4">
                    <label for="travelcountry_id" class="form-label">{{ __('Reiseland') }}*</label>
                    {{ Form::select('travelcountry_id', \App\Services\Model::getTravelCountryArray(true) , $lead->travelcountry_id, array('class'=>'custom-select')) }}
                </div>

                <div class="form-group col-sm-6 col-md-4">
                    <label class="form-label" for="travelagenda_id">{{ __('Reiseprogramm') }}</label>
                    {{ Form::select('travelagenda_id', \App\Services\Model::getTravelAgendaArray(true) , $lead->travelagenda_id, array('class'=>'custom-select')) }}
                </div>

                <div class="form-group col-sm-6 col-md-4">
                    <label class="form-label" for="travelcategory_id">{{ __('Reiseart') }}</label>
                    {{ Form::select('travelcategory_id', \App\Services\Model::getTravelCategoryArray(true) , $lead->travelcategory_id, array('class'=>'custom-select')) }}
                </div>

                <div class="col-sm-12">
                    <hr>
                </div>
                
                <div class="form-group col-sm-12">
                    <label for="remarks" class="form-label">{{ __('Anfrage') }}</label>
                    {{ Form::textarea('remarks', $lead->remarks,  array('placeholder'=>__('Anfrage'), 'class'=>'form-control autoExpand', 'id'=>'remarks', 'rows'=>'1', 'data-min-rows'=>'1')) }}
                </div>

                <div class="col-sm-12">
                    <div class="text-left mt-2">
                        <button type="submit" name="action" value="saveLead" class="btn btn-sm btn-secondary">Änderungen speichern</button>&nbsp;
                        <a href="{{route('leads')}}" class="btn btn-sm  btn-default">{{ __('zur Übersicht') }}</a>
                    </div>
                </div>
            @endif
        </div>
    </div>
</div>