@if (Route::currentRouteName() == 'hentai.index')
@php 
    $title = '';
    if (! isset($episode) && isset($hentai)) {
        $episode = $hentai->episodes[0];
        $gallery = $episode->gallery;
        $title = 'Watch all episodes from '.$episode->title.' in 4k, 2160p, 1080p, UHD, HD - hstream.moe';
    } else {
        $title = 'Watch '.$episode->title.' - '.$episode->episode.' in 4k, 2160p, 1080p, UHD, HD - hstream.moe';
    }
@endphp

<meta property="og:title" content="{{ $title }}" />
<meta property="og:description" content="{{ Str::limit($episode->description, 250)  }}" />
<meta property="og:type" content="video.episode" />
<meta property="og:url" content="https://hstream.moe/hentai/{{ $episode->slug }}" />
@if(isset($gallery) && $episode->gallery->isNotEmpty())
<meta property="og:image" content="https://hstream.moe{{ $gallery[0]->image_url }}" />
@endif
<meta property="og:locale" content="en_US" />
<meta property="og:site_name" content="hstream.moe" />
<meta name="twitter:card" content="summary_large_image" />

@php 
    $tags = '';
    foreach ($episode->tags as $tag) {
        if (!$tags){
                $tags .= $tag->name;
        } else {
            $tags .= ', '.$tag->name;
        }
    }
@endphp

<meta name="description" content="{{ $episode->description }} {{ $tags }}">
<meta name="keywords" content="hstream,hentaistream,hentai,stream,4k,hentai 4k,4k hentai,download,free">

@elseif (Route::currentRouteName() == 'home.index')

<meta property="og:title" content="Watch Hentai in 4k, 1080p, 720p, UHD, HD for Free! - hstream.moe" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://hstream.moe/" />
<meta property="og:image" content="https://hstream.moe/images/cropped-HS-1-192x192.webp" />
<meta property="og:image:width" content="300" />
<meta property="og:image:height" content="100" />
<meta property="og:locale" content="en_US" />
<meta property="og:site_name" content="hstream.moe" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="description" content="Watch Hentai free download in 4k, 2160p, 1080p, UHD, HD! Daily upload, no ads, subbed in 2160p!">
@else
<meta name="description" content="Watch Hentai free download in 4k, 2160p, 1080p, UHD, HD! Daily upload, no ads, subbed in 2160p!">
@endif
