@extends('layouts.nova')

@php
    $forumNewThreadProps = json_encode([
        'category'  => ['id' => $category->id, 'name' => $category->name, 'slug' => $category->slug],
        'csrfToken' => csrf_token(),
        'errors'    => $errors->toArray(),
        'oldValues' => ['title' => old('title', ''), 'content' => old('content', '')],
    ], JSON_THROW_ON_ERROR | JSON_UNESCAPED_UNICODE);
@endphp

@section('content')
<div id="forum-new-thread-root"></div>
<script type="application/json" id="forum-new-thread-props">{!! $forumNewThreadProps !!}</script>
@endsection

@push('scripts')
    @vite(['resources/js/entry-forum.jsx'])
@endpush
