@extends('Admin.layouts.master')

@section('content')
    @php
        $currentPage = 'manage-customer';
    @endphp
    <style>
        .error-message {
            color: #FF0000;
        }

        form .error-message {
            color: red;
        }
    </style>
    <div class="layout-px-spacing">
        <div class="middle-content container-xxl p-0">
            <div class="row layout-top-spacing ">
                <div class="top-tabel">
                    <div class="row">
                        <div class="col-md-4">
                            <!-- <h6 class="card-title">Edit Manage Customers</h6> -->
                            <a class="d-flex align-items-center justify-content-center pl-2"
                                href="{{ route('manage.customer') }}">
                                <img class="back-btn" src="{{ asset('public/assets/img/left-arrow.svg') }}">
                                <h6 class="card-title p-0">Edit Manage Customers</h6>
                            </a>
                        </div>
                        <div class="col-md-8">
                        </div>
                    </div>
                </div>
                <div class="col-xl-12 col-lg-12 col-sm-12  layout-spacing">
                    <div class="widget-content widget-content-area br-8 position-btn h-10">
                        <div class="view-details Article">
                            <form id="customer_user_form">
                                <input type="hidden" name="customer_id" class="form-control"
                                    value="{{ $customers_data->id }}">
                                <div class="row">
                                    <div class="col-md-6">
                                        <div class="form-group ">
                                            <label for="company-name" class="label">first name</label>
                                            <input type="text" name="name" class="form-control"
                                                value="{{ $customers_data->first_name }} ">
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group ">
                                            <label for="company-name" class="label">Last name</label>
                                            <input type="text" name="last_name" class="form-control"
                                                value="{{ $customers_data->last_name }}">
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <label for="state" class="label">Location</label>
                                            <select id="state" name="state_xid" class="form-control">
                                                <option value="">Select State</option>
                                                @foreach ($state as $st)
                                                    <option value="{{ $st->id }}"
                                                        {{ $customers_data->state_xid == $st->id ? 'selected' : '' }}>
                                                        {{ $st->name }}
                                                    </option>
                                                @endforeach
                                            </select>
                                        </div>
                                    </div>

                                    {{-- <div class="col-md-6">
                                        <div class="form-group ">
                                            <label for="company-name" class="label">User ID</label>
                                            <input type="text" class="form-control" value="{{ $customers_data->id }}">
                                        </div>
                                    </div> --}}
                                    <div class="col-md-6">
                                        <div class="form-group ">
                                            <label for="company-name" class="label">Phone Number</label>
                                            <input type="text" name="phone" class="form-control"
                                                value="{{ $customers_data->phone_number }}">
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group ">
                                            <label for="company-name" class="label">Email ID</label>
                                            <input type="text" name="email_address" class="form-control"
                                                value="{{ $customers_data->email_address }}">
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group ">
                                            <label for="company-name" class="label">Date of Birth</label>
                                            <input type="date" name="date_of_birth" class="form-control"
                                                value="{{ $customers_data->date_of_birth }}">
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <button type="submit" id="customer_user_btn" class="download-btn-custom mt-3 w-25">
                                            <span>Save</span>
                                        </button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
@endsection


@section('section_script')
    <script src="{{ asset('public/assets/js/admin/manage_customer/edit.js') }}"></script>
@endsection
