@switch($limitation->limitation_slug)
@case('video-cast')
{{ $limitation->limitation_value ? __('messages.video_cast_enabled') : __('messages.video_cast_not_available') }}
@break
@case('ads')
{{ $limitation->limitation_value ? __('messages.ads_will_be_shown') : __('messages.ads_will_not_be_shown') }}
@break
@case('device-limit')
{{ $limitation->limit == 0
? __('messages.only_one_mobile_device')
: __('messages.up_to_devices', ['count' => $limitation->limit]) . ' ' . __('messages.simultaneously')
}}
@break
@case('download-status')
{{ __('messages.download_resolutions') }}:
@php
$availableQualities = [];
$notAvailableQualities = [];
@endphp
@foreach (json_decode($limitation->limit, true) as $quality => $available)
@if($available == 1)
@php
$availableQualities[] = strtoupper($quality);
@endphp
@else
@php
$notAvailableQualities[] = strtoupper($quality);
@endphp
@endif
@endforeach
@if (!empty($availableQualities))
-
{{ implode('/', $availableQualities) }}
@endif
@if (!empty($notAvailableQualities))
-
{{ implode('/', $notAvailableQualities) }}
@endif
@break
@case('supported-device-type')
@php
$supportedDevices = json_decode($limitation->limit, true);
$supportedDevicesList = [];
@endphp
@foreach ($supportedDevices as $device => $supported)
@if ($supported == 1)
@php
$supportedDevicesList[] = strtolower($device); // Convert device names to lowercase
@endphp
@endif
@endforeach
@if (!empty($supportedDevicesList))
{{ __('messages.supported_on') }}: {{ implode(', ', array_map('ucfirst', $supportedDevicesList)) }}.
@else
{{ __('messages.only_mobile_supported') }}
@endif
@break
@case('profile-limit')
{{ __('messages.create_up_to_profiles', ['count' => ($limitation->limit == 0 ? 1 : $limitation->limit)]) }}
@break
@default
{{ ucwords(str_replace('-', ' ', $limitation->limitation_slug)) }}: {{ $limitation->limitation_value ? __('messages.enabled') : __('messages.disabled') }}
@endswitch