@extends('admin.layouts.app')

@section('title', __('admin/posts.knowledgebase_edit_title'))

@section('content')
<div class="container-fluid px-4">
    <x-admin.page-header
        :title="__('admin/posts.knowledgebase_edit_title')"
        icon="fas fa-book"
        :buttons="[[
            'label' => __('admin/common.back'),
            'route' => route('admin.knowledgebase.index'),
            'icon' => 'fas fa-arrow-left',
            'color' => 'outline-secondary',
        ]]" />

    <x-admin.alert />

    <form method="POST" action="{{ route('admin.knowledgebase.update', $post) }}" enctype="multipart/form-data">
        @csrf @method('PUT')
        <x-admin.card>
            @include('admin.posts._form', ['post' => $post, 'tags' => $tags, 'type' => 'kb_article'])
            <x-slot:footer>
                <x-admin.form-actions :cancel-url="route('admin.knowledgebase.index')" />
            </x-slot:footer>
        </x-admin.card>
    </form>
</div>

@push('scripts')
@vite(['resources/js/admin/posts/list.js', 'resources/js/admin/posts/editor.js'])
@endpush
@endsection
