@include('components.theme.pages.header-user')
<section>
    <div class="row">
        <div class="col-md-12 mt-9">
            <div class="card">
                <div class="card-header">
                    <h3 class="h6 m-0 text-primary font-weight-bold">Umum</h3>
                </div>
                <div class="card-body">
                <form action="{{ site_url('user', 'account/update') }}" method="POST">
                    @csrf
                    @if(session()->has('success'))
                        <div class="alert alert-success">
                            {{ session()->get('success') }}
                        </div>
                    @else
                        @if(session()->has('error'))
                            <div class="alert alert-danger">
                                {{ session()->get('error') }}
                            </div>
                        @endif
                    @endif
                    <div class="row">
                        <div class="col-6 form-group">
                            <label class="form-label">Nama Lengkap<sup class="ml-1 text-danger">*</sup></label>
                            <input type="text" name="name" class="form-control" value="{{ user()->name }}" placeholder="Nama Lengkap">
                        </div>
                        <div class="col-6 form-group">
                            <label class="form-label">Alamat Email<sup class="ml-1 text-danger">*</sup></label>
                            <input type="email" name="email" class="form-control" id="email" value="{{ user()->email }}" placeholder="Alamat Email">
                        </div>
                    </div>
                    <div class="form-group mb-3">
                        <label class="form-label mb-3">Kata Sandi<span class="ml-2 small text-danger">opsional (kosongi jika tidak ingin merubah)</span></label>
                        <input type="password" name="password" class="form-control" value="" placeholder="Kata Sandi">
                    </div>
                    <div class="form-group mb-n1">
                        <button type="submit" class="btn btn-primary">Simpan</button>
                        <a href="{{ site_url('user', '/') }}" class="btn btn-dark">Kembali</a>
                    </div>
                    {!! Form::close() !!}
                </div>
            </div>
        </div>
    </div>
</section>
@include('components.theme.pages.footer')
