@extends('admin.layouts.app')

@section('title', __('dashboard.language_details'))

@section('content')
<x-admin.page-header title="{{ __('dashboard.language_details') }}" :breadcrumbs="[__('dashboard.languages') => route('admin.languages.index'), __('dashboard.details') => '']" />

<div class="row justify-content-center">
    <div class="col-xl-12">
        <!-- Header Card -->
        <div class="card bg-primary bg-gradient mb-4">
            <div class="card-body">
                <div class="d-flex align-items-center">
                    <div class="avatar-lg bg-white bg-opacity-25 rounded d-flex align-items-center justify-content-center me-4" style="width: 80px; height: 80px;">
                        <span class="text-white fs-1 fw-bold">{{ strtoupper($language->code) }}</span>
                    </div>
                    <div>
                        <h3 class="mb-1 text-white">{{ $language->name }}</h3>
                        @if($language->native_name)
                            <p class="text-white-50 mb-0">{{ $language->native_name }}</p>
                        @endif
                    </div>

                    <div class="ms-auto text-end">
                        @if($language->is_default)
                            <span class="badge bg-warning mb-1 d-block">{{ __('dashboard.default') }}</span>
                        @endif
                        @if($language->is_active)
                            <span class="badge bg-success">{{ __('dashboard.active') }}</span>
                        @else
                            <span class="badge bg-danger">{{ __('dashboard.inactive') }}</span>
                        @endif
                    </div>
                </div>
            </div>
        </div>

        <!-- Info Card -->
        <div class="card mb-4">
            <div class="card-header">
                <h5 class="card-title mb-0">{{ __('dashboard.general_info') }}</h5>
            </div>
            <div class="card-body">
                <div class="row">
                    <x-view-col label="{{ __('dashboard.id') }}" :value="$language->id"/>
                    <x-view-col label="{{ __('dashboard.code') }}" :value="$language->code"/>
                    <x-view-col label="{{ __('dashboard.name') }}" :value="$language->name"/>
                    <x-view-col label="{{ __('dashboard.native_name') }}" :value="$language->native_name ?? '-'"/>
                    <x-view-col label="{{ __('dashboard.direction') }}" :value="strtoupper($language->direction)"/>
                    <x-view-col label="{{ __('dashboard.created_at') }}" :value="$language->created_at"/>
                    <x-view-col label="{{ __('dashboard.updated_at') }}" :value="$language->updated_at"/>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
