@php($editing = $zone->exists) @php($oldPoints = old('coordinates')) @php($points = is_array($oldPoints) ? array_values($oldPoints) : ($zone->coordinates ?? [])) @vite('resources/js/zone-map.js')
@csrf @if ($editing) @method('PUT') @endif

{{ __('Click the map to add a point, drag a point to move it, click a point to remove it. Other zones are shown dashed.') }}

{{ __('Clear') }}
@if ($message = $errors->first('coordinates') ?: $errors->first('coordinates.*'))

{{ $message }}

@endif
{{ $editing ? __('Save changes') : __('Create zone') }} {{ __('Cancel') }}