@props([
    'variant' => 'dark',
    'layout' => 'row',
    'tagline' => true,
    'taglineText' => null,
    'size' => 'md',
])

@php
    $markKind = $variant === 'light' ? 'mark-light' : 'mark';
    $mark = platform_logo($markKind).'?v=3';
    $sub = $taglineText ?? ($tagline ? platform_tagline() : 'Finance House');
    $classes = collect([
        'vfh-logo',
        'vfh-logo--'.$variant,
        'vfh-logo--'.$layout,
        'vfh-logo--'.$size,
    ])->implode(' ');
@endphp

<div {{ $attributes->class($classes) }}>
    <img
        class="vfh-logo__mark"
        src="{{ $mark }}"
        alt="{{ platform_name() }}"
        width="48"
        height="48"
        decoding="async"
    >
    @if($layout !== 'mark')
        <div class="vfh-logo__text">
            <span class="vfh-logo__name">{{ platform_name() }}</span>
            @if($tagline || $taglineText)
                <span class="vfh-logo__tag">{{ $sub }}</span>
            @endif
        </div>
    @endif
</div>
