@php // Sticky colours. Kept here as literal class strings, Tailwind only scans // resources/views, so a palette held in PHP would be purged from the build. $palette = [ 'yellow' => ['note' => 'bg-amber-50 ring-amber-200/80', 'dot' => 'bg-amber-300', 'chip' => 'bg-amber-100 text-amber-800'], 'pink' => ['note' => 'bg-rose-50 ring-rose-200/80', 'dot' => 'bg-rose-300', 'chip' => 'bg-rose-100 text-rose-800'], 'blue' => ['note' => 'bg-sky-50 ring-sky-200/80', 'dot' => 'bg-sky-300', 'chip' => 'bg-sky-100 text-sky-800'], 'green' => ['note' => 'bg-emerald-50 ring-emerald-200/80','dot' => 'bg-emerald-300','chip' => 'bg-emerald-100 text-emerald-800'], 'slate' => ['note' => 'bg-slate-50 ring-slate-200', 'dot' => 'bg-slate-300', 'chip' => 'bg-slate-200 text-slate-700'], ]; $swatch = fn (string $key): array => $palette[$key] ?? $palette['yellow']; @endphp
@if ($open) {{-- Above the z-50 modals, so notes can be opened from inside an edit modal. --}}
{{-- Header --}}

{{ __('Notes') }}

{{ __($typeLabel) }} @if ($title !== '') · {{ $title }} @endif

{{-- Composer --}}
@foreach ($palette as $key => $classes) @endforeach
@if ($editingId) {{ __('Cancel') }} @endif {{ $editingId ? __('Save note') : __('Add note') }}
{{-- Notes --}}
@if ($notes->isEmpty()) @else
@foreach ($notes as $note) @php $s = $swatch($note->color); @endphp
{{ $note->authorInitials() }} {{ $note->user?->name ?: __('Someone') }}
@if ($note->is_pinned) @endif

{{ $note->body }}

{{ $note->created_at?->diffForHumans() }} @if ($this->canManage($note))
@endif
@endforeach
@endif
@endif