<table>
    <thead>
    <tr>
        @if($user->disabledColumn('title','contact_lists'))
            <th scope="col">{{ __('contact_lists.title') }}</th>
        @endif
        @if($user->disabledColumn('address','contact_lists'))
            <th scope="col">{{ __('contact_lists.address') }}</th>
        @endif
        @if($user->disabledColumn('email','contact_lists'))
            <th scope="col">{{ __('contact_lists.email') }}</th>
        @endif
        @if($user->disabledColumn('is_top_customer','contact_lists'))
            <th scope="col">{{ __('contact_lists.is_top_customer') }}</th>
        @endif
        @if($user->disabledColumn('decision_maker_status','contact_lists'))
            <th scope="col">{{ __('contact_lists.decision_maker_status') }}</th>
        @endif
        @if($user->disabledColumn('status','contact_lists'))
            <th scope="col">{{ __('contact_lists.status') }}</th>
        @endif
        @if($user->disabledColumn('employee_id','contact_lists'))
            <th scope="col">{{ __('contact_lists.employee_id') }}</th>
        @endif
        @if($user->disabledColumn('country_id','contact_lists'))
            <th scope="col">{{ __('contact_lists.country_id') }}</th>
        @endif
        @if($user->disabledColumn('company_id','contact_lists'))
            <th scope="col">{{ __('contact_lists.company_id') }}</th>
        @endif
        @if($user->disabledColumn('budget','contact_lists'))
            <th scope="col">{{ __('contact_lists.budget') }}</th>
        @endif
        @if($user->disabledColumn('avg_stand_annual','contact_lists'))
            <th scope="col">{{ __('contact_lists.avg_stand_annual') }}</th>
        @endif
        @if($user->disabledColumn('avg_events_annual','contact_lists'))
            <th scope="col">{{ __('contact_lists.addressavg_events_annual') }}</th>
        @endif
        @if($user->disabledColumn('company_website','contact_lists'))
            <th scope="col">{{ __('contact_lists.company_website') }}</th>
        @endif
        @if($user->disabledColumn('role','contact_lists'))
            <th scope="col">{{ __('contact_lists.role') }}</th>
        @endif
        @if($user->disabledColumn('note','contact_lists'))
            <th scope="col">{{ __('contact_lists.note') }}</th>
        @endif
        @if($user->disabledColumn('created_at','contact_lists'))
            <th scope="col" >{{ __('dashboard.created_at') }}</th>
        @endif
    </tr>
    </thead>
    <tbody class="response">
    @foreach($contact_lists as $key=> $row)
        <tr>
            @if($user->disabledColumn('title','contact_lists'))
                <td>{{ $row->title }}</td>
            @endif
            @if($user->disabledColumn('address','contact_lists'))
                <td>{{ $row->address }}</td>
            @endif
            @if($user->disabledColumn('email','contact_lists'))
                <td>{{ $row->email }}</td>
            @endif
            @if($user->disabledColumn('is_top_customer','contact_lists'))
                <td> <i class="{{ $row->is_top_customer ? 'fas fa-star' : 'fal fa-star' }}"></i>  </td>
            @endif
            @if($user->disabledColumn('address','contact_lists'))
                <td>{{ $row->address }}</td>
            @endif
            @if($user->disabledColumn('decision_maker_status','contact_lists'))
                <td> {{ !is_null($row->decision_maker_status) ? __('contact_lists.decision_maker_statuses.'.$row->decision_maker_status) : '' }} </td>
            @endif
            @if($user->disabledColumn('status','contact_lists'))
                <td>  {{ __('contact_lists.statuses.'.$row->status) }} </td>
            @endif
            @if($user->disabledColumn('employee_id','contact_lists'))
                <td>{{ $row->employee->name ?? '' }}</td>
            @endif
            @if($user->disabledColumn('country_id','contact_lists'))
                <td>{{ $row->country->currentDescription->title ?? '' }}</td>
            @endif
            @if($user->disabledColumn('company_id','contact_lists'))
                <td>{{ $row->company->currentDescription->title ?? '' }}</td>
            @endif
            @if($user->disabledColumn('budget','contact_lists'))
                <td>{{ $row->budget }}</td>
            @endif
            @if($user->disabledColumn('avg_stand_annual','contact_lists'))
                <td>{{ $row->avg_stand_annual }}</td>
            @endif
            @if($user->disabledColumn('avg_events_annual','contact_lists'))
                <td>{{ $row->avg_events_annual }}</td>
            @endif
            @if($user->disabledColumn('company_website','contact_lists'))
                <td>{{ $row->company_website }}</td>
            @endif
            @if($user->disabledColumn('role','contact_lists'))
                <td>{{ $row->role }}</td>
            @endif
            @if($user->disabledColumn('note','contact_lists'))
                <td>{{ $row->note }}</td>
            @endif
            @if($user->disabledColumn('created_at','contact_lists'))
                <td>{{ \Carbon\Carbon::parse($row->created_at)->format('Y/m/d') }}</td>
            @endif
        </tr>
    @endforeach

    </tbody>
</table>
