@extends('admin.layouts.app')

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

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

    <x-admin.alert />

    <form method="POST" action="{{ route('admin.announcements.store') }}" enctype="multipart/form-data">
        @csrf
        <x-admin.card>
            @include('admin.posts._form', ['post' => null, 'tags' => $tags, 'type' => 'announcement'])
            <x-slot:footer>
                <x-admin.form-actions :cancel-url="route('admin.announcements.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
