@props(['name', 'gradient' => false, 'strokeWidth' => 2])
@php
    $icon = \App\Support\Icons::get($name);
@endphp
@if ($icon)
    @if ($icon['type'] === 'fill')
        <svg
            xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" focusable="false" aria-hidden="true"
            fill="{{ $gradient ? 'url(#icon-instagram-gradient)' : 'currentColor' }}"
            {{ $attributes->merge(['class' => 'h-5 w-5']) }}
        >{!! $icon['body'] !!}</svg>
    @else
        <svg
            xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" focusable="false" aria-hidden="true"
            fill="none"
            stroke="{{ $gradient ? 'url(#icon-gold-gradient)' : 'currentColor' }}"
            stroke-width="{{ $strokeWidth }}" stroke-linecap="round" stroke-linejoin="round"
            {{ $attributes->merge(['class' => 'h-5 w-5']) }}
        >{!! $icon['body'] !!}</svg>
    @endif
@endif
