@extends('layouts.user_type.guest') @section('header_title', __('Live streams')) @section('content')


@include('user.user_menu') @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif

{{ __('Live streams') }}

{{ __('Create and manage live stream rooms.') }}

{{ __('All') }}: {{ $stats['all'] }} {{ __('Active') }}: {{ $stats['active'] }} {{ __('Ended') }}: {{ $stats['ended'] }}
@csrf

{{ __('Live streams I can access') }}

@forelse($accessibleRooms as $accessibleRoom)

{{ $accessibleRoom->title ?: __('Untitled live stream') }}

{{ $accessibleRoom->status_label }} {{ $accessibleRoom->visibility_label }} {{ $accessibleRoom->entry_fee_formatted }}
{{ __('Watch') }}
@empty
{{ __('No accessible live streams found.') }}
@endforelse

{{ __('My live streams') }}

@forelse($rooms as $room) @php($watchUrl = localized_route('user.live.watch', ['token' => $room->token]))

{{ $room->title ?: __('Untitled live stream') }}

{{ $room->status_label }} {{ $room->visibility_label }} {{ $room->entry_fee_formatted }}
{{ __('Created at') }}: {{ optional($room->created_at)->format('Y/m/d H:i') }}
{{ __('Watch') }}@if($room->is_active)
@csrf
@else
@csrf @method('DELETE')
@endif
@empty
{{ __('You have not created any live streams yet.') }}
@endforelse
{{ $rooms->links() }}
@endsection