@php
// key => label. Keys map directly to the comm_store columns
// text_editor_{key} (e.g. text_editor_new_page). IMPORTANT:
// confirm these 3 labels match comm_content_mapping.action_needed
// EXACTLY (case, spacing) — that's what the mailer will later
// match against to pick which column to send.
$templateTypes = [
'new_page' => 'Move my release to a new artist page',
'existing_page' => 'Move my release to an existing artist page',
'remove_release' => 'Remove a release from my artist page',
];
// template key => action id. These ids must match the values
// in each DSP field's "actions" array (from extractDspInjectorFields).
// ASSUMED order: 1 = new page, 2 = existing page, 3 = remove release.
// Change here if your action ids map differently.
$templateActionIds = [
'new_page' => '1',
'existing_page' => '2',
'remove_release' => '3',
];
// Existing saved content per template, keyed the same way.
// Read by JS on first expand of each panel (see the lazy
// Quill-init note below) rather than pasted in at page load,
// since panels now start collapsed.
$templateContents = [];
foreach ($templateTypes as $tKey => $tLabel) {
$templateContents[$tKey] = $store->{'text_editor_' . $tKey} ?? '';
}
@endphp
@foreach ($templateTypes as $key => $label)