@extends('backend.layouts.app') @section('title', __('Edit Page')) @push('styles') @endpush @section('content') @php // Controller PageController::edit passes $totalComponents, $totalLocales, // $isProtected explicitly. The ?? fallbacks fire only if a stale compiled // view or a partial-payload controller forgets to send them, so the // hero degrades to "0 / 0 / Editable" instead of throwing "Undefined variable". $componentIds = is_array($page->component_ids ?? null) ? $page->component_ids : []; $totalComponents = $totalComponents ?? count($componentIds); $totalLocales = $totalLocales ?? (is_countable($locales ?? null) ? count($locales) : 0); $isProtected = $isProtected ?? (bool) ($page->is_protected ?? false); @endphp

{{ __('Edit Page') }}

{{ __('Update route details and block order from one compact workspace.') }}

{{ $totalComponents ?? 0 }}{{ __('Mapped Blocks') }} {{ $totalLocales ?? 0 }}{{ __('Locale Tabs') }} {{ ($isProtected ?? false) ? __('Locked') : __('Editable') }}{{ __('Page State') }}
{{ __('Page Status') }}

{{ $page->label }}

{{ ($isProtected ?? false) ? __('Protected') : __('Live Edit') }}

{{ __('Review the current page state before saving changes.') }}

@include('backend.page.partials._components_list', ['components' => $components, 'selected' => $page->component_ids])
@include('backend.page.partials._components_form_edit', ['page' => $page])
@endsection @push('scripts') @include('backend.page.partials._component_script') @endpush