@extends('admin.layouts.container')

@section('content')
<div class="side-title">
    <h3>{{$head ?? '' }}</h3>
</div>

<div class="border-item">
    <form class="form-row" >
        <div class="form-group col-lg-6">
            <label>{{ meta('name', $lang) ?? __('careerApplications.name') }}</label>
            <input readonly class="form-control bg-white" value='{{ $careerApplication->name }}'/>
        </div>
        <div class="form-group col-lg-6">
            <label>{{ meta('career_id', $lang) ?? __('careerApplications.career_id') }}</label>
            <input readonly class="form-control bg-white" value='{{ $careerName }}'/>
        </div>
        <div class="form-group col-lg-6">
            <label>{{ meta('submission_date', $lang) ?? __('careerApplications.submission_date') }}</label>
            <input readonly class="form-control bg-white" value='{{ $careerApplication->submission_date }}'/>
        </div>
        <div class="form-group col-lg-6">
            <label>{{ meta('phone', $lang) ?? __('careerApplications.phone') }}</label>
            <input readonly class="form-control bg-white" value='{{ $careerApplication->phone }}'/>
        </div>
        <div class="form-group col-lg-6">
            <label>{{ meta('birth_date', $lang) ?? __('careerApplications.birth_date') }}</label>
            <input readonly class="form-control bg-white" value='{{ $careerApplication->birth_date }}'/>
        </div>
        <div class="form-group col-lg-6">
            <label>{{ meta('nationality', $lang) ?? __('careerApplications.nationality') }}</label>
            <input readonly class="form-control bg-white" value='{{ $careerApplication->nationality }}'/>
        </div>
        <div class="form-group col-lg-6">
            <label>{{ meta('current_residence', $lang) ?? __('careerApplications.current_residence') }}</label>
            <input readonly class="form-control bg-white" value='{{ $careerApplication->current_residence }}'/>
        </div>
        <div class="form-group col-lg-6">
            <label>{{ meta('education', $lang) ?? __('careerApplications.education') }}</label>
            <input readonly class="form-control bg-white" value='{{ $careerApplication->education }}'/>
        </div>
        <div class="form-group col-lg-6">
            <label>{{ meta('specialization', $lang) ?? __('careerApplications.specialization') }}</label>
            <input readonly class="form-control bg-white" value='{{ $careerApplication->specialization }}'/>
        </div>

        <div class="col-md-12 mb-1">
            <div class="items">
                <div class="img">
                    @if(strpos($careerApplication->cv, '.pdf'))
                        <a href="{{ asset($careerApplication->cv)}}"><img style="object-fit: contain; padding: 50px;" src="{{asset(strpos($careerApplication->cv, '.pdf') ? 'assets/admin/images/file-icon.png' : $careerApplication->cv)}}" alt=""></a>
                    @else
                        <a href="{{ asset($careerApplication->cv)}}" data-fancybox><img src="{{ asset($careerApplication->cv)}}" alt=""></a>
                    @endif
                </div>
            </div>

        </div>
        <div class="col-md-12">
            <a class="btn btn-success" download href="{{asset($careerApplication->cv)}}"><i class="fa fa-download"></i> {{__('careerApplications.download_cv')}}</a>
        </div>

        <div class="text-center mt-5 col-12">
            <a href="{{route('careerApplications.index')}}" class="butn"><span>{{ __('careerApplications.head') }}</span></a>
        </div>
    </form>
</div>

@endsection

@section('inner_js')
    <script>

    </script>

@endsection



