@extends('layouts.redirect') @section('site_title', __('Link preview')) @section('content')

{{ __('Link preview') }}

{{ str_replace(['http://', 'https://'], '', ($link->domain->url ?? config('app.url'))) .'/'.$link->alias }}

@if($link->expiration_clicks || $link->ends_at)
@if($link->expiration_clicks)

{!! __('Will expire after :count clicks', ['count' => '' . $link->expiration_clicks . '']) !!}

@endif @if($link->ends_at)

{!! __('Will expire on :date at :time', ['date' => '' . $link->ends_at->tz(Auth::user()->timezone ?? config('app.timezone'))->format(__('Y-m-d')) . '', 'time' => '' . $link->ends_at->tz(Auth::user()->timezone ?? config('app.timezone'))->format('H:i') . '']) !!} UTC{{ \Carbon\CarbonTimeZone::create(Auth::user()->timezone ?? config('app.timezone'))->toOffsetName() }}

@endif @if($link->expiration_url)

{!! __('Will redirect to :url once expired', ['url' => '' . e($link->expiration_url) . '']) !!}

@endif
@endif @if($link->target_type)
@if($link->target_type == 1 && $link->country_target !== null) @foreach($link->country_target as $country)

{!! __('If the country is :country will redirect to :url', ['country' => '' . __(config('countries')[$country->key]) . '', 'url' => '' . e($country->value) . '']) !!}

@endforeach @endif @if($link->target_type == 2 && $link->platform_target !== null) @foreach($link->platform_target as $platform)

{!! __('If the platform is :platform will redirect to :url', ['platform' => '' . $platform->key . '', 'url' => '' . e($platform->value) . '']) !!}

@endforeach @endif @if($link->target_type == 3 && $link->language_target !== null) @foreach($link->language_target as $language)

{!! __('If the language is :language will redirect to :url', ['language' => '' . $language->key . '', 'url' => '' . e($language->value) . '']) !!}

@endforeach @endif @if($link->target_type == 4 && $link->rotation_target !== null) @foreach($link->rotation_target as $rotation)

{!! __('Will rotate to :url', ['url' => '' . e($rotation->value) . '']) !!}

@endforeach @endif
@endif

{!! __('Will redirect to :url', ['url' => '' . e($link->url) . '']) !!}

@if(url()->previous() != url()->current()) @endif
@endsection