@props([ 'name' => 'home', 'class' => 'w-6 h-6', 'fill' => false, ]) @php // Peta nama lama (ikon SVG) → ligatur Material Symbols. Nama lain dipakai apa adanya. $map = [ 'home' => 'home', 'book' => 'menu_book', 'calendar' => 'calendar_month', 'user' => 'person', 'bell' => 'notifications', 'play' => 'play_arrow', 'play-circle' => 'play_circle', 'lock' => 'lock', 'heart' => 'favorite', 'bookmark' => 'bookmark', 'compass' => 'explore', 'mosque' => 'mosque', 'mail' => 'mail', 'share' => 'share', 'shield' => 'verified_user', 'palette' => 'palette', 'shopping' => 'shopping_bag', 'store' => 'storefront', 'chevron-right' => 'chevron_right', 'chevron-left' => 'chevron_left', 'arrow-left' => 'arrow_back', 'arrow-right' => 'arrow_forward', 'check' => 'check', 'sparkles' => 'auto_awesome', 'dashboard' => 'dashboard', 'users' => 'group', 'film' => 'movie', 'series' => 'video_library', 'cash' => 'payments', 'cog' => 'settings', 'logout' => 'logout', 'tag' => 'sell', 'image' => 'image', 'sun' => 'light_mode', 'moon' => 'dark_mode', 'search' => 'search', 'menu' => 'menu', 'list' => 'format_list_numbered', 'clock' => 'schedule', 'location' => 'location_on', 'next' => 'skip_next', 'download' => 'download', 'edit' => 'edit', 'trash' => 'delete', 'plus' => 'add', ]; $symbol = $map[$name] ?? str_replace('-', '_', $name); // Tentukan ukuran (font-size) dari class width lama agar panggilan existing tetap pas. $sizes = ['w-3'=>12,'w-3.5'=>14,'w-4'=>16,'w-5'=>20,'w-6'=>24,'w-7'=>28,'w-8'=>32,'w-9'=>36,'w-10'=>40,'w-11'=>44,'w-12'=>48,'w-14'=>56,'w-16'=>64]; $fontSize = 24; foreach ($sizes as $cls => $px) { if (preg_match('/(^|\s)'.preg_quote($cls, '/').'(\s|$)/', $class)) { $fontSize = $px; } } @endphp