@extends('layouts.app') @section('title', $article->title) @section('content')
{{-- Header --}}

{{ $article->title }}

{{ __('Preview') }} {{ __('Edit') }}
@csrf @method('DELETE')
{{ __('Back') }}
{{-- Messages --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- Article information --}}
{{ __('Category') }} {{ $article->category?->name ?? __('Uncategorized') }}
{{ __('Language') }} {{ $article->language?->name ?? __('N/A') }}
{{ __('Order') }} {{ $article->content_order }}
{{ __('Created') }} {{ $article->created_at?->format('M d, Y') ?? __('N/A') }}
{{ __('Slug') }} {{ $article->slug }}
{{-- Statistics --}} @php $detailStats = [ [ 'label' => __('Word Count'), 'value' => number_format(data_get($stats, 'word_count', 0)), 'icon' => 'fa-file-word', 'color' => 'primary', ], [ 'label' => __('Character Count'), 'value' => number_format(data_get($stats, 'char_count', 0)), 'icon' => 'fa-font', 'color' => 'info', ], [ 'label' => __('Reading Time'), 'value' => data_get($stats, 'reading_time', 0).' min', 'icon' => 'fa-book-reader', 'color' => 'warning', ], [ 'label' => __('Has Content'), 'value' => data_get($stats, 'has_content', false) ? __('Yes') : __('No'), 'icon' => 'fa-check-circle', 'color' => data_get($stats, 'has_content', false) ? 'success' : 'danger', ], [ 'label' => __('Age'), 'value' => data_get($stats, 'age_days', 0).' days', 'icon' => 'fa-clock', 'color' => 'secondary', ], [ 'label' => __('Article Length'), 'value' => data_get($stats, 'is_long', false) ? __('Long') : __('Standard'), 'icon' => 'fa-ruler', 'color' => 'primary', ], ]; @endphp
@foreach($detailStats as $stat)

{{ $stat['label'] }}

{{ $stat['value'] }}
@endforeach
{{-- Content and related articles --}}
@include('admin.knowledge.partials.tab-content', [ 'article' => $article, ])
@if($relatedArticles->isNotEmpty()) @endif
@endsection @push('styles') @endpush