@extends('layouts.admin.app')

@section('content')
    <div class="container-xl text-center">
        <!-- Page title -->
        <div class="page-header d-print-none">
            <h2 class="page-title text-center justify-content-center">
                <div class="align-self-center">
                    @if (!is_null($post))
                        Edit Post
                    @else
                        New Post
                    @endif
                </div>
            </h2>
        </div>
    </div>
    <div class="page-body">
        <div class="container-xl">
            @if (!is_null($post))
                <post-editor :post-id="{{ $post->id }}"></post-editor>
            @else
                <post-editor timezone="{{ session()->get('timezone') }}"></post-editor>
            @endif
        </div>
    </div>
@endsection
