{{-- The lead-type form, shared by the "add" card and every "edit" dialog. Expects: $type — the row being edited, or null when adding $colours — the palette tokens a lead type may use $priorities — the priority bands, keyed by band, in ranking order --}} @php $prefix = $type ? 'l' . $type->id . '_' : 'new_'; $priorities = $priorities ?? \App\Models\LeadType::priorityDefinitions(); $margin = \App\Models\LeadType::CONFIDENCE_MARGIN; $currentPriority = $type ? $type->priorityBand() : old('priority', \App\Models\LeadType::PRIORITY_MEDIUM); @endphp