@extends('layouts.master', ['title' => 'Add Dealer - Dealer - Pages'])

@section('workspace')

    <!-- Breadcrumb -->
    <section class="breadcrumb">
        <h1>Company Profile</h1>
        <ul>
            <li><a href="#no-link">Pages</a></li>
            <li class="divider la la-arrow-right"></li>
            <li><a href="#no-link">Company Profile</a></li>
            <li class="divider la la-arrow-right"></li>
            <li>View</li>
        </ul>
    </section>

    <div class="grid lg:grid-cols-4 gap-5">

        <!-- Content -->
        <div class="lg:col-span-2 xl:col-span-3">

            <form method="POST" action="{{route('paid-accounts.company-profile.update')}}">
                @csrf
                @method('PUT')
                <div class="card p-5">

                    {{--Company Name--}}
                    <div class="mb-5 xl:w-1/2">
                        <label class="label block mb-2" for="company_name">Company Name</label>
                        <input id="company_name" name="company_name" type="text" class="form-control"
                               value="{{$companyProfile->company_name}}" disabled>
                    </div>

                    {{--Contact Person--}}
                    <div class="mb-5 xl:w-1/2">
                        <label class="label block mb-2" for="contact_name">Contact Person Name</label>
                        <input id="contact_name" name="contact_name" type="text" class="form-control"
                               value="{{$companyProfile->contact_name}}" required>
                    </div>

                    {{--Contact Number--}}
                    <div class="mb-5 xl:w-1/2">
                        <label class="label block mb-2" for="contact_number">Contact Number</label>
                        <input id="contact_number" placeholder="60123456789" name="contact_number"
                               value="{{$companyProfile->contact_number}}" type="tel"
                               class="form-control" required>
                    </div>

                    {{--Company Email--}}
                    <div class="mb-5 xl:w-1/2">
                        <label class="label block mb-2" for="email">Company Email address</label>
                        <input id="email" name="email" placeholder="xxx@xxx.com" type="email"
                               value="{{$companyProfile->email}}" class="form-control" required>
                    </div>

                    {{--ROC--}}
                    <div class="mb-5 xl:w-1/2">
                        <label class="label block mb-2" for="roc">ROC</label>
                        <input id="roc" name="roc" type="text" class="form-control" value="{{$companyProfile->roc}}"
                               required>
                    </div>

                    {{--Address1--}}
                    <div class="mb-5 xl:w-1/2">
                        <label class="label block mb-2" for="address_1">Address 1</label>
                        <input id="address_1" name="address_1" type="text" class="form-control"
                               value="{{$companyProfile->address1}}" required>
                    </div>

                    {{--Address2--}}
                    <div class="mb-5 xl:w-1/2">
                        <label class="label block mb-2" for="address_2">Address 2</label>
                        <input id="address_2" name="address_2" type="text" value="{{$companyProfile->address2}}"
                               class="form-control">
                        <span class="text-xs text-gray-500">Optional</span>
                    </div>

                    {{--Address3--}}
                    <div class="mb-5 xl:w-1/2">
                        <label class="label block mb-2" for="address_3">Address 3</label>
                        <input id="address_3" name="address_3" type="text" value="{{$companyProfile->address3}}"
                               class="form-control">
                        <span class="text-xs text-gray-500">Optional</span>
                    </div>

                    {{--Address4--}}
                    <div class="mb-5 xl:w-1/2">
                        <label class="label block mb-2" for="address_4">Address 4</label>
                        <input id="address_4" name="address_4" type="text" value="{{$companyProfile->address4}}"
                               class="form-control">
                        <span class="text-xs text-gray-500">Optional</span>
                    </div>


                    {{--State--}}
                    <div class="mb-5 xl:w-1/2">
                        <label class="label block mb-2" for="state">State</label>
                        <div class="custom-select">
                            <select name="state" class="form-control">
                                <option {{ $companyProfile->state == 'Johor' ? 'selected' : '' }}>Johor</option>
                                <option {{ $companyProfile->state == 'Kedah' ? 'selected' : ''  }}>Kedah</option>
                                <option {{ $companyProfile->state == 'Kelantan' ? 'selected' : ''  }}>Kelantan</option>
                                <option {{ $companyProfile->state == 'Kuala Lumpur' ? 'selected' : ''  }}>Kuala Lumpur
                                </option>
                                <option {{ $companyProfile->state == 'Labuan' ? 'selected' : ''  }}>Labuan</option>
                                <option {{ $companyProfile->state == 'Melaka' ? 'selected' : ''  }}>Melaka</option>
                                <option {{ $companyProfile->state == 'Negeri Sembilan' ? 'selected' : ''  }}>Negeri
                                    Sembilan
                                </option>
                                <option {{ $companyProfile->state == 'Pahang' ? 'selected' : ''  }}>Pahang</option>
                                <option {{ $companyProfile->state == 'Penang' ? 'selected' : ''  }}>Penang</option>
                                <option {{ $companyProfile->state == 'Perak' ? 'selected' : ''  }}>Perak</option>
                                <option {{ $companyProfile->state == 'Perlis' ? 'selected' : ''  }}>Perlis</option>
                                <option {{ $companyProfile->state == 'Putrajaya' ? 'selected' : ''  }}>Putrajaya
                                </option>
                                <option {{ $companyProfile->state == 'Sabah' ? 'selected' : ''  }}>Sabah</option>
                                <option {{ $companyProfile->state == 'Sarawak' ? 'selected' : ''  }}>Sarawak</option>
                                <option {{ $companyProfile->state == 'Selangor' ? 'selected' : ''  }}>Selangor</option>
                                <option {{ $companyProfile->state == 'Terengganu' ? 'selected' : ''  }}>Terengganu
                                </option>
                            </select>
                            <div class="custom-select-icon la la-caret-down"></div>
                        </div>
                    </div>

                    {{--Postcode--}}
                    <div class="mb-5 xl:w-1/2">
                        <label class="label block mb-2" for="postcode">Postcode</label>
                        <input id="postcode" placeholder="xxxxx" name="postcode" type="number"
                               value="{{$companyProfile->postcode}}"
                               class="form-control" required>
                    </div>

                    <div class="flex flex-wrap gap-2 mt-5">
                        <button class="btn btn_outlined btn_secondary uppercase"
                                onclick="window.location.href='{{route('paid-accounts.dashboard')}}';">Cancel
                        </button>
                        <button type="submit" class="btn btn_primary uppercase">Update</button>

                    </div>

                </div>
            </form>


        </div>


    </div>

@endsection
