@props([ 'name', 'size' => 20, 'stroke' => 1.5, 'label' => null, ]) @php /* | Semantic business names → Lucide icon names. Views use the business | vocabulary; the mapping keeps the icon library out of the templates. */ $map = [ // Catálogo / producto 'mountain' => 'mountain', 'layers' => 'layers', 'package' => 'package', 'ruler' => 'ruler', 'sun' => 'sun', // Proceso / confianza 'pickaxe' => 'pickaxe', 'shovel' => 'shovel', 'hammer' => 'hammer', 'truck' => 'truck', 'shield' => 'shield-check', 'map-pin' => 'map-pin', 'leaf' => 'leaf', // Contacto / cotización 'calculator' => 'calculator', 'phone' => 'phone', 'mail' => 'mail', 'clock' => 'clock', 'date' => 'calendar', 'whatsapp' => 'message-circle', // Redes / social proof 'instagram' => 'instagram', 'facebook' => 'facebook', 'youtube' => 'youtube', 'tiktok' => 'music-2', 'star' => 'star', 'quote' => 'quote', 'sparkles' => 'sparkles', // UI 'arrow-right' => 'arrow-right', 'arrow-up' => 'arrow-up', 'arrow-up-right' => 'arrow-up-right', 'chevron-down' => 'chevron-down', 'menu' => 'menu', 'cart' => 'shopping-cart', 'close' => 'x', 'search' => 'search', 'filter' => 'sliders-horizontal', 'grid' => 'layout-grid', 'check' => 'check', 'image' => 'image', 'file' => 'file-text', 'download' => 'download', // Legal / reclamos 'book' => 'book', 'book-open' => 'book-open', 'open-book' => 'book-open', // Aplicaciones de producto 'piso' => 'layout-grid', 'fachada' => 'layers', 'camino' => 'map-pin', 'interior' => 'sun', ]; $icon = $map[$name] ?? $name; // Graceful fallback: verify the resolved Lucide SVG actually exists. $svgPath = base_path('vendor/mallardduck/blade-lucide-icons/resources/svg/icons/'.$icon.'.svg'); if (! is_file($svgPath)) { $icon = 'circle'; } // Decorative by default; `label` opts into an accessible image role. $a11y = $label ? ['role' => 'img', 'aria-label' => $label] : ['aria-hidden' => 'true']; @endphp merge($a11y)->class('shrink-0') }} />