@extends('layouts.admin', ['title' => __('Pages').' | Nivex'])

@section('content')
    <h1 class="section-title text-4xl">{{ __('Edit') }} {{ $pageContent->page }}</h1>
    <p class="mt-4 max-w-3xl text-base leading-8 text-slate-600 dark:text-slate-300">{{ __('Page content') }} is editable as structured JSON to keep the site flexible for both Arabic and English.</p>

    <form method="POST" action="{{ route('admin.pages.update', $pageContent) }}" class="mt-8 space-y-5">
        @csrf
        @method('PUT')
        <div>
            <label class="label">{{ __('Content JSON') }}</label>
            <textarea name="content" rows="30" class="field font-mono text-xs leading-6">{{ old('content', $content) }}</textarea>
        </div>
        <button class="btn-primary">{{ __('Save Changes') }}</button>
    </form>
@endsection