<x-guru-layout>
    <x-slot name="header">
        <h2 class="font-semibold text-2xl text-gray-800 leading-tight">
            {{ __('Profile ') }}{{ auth()->user()->name }}
        </h2>
    </x-slot>

    <div class="py-10 bg-gray-100">
        <div class="max-w-2xl mx-auto sm:px-6 lg:px-8">
        <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
            <div class="p-6">
                @if(session('success'))
                    <div class="alert alert-success mb-4">{{ session('success') }}</div>
                @endif
                @if($guru->foto)
                    <div class="flex justify-center mb-8 mt-2">
                        <img src="{{ asset('storage/foto_guru/' . $guru->foto) }}" width="180" class="border shadow"
                            alt="Foto Profil Guru">
                    </div>
                @endif
                <table class="table table-bordered w-full mb-4">
                    <tr>
                        <th class="text-left">Nama</th>
                        <td>{{ $guru->nama }}</td>
                    </tr>
                    <tr>
                        <th class="text-left">NIP</th>
                        <td>{{ $guru->code_guru }}</td>
                    </tr>
                    <tr>
                        <th class="text-left">Alamat</th>
                        <td>{{ $guru->alamat }}</td>
                    </tr>
                    <tr>
                        <th class="text-left">Tanggal Lahir</th>
                        <td>{{ $guru->tanggal_lahir }}</td>
                    </tr>
                    <tr>
                        <th class="text-left">Jenis Kelamin</th>
                        <td>{{ $guru->jenis_kelamin == 'L' ? 'Laki-laki' : 'Perempuan' }}</td>
                    </tr>
                </table>
                <div class="flex justify-center">
                    <a href="{{ route('guru.profile.edit') }}" class="btn btn-warning">Edit Profile</a>
                </div>
            </div>
        </div>
    </div>
</x-guru-layout>
