@extends('layouts.app_admin')
@section('title', 'Teams')
@push('css')
@endpush

@section('content')

    <!-- Main Content -->
    <div class="main-content">
        <section class="section">
            <div class="col-12 section-header">
                <div class="col-6">
                    <h1> Edit </h1>
                </div>

            </div>
            @if ($errors->any())
                <div class="col-sm-12">
                    <div class="alert  alert-warning alert-dismissible fade show" role="alert">
                        @foreach ($errors->all() as $error)
                            <span>
                                <p>{{ $error }}</p>
                            </span>
                        @endforeach
                        <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                            <span aria-hidden="true">&times;</span>
                        </button>
                    </div>
                </div>
            @endif

            @include('flash-message')

            <div class="section-body row">
                <div class="col-lg-8">
                    <div class="card">



                        <div class="col-12 card-body">

                            <form method="POST" action="{{ route('team.update', $id) }}" id="editForm"
                                enctype="multipart/form-data">
                                {{ method_field('PATCH') }}
                                {{ csrf_field() }}

                                <!-- Bootstrap Tabs -->
                                <ul class="nav nav-tabs" id="languageTabs">
                                    <li class="nav-item">
                                        <a class="nav-link active" id="english-tab-link" data-toggle="tab"
                                            href="#english-tab">English</a>
                                    </li>
                                    
                                </ul>

                                <!-- Tab Content -->
                                <div class="tab-content mt-3">
                                    <!-- English Tab -->
                                    <div class="tab-pane fade show active" id="english-tab">
                                        <div class="form-group">
                                            <label>Name<code></code></label>
                                            <input type="text" name="name" class="form-control form-control-lg"
                                                value="{{ $data->name }}">
                                        </div>

                                        <div class="form-group">
                                            <label>Designation<code></code></label>
                                            <input type="text" name="designation" class="form-control form-control-lg"
                                                value="{{ $data->designation}}">
                                        </div>

                                        <div class="form-group">
                                            <label>Linkedin URL<code></code></label>
                                            <input type="text" name="linkedin_url" class="form-control form-control-lg"
                                                value="{{ $data->linkedin_url }}">
                                        </div>

                                        <div class="form-group">
                                            <label>Facebook URL<code></code></label>
                                            <input type="text" name="facebook_url" class="form-control form-control-lg"
                                                value="{{ $data->facebook_url }}">
                                        </div>


                                    </div>
                                </div>

                                <!-- Image Upload -->
                                <div class="form-group">
                                    <label>Image</label><br>
                                    @if ($data->image != null)
                                        <img src="{{ asset('images/team/' . $data->image) }}" width="400px"
                                            height="200px" alt="user photo" /><br>
                                    @endif
                                    <input type="file" name="image" class="form-control form-control-lg" />
                                </div>


                                <!-- Submit Button -->
                                <div class="card-footer text-right">
                                    <button class="btn btn-primary mr-1" type="submit">Update</button>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>

            </div>
        </section>


        <!-- End -->
    </div>



@endsection

@section('extra-js')

@endsection
