<div class="card mb-4">
    <h5 class="card-header">
        {{ __('Rechnungsdaten') }}
        <span class="text-tiny float-right">* {{trans('register.required_fields')}}</span>
    </h5>
    <div class="card-body">
        <div class="form-row">


            <div class="form-group col-md-4">
                <label class="form-label">{{ __('Salutation') }}*</label>
                <select class="selectpicker" data-style="btn-light" name="salutation" id="salutation" required tabindex="10">
                    {!!  HTMLHelper::getSalutation($user->account->salutation) !!}
                </select>
            </div>
            <div class="form-group  col-md-8">
                <label class="form-label" for="title">{{ __('Title') }}</label>
                {{ Form::text('title', $user->account->title,  array('placeholder'=>__('Title'), 'class'=>'form-control', 'id'=>'title', 'tabindex' => 11)) }}

            </div>
        </div>

        <div class="form-row">

            <div class="form-group  col-md-6">
                <label class="form-label" for="first_name">{{ __('First name') }}*</label>
                {{ Form::text('first_name', $user->account->first_name,  array('placeholder'=>__('First name'), 'class'=>'form-control', 'id'=>'first_name', 'required'=>true, 'tabindex' => 12)) }}

            </div>
            <div class="form-group  col-md-6">
                <label class="form-label" for="last_name">{{ __('Last name') }}*</label>
                {{ Form::text('last_name', $user->account->last_name,  array('placeholder'=>__('Last name'), 'class'=>'form-control', 'id'=>'last_name', 'required'=>true, 'tabindex' => 13)) }}

            </div>

        </div>

        <div class="form-group">
            <label class="form-label" for="street">{{ __('Street') }} / {{ __('House number') }}</label>
            {{ Form::text('street', $user->account->street,  array('placeholder'=>__('Street'), 'class'=>'form-control', 'id'=>'street', 'tabindex' => 14)) }}

        </div>

        <div class="form-row">
            <div class="form-group col-md-2">
                <label class="form-label" for="postal_code">{{ __('Postcode') }}</label>
                {{ Form::text('postal_code', $user->account->postal_code,  array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'id'=>'postal_code', 'tabindex' => 15)) }}

            </div>
            <div class="form-group col-md-6">
                <label class="form-label" for="city">{{ __('City') }}</label>
                {{ Form::text('city', $user->account->city,  array('placeholder'=>__('City'), 'class'=>'form-control', 'id'=>'city', 'tabindex' => 16)) }}

            </div>
            <div class="form-group col-md-4  {{ $errors->has('country_id') ? 'has-error' : '' }}">
                <label class="form-label">{{ __('Country') }}*</label>
                <select class="selectpicker" name="country_id" id="country_id"  data-style="btn-light" data-live-search="true" required tabindex="17">
                    {!!  HTMLHelper::getContriesWithMore($user->account->country_id) !!}
                </select>
                @if ($errors->has('country_id'))
                    <span class="help-block">
                            <strong>{{ $errors->first('country_id') }}</strong>
                         </span>
                @endif

            </div>
        </div>

        <div class="form-row">
            <div class="form-group col-md-4">
                <label class="form-label" for="pre_mobil_id">{{ __('Country code') }}</label>
                <select class="selectpicker" name="pre_phone_id" id="pre_phone_id"  data-style="btn-light" data-live-search="true" tabindex="19">
                    {!!  HTMLHelper::getContriesCodes($user->account->pre_phone_id) !!}
                </select>
            </div>

            <div class="form-group col-md-8">
                <label class="form-label" for="phone">{{ __('Phone') }}</label>
                {{ Form::text('phone', $user->account->phone,  array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'phone', 'tabindex' => 18)) }}
            </div>
            @if ($errors->has('phone'))
                <span class="help-block">
                    <strong>{{ $errors->first('phone') }}</strong>
                </span>
            @endif
        </div>


        <div class="form-row">
            <div class="form-group col-md-4">
                <label class="form-label" for="pre_mobil_id">{{ __('Country code') }}</label>
                <select class="selectpicker" name="pre_mobil_id" id="pre_mobil_id"  data-style="btn-light" data-live-search="true" tabindex="19">
                    {!!  HTMLHelper::getContriesCodes($user->account->pre_mobil_id) !!}
                </select>
            </div>

            <div class="form-group col-md-8">
                <label class="form-label" for="mobil">{{ __('Mobile Phone') }}</label>
                {{ Form::text('mobil', $user->account->mobil,  array('placeholder'=>__('Mobile Phone'), 'class'=>'form-control', 'id'=>'mobil', 'tabindex' => 19)) }}
            </div>
            @if ($errors->has('mobil'))
                <span class="help-block">
                    <strong>{{ $errors->first('mobil') }}</strong>
                </span>
            @endif
        </div>

        <div class="form-group col-md-4">
            <label for="birthday" class="form-label">{{ __('Geburtsdatum') }}*</label>
            {{ Form::text('birthday', $user->account->birthday,  array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2, 'required'=>true, 'class'=>'form-control datepicker-birthday')) }}
        </div>

        <hr>
        @if(!isset($step))
        @if($user->email)
            <div class="form-row">
                <div class="form-group col-md-6">
                    <label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
                    {{ Form::text('email', $user->email,  array('placeholder'=>'E-Mail', 'class'=>'form-control', 'id'=>'email', 'readonly'=>true, 'tabindex' => 20)) }}
                </div>
                <div class="form-group col-md-6">
                    <label class="form-label" for="email-confirm">{{ __('Confirm E-Mail') }}</label>
                    {{ Form::text('email-confirm', $user->email,  array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'email-confirm', 'readonly'=>true, 'tabindex' => 21)) }}
                </div>
            </div>
            @if(isset($can_change_mail))
                @if(count($user->user_update_email) > 0)
                    <p class="badge badge-primary" style=" color:#fff;">{{ $user->user_update_email->first()->email }} {{__('waiting for activation since')}} | {{ $user->user_update_email->first()->created_at->format('d.m.Y H:i') }}</p><br>
                @endif
                <a href="{{ route('admin_lead_change_mail', [$user->id]) }}" class="btn btn-default btn-sm"> {{ __('Contact') }} {{__('Change E-Mail')}}</a>
            @else
                <a href="{{ route('user_update_email', [$user->id]) }}" class="btn btn-default btn-sm">{{__('Change E-Mail')}}</a>
            @endif
        @else
            <div class="form-row">
                <div class="form-group col-md-6">
                    <label class="form-label" for="email">{{ __('E-Mail Address') }}*</label>
                    {{ Form::text('email', $user->email,  array('placeholder'=>'E-Mail', 'class'=>'form-control', 'id'=>'email', 'tabindex' => 20)) }}
                </div>
                <div class="form-group col-md-6">
                    <label class="form-label" for="email-confirm">{{ __('Confirm E-Mail') }}</label>
                    {{ Form::text('email-confirm', $user->email,  array('placeholder'=>__('Confirm E-Mail'), 'class'=>'form-control', 'id'=>'email-confirm', 'tabindex' => 21)) }}
                </div>
            </div>

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

<div class="card mb-4">
    <h5 class="card-header">
        {{ __('use') }}
    </h5>
    <div class="card-body">
        <div class="form-group">
            <label class="form-label">{{ __('business or private') }}*</label>
            <select class="selectpicker" name="company" id="company"  data-style="btn-light" data-live-search="false" required tabindex="0">
                {!!  HTMLHelper::getCompanyOptions($user->account->company) !!}
            </select>
            @if ($errors->has('company'))
                <span class="help-block">
                    <strong>{{ $errors->first('company') }}</strong>
                </span>
            @endif
        </div>
    </div>
</div>

<div class="card mb-4 show_company_holder">
    <h5 class="card-header">
        {{ __('Company data') }}
    </h5>
    <div class="card-body">
        <div class="form-group">
            <label for="company_name" class="form-label">{{ __('Company name') }}*</label>
            {{ Form::text('company_name', $user->account->company_name,  array('placeholder'=>__('Company name'), 'class'=>'form-control', 'id'=>'company_name', 'required' => true, 'tabindex' => 1)) }}
        </div>

        <div class="form-group">
            <label class="form-label" for="company_street">{{ __('Street') }} / {{ __('House number') }}</label>
            {{ Form::text('company_street', $user->account->company_street,  array('placeholder'=>__('Street'), 'class'=>'form-control', 'id'=>'company_street', 'tabindex' => 2)) }}

        </div>

        <div class="form-row">
            <div class="form-group col-md-2">
                <label class="form-label" for="company_postal_code">{{ __('Postcode') }}</label>
                {{ Form::text('company_postal_code', $user->account->company_postal_code,  array('placeholder'=>__('Postcode'), 'class'=>'form-control', 'id'=>'company_postal_code', 'tabindex' => 3)) }}

            </div>
            <div class="form-group col-md-6">
                <label class="form-label" for="company_city">{{ __('City') }}</label>
                {{ Form::text('company_city', $user->account->company_city,  array('placeholder'=>__('City'), 'class'=>'form-control', 'id'=>'company_city', 'tabindex' => 4)) }}

            </div>
            <div class="form-group col-md-4 {{ $errors->has('company_country_id') ? 'has-error' : '' }}">
                <label class="form-label">{{ __('Country') }}*</label>
                <select class="selectpicker" name="company_country_id" id="company_country_id"  data-style="btn-light" data-live-search="true" required tabindex="5">
                    {!!  HTMLHelper::getContriesWithMore($user->account->company_country_id) !!}
                </select>
                @if ($errors->has('company_country_id'))
                    <span class="help-block">
                            <strong>{{ $errors->first('company_country_id') }}</strong>
                         </span>
                @endif
            </div>
        </div>

        <div class="form-row">
            <div class="form-group col-md-4">
                <label class="form-label" for="company_pre_phone_id">{{ __('Country code') }}</label>
                <select class="selectpicker" name="company_pre_phone_id" id="company_pre_phone_id"  data-style="btn-light" data-live-search="true" tabindex="19">
                    {!!  HTMLHelper::getContriesCodes($user->account->company_pre_phone_id) !!}
                </select>
            </div>

            <div class="form-group col-md-8">
                <label class="form-label" for="company_phone">{{ __('Phone') }}</label>
                {{ Form::text('company_phone', $user->account->company_phone,  array('placeholder'=>__('Phone'), 'class'=>'form-control', 'id'=>'company_phone', 'tabindex' => 7)) }}
            </div>
        </div>
        <div class="form-group">
            <label class="form-label" for="company_homepage">{{ __('Homepage') }}</label>
            {{ Form::text('company_homepage', $user->account->company_homepage,  array('placeholder'=>__('Homepage'), 'class'=>'form-control', 'id'=>'company_homepage', 'tabindex' => 8)) }}
        </div>

    </div>
</div>

<div class="card mb-4">
    <h5 class="card-header">
        {{ __('weiteres') }}
    </h5>
    <div class="card-body">
        <div class="form-row">
            <div class="form-group col-md-4">
                <label for="birthday" class="form-label">{{ __('Geburtstag') }}</label>
                {{ Form::text('birthday', $user->account->birthday,  array('placeholder'=>Util::formatDate(), 'data-date-format'=>Util::formatDate(), 'data-start_view'=>2,  'class'=>'form-control datepicker-birthday')) }}
            </div>

            <div class="form-group col-md-4">
                <label class="form-label" for="website">{{ __('Webseite') }}</label>
                {{ Form::text('website', $user->account->website,  array('placeholder'=>__('website'), 'class'=>'form-control', 'id'=>'website')) }}

            </div>
            <div class="form-group col-md-4">
                <label class="form-label" for="instagram">{{ __('Instagram') }}</label>
                {{ Form::text('instagram', $user->account->instagram,  array('placeholder'=>__('instagram'), 'class'=>'form-control', 'id'=>'instagram')) }}

            </div>
        </div>

        <div class="form-row">
            <div class="form-group col-md-6">
                <label class="form-label" for="facebook">{{ __('Facebook') }}</label>
                {{ Form::text('facebook', $user->account->facebook,  array('placeholder'=>__('facebook'), 'class'=>'form-control', 'id'=>'facebook')) }}

            </div>
            <div class="form-group col-md-6">
                <label class="form-label" for="facebook_fanpage">{{ __('Facebook Fanpage') }}</label>
                {{ Form::text('facebook_fanpage', $user->account->facebook_fanpage,  array('placeholder'=>__('facebook_fanpage'), 'class'=>'form-control', 'id'=>'facebook_fanpage')) }}

            </div>
        </div>

    </div>
</div>
