@push('menu')
    <x-menu-action tooltip="Einstellungen">
        <svg class="w-5 h-5 mb-1 text-gray-500 dark:text-gray-400 group-hover:text-blue-600 dark:group-hover:text-blue-500" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20">
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 12.25V1m0 11.25a2.25 2.25 0 0 0 0 4.5m0-4.5a2.25 2.25 0 0 1 0 4.5M4 19v-2.25m6-13.5V1m0 2.25a2.25 2.25 0 0 0 0 4.5m0-4.5a2.25 2.25 0 0 1 0 4.5M10 19V7.75m6 4.5V1m0 11.25a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5ZM16 19v-2"/>
        </svg>
    </x-menu-action>
    <div class="flex items-center justify-center">
        <x-drawer-trigger target="album-add" action="open">
            <button data-tooltip-target="tooltip-new" type="button" class="inline-flex items-center justify-center w-10 h-10 font-medium bg-blue-600 rounded-full hover:bg-blue-700 group focus:ring-4 focus:ring-blue-300 focus:outline-none dark:focus:ring-blue-800">
                <svg class="w-4 h-4 text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 18 18">
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 1v16M1 9h16"/>
                </svg>
                <span class="sr-only">New item</span>
            </button>
        </x-drawer-trigger>
    </div>
    <div id="tooltip-new" role="tooltip" class="absolute z-10 invisible inline-block px-3 py-2 text-sm font-medium text-white transition-opacity duration-300 bg-gray-900 rounded-lg shadow-sm opacity-0 tooltip dark:bg-gray-700">
        Create new item
        <div class="tooltip-arrow" data-popper-arrow></div>
    </div>
@endpush

<x-layouts.app>
    <x-hero-search></x-hero-search>
    <h1 class="mb-4 mx-8 text-4xl font-extrabold leading-none tracking-tight text-gray-900 md:text-5xl lg:text-6xl dark:text-white">
        {{ $category->name }}
    </h1>
    <div class="m-8 flex flex-wrap flex-row gap-4">
        @foreach ($albums as $album)
            <figure class="relative rounded-lg cursor-pointer h-80 flex-grow overflow-hidden group">
                <a href="{{ route('album.show', $album) }}" wire:navigate>
                    <img class="max-h-full min-w-full align-bottom object-cover"
                     src="{{ $album->thumbnail }}" alt="{{ $album->name }} Cover">
                    <figcaption class="absolute p-4 text-lg text-white top-1/2 bottom-0 bg-opacity-20 min-w-full bg-gradient-to-b from-transparent to-slate-900 flex flex-col-reverse">
                        <span class="z-10">{{ $album->name }}</span>
                    </figcaption>
                    <div class="opacity-0 z-0 group-hover:opacity-40 absolute inset-0 w-full h-full bg-black flex items-center justify-center transition-opacity">
                        <svg class="w-1/2 h-1/2 text-white" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
                          <path stroke="currentColor" stroke-width="2" d="M21 12c0 1.2-4.03 6-9 6s-9-4.8-9-6c0-1.2 4.03-6 9-6s9 4.8 9 6Z"/>
                          <path stroke="currentColor" stroke-width="2" d="M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"/>
                        </svg>              
                    </div>
                </a>
            </figure>
        @endforeach
    </div>
    <x-drawer name="album-add" >
        <x-slot:title>Neues Album in {{ $category->name }} erstellen</x-slot:title>
        <x-slot:content>
            <livewire:drawer.album.create></livewire:drawer.album.create>
        </x-slot:content>
    </x-drawer>
</x-layouts.app>
