<div class="card mb-2  border-primary">
    <h6 class="card-header  bg-primary text-white py-2" data-toggle="collapse" data-target="#collapseCustomerDetail" aria-expanded="false" aria-controls="collapseCustomerDetail">
        <strong style="line-height: 1.6em">Kunde</strong>
    </h6>
    <div class="collapse" id="collapseCustomerDetail">
        <div class="card-body">
            @if($customer->count())
            <div class="form-row">
                <div class="form-group col-sm-6">
                    <label class="form-label" for="customer_id">{{ __('Kunden ID') }}</label>
                    {{ Form::text('customer_id', $customer->id,  array('placeholder'=>__('Kunden ID'), 'class'=>'form-control', 'id'=>'customer_id', 'readonly')) }}
                </div>
            </div>
            <div class="form-row">
            
                <div class="form-group col-sm-3">
                    <label for="salutation_id" class="form-label">{{ __('Anrede') }}*</label>
                    {{ Form::select('salutation_id', \App\Models\Customer::$salutationType , $customer->salutation_id, array('class'=>'custom-select', 'required'=>true)) }}
                </div>
            
                <div class="form-group col-sm-4">
                    <label class="form-label" for="firstname">{{ __('Vorname') }}*</label>
                    {{ Form::text('firstname', $customer->firstname,  array('placeholder'=>__('Vorname'), 'class'=>'form-control', 'id'=>'firstname', 'required'=>true)) }}
                </div>

                <div class="form-group col-sm-5">
                    <label class="form-label" for="name">{{ __('Nachname') }}*</label>
                    {{ Form::text('name', $customer->name,  array('placeholder'=>__('Nachname'), 'class'=>'form-control', 'id'=>'name', 'required'=>true)) }}
                </div>

                <div class="form-group col-sm-12">
                    <label class="form-label" for="street">{{ __('Straße') }}</label>
                    {{ Form::text('street', $customer->street,  array('placeholder'=>__('Straße'), 'class'=>'form-control', 'id'=>'street')) }}
                </div>

                <div class="form-group col-sm-3">
                    <label class="form-label" for="zip">{{ __('PLZ') }}</label>
                    {{ Form::text('zip', $customer->zip,  array('placeholder'=>__('PLZ'), 'class'=>'form-control', 'id'=>'zip')) }}
                </div>

                <div class="form-group col-sm-4">
                    <label class="form-label" for="city">{{ __('Stadt') }}</label>
                    {{ Form::text('city', $customer->city,  array('placeholder'=>__('Stadt'), 'class'=>'form-control', 'id'=>'city')) }}
                </div>

                <div class="form-group col-sm-5">
                    <label class="form-label" for="country_id">{{ __('Land') }}*</label>
                    {{ Form::select('country_id', \App\Models\Customer::getCustomerCountriesArray() , $customer->country_id, array('class'=>'custom-select', 'required'=>true)) }}
                </div>

                <div class="form-group col-sm-6">
                    <label class="form-label" for="phone">{{ __('Telefon') }}</label>
                    {{ Form::text('phone', $customer->phone,  array('placeholder'=>__('Telefon'), 'class'=>'form-control', 'id'=>'phone')) }}
                </div>

                <div class="form-group col-sm-6">
                    <label class="form-label" for="phonemobile">{{ __('Telefon Mobil') }}</label>
                    {{ Form::text('phonemobile', $customer->phonemobile,  array('placeholder'=>__('Telefon Mobil'), 'class'=>'form-control', 'id'=>'phonemobile')) }}
                </div>

                <div class="form-group col-sm-12">
                    <label class="form-label" for="email">{{ __('E-Mail') }}*</label>
                    {{ Form::text('email', $customer->email,  array('placeholder'=>__('E-Mail'), 'class'=>'form-control', 'id'=>'email', 'required'=>true)) }}
                </div>

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

            </div>
            @endif
        </div>
    </div>
</div>