<commit_before>@component('core::admin._buttons-form', ['model' => $model])
@endcomponent

{!! BootForm::hidden('id') !!}

<file-manager related-table="{{ $model->getTable() }}" :related-id="{{ $model->id ?? 0 }}"></file-manager>
<file-field type="image" field="image_id" data="{{ $model->image }}"></file-field>

{!! BootForm::text(__('Name'), 'name')->required() !!}
{!! BootForm::text(__('Class'), 'class') !!}
<div class="form-group">
    {!! TranslatableBootForm::hidden('status')->value(0) !!}
    {!! TranslatableBootForm::checkbox(__('Published'), 'status') !!}
</div>

@if ($model->id)

    <item-list-tree
        locale="{{ config('typicms.content_locale') }}"
        url-base="/api/menus/{{ $model->id }}/menulinks"
        fields="id,menu_id,page_id,position,parent_id,status,title,url"
        table="menulinks"<commit_msg>Cannot change the name of a menu<commit_after>@component('core::admin._buttons-form', ['model' => $model])
@endcomponent

{!! BootForm::hidden('id') !!}

<file-manager related-table="{{ $model->getTable() }}" :related-id="{{ $model->id ?? 0 }}"></file-manager>
<file-field type="image" field="image_id" data="{{ $model->image }}"></file-field>

@if ($model->id)
{!! BootForm::hidden('name') !!}
@else
{!! BootForm::text(__('Name'), 'name')->required() !!}
@endif

{!! BootForm::text(__('Class'), 'class') !!}
<div class="form-group">
    {!! TranslatableBootForm::hidden('status')->value(0) !!}
    {!! TranslatableBootForm::checkbox(__('Published'), 'status') !!}
</div>

@if ($model->id)

    <item-list-tree
        locale="{{ config('typicms.content_locale') }}"
        url-base="/api/menus/{{ $model->id }}/menulinks"
        fields="id,menu_id,page_id,position,parent_id,status,title,url"
        table="menulinks"
{'fraction_non_alphanumeric': 0.2603752131893121, 'fraction_numerical': 0.0022740193291642978, 'mean_word_length': 5.518518518518518, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 32, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7475136', 'n_tokens_mistral': 602, 'n_tokens_neox': 597, 'n_words': 86}