@php $pageConfigs = ['navbarType' => 'hidden', 'contentLayout' => 'wide']; $configData = Helper::appClasses(); $statusMap = [ 'pending' => ['Pendiente', 'warning'], 'confirmed' => ['Confirmado', 'info'], 'at_restaurant' => ['En restaurante', 'primary'], 'en_route' => ['En camino', 'primary'], 'delivered' => ['Entregado', 'success'], 'cancelled' => ['Cancelado', 'danger'], ]; [$statusLabel, $statusColor] = $statusMap[$delivery->status] ?? ['Pendiente', 'warning']; $origin = $delivery->restaurant?->address ?? ''; $destination = $delivery->delivery_address ?? ''; $navApp = auth()->user()->nav_app ?? 'maps'; $navUrl = $navApp === 'waze' ? 'https://waze.com/ul?q=' . urlencode($destination) . '&navigate=yes' : 'https://www.google.com/maps/dir/?api=1&origin=' . urlencode($origin) . '&destination=' . urlencode($destination); @endphp @extends('layouts/layoutMaster') @section('title', 'Pedido') @section('content')