@extends('layouts.pdf')
@section('content')
    <hr>
    <br>

    <div class="table-responsive">
        <table class="table table-striped table-bordered table-sm">
            <thead>
                <tr>
                    <th scope="col" class="text-center">N°</th>
                    <th scope="col" class="text-center">{{ __('pdf_reports')['room_list']['header_1'] }}</th>
                    <th scope="col" class="text-center">{{ __('pdf_reports')['room_list']['header_2'] }}</th>
                    <th scope="col" class="text-center">{{ __('pdf_reports')['room_list']['header_3'] }}</th>
                    <th scope="col" class="text-center">{{ __('pdf_reports')['room_list']['header_4'] }}</th>
                    <th scope="col" class="text-center">{{ __('pdf_reports')['room_list']['header_5'] }}</th>
                </tr>
            </thead>
            <tbody>
                @php $no = 1; @endphp

                @forelse ($rooms as $room)
                    <tr class="">
                        <td scope="row">
                            <p class="text-center" style="font-weight: 600">{{ $no++ }}</p>
                        </td>
                        <td>
                            <p class="text-center">{{ $room->roomType->tr_name }}</p>
                        </td>
                        <td>
                            <p class="text-center">{{ $room->room_name }}</p>
                        </td>
                        <td>
                            <p class="text-center">{{ $room->room_floor }}</p>
                        </td>
                        <td>
                            @foreach ($room->room_prices['room_prices'] as $season_prices)
                                <small class="mb-0 text-start">
                                    {{-- Name --}}
                                    <span style="font-weight: 600"> {{
                                        $season_prices['season_name'] === "Temporada Única"
                                            ? __('seeders')['seasons'][$season_prices['season_name']]
                                            : $season_prices['season_name']
                                    }}: </span>

                                    {{-- Price --}}
                                    {{ \App\Helpers\Formats\FormatCurrencyHelper::formatCurrency($season_prices['season_price']) }}
                                </small>
                            @endforeach
                        </td>
                        <td>
                            <p class="text-center">
                                {{ __('neutral_words')[$room->room_status] }}
                            </p>
                        </td>
                    </tr>
                @empty
                    <tr>
                        <td colspan="6" class="text-center">{{ __('data_tables')['sEmptyTable'] }}</td>
                    </tr>
                @endforelse

            </tbody>
        </table>
    </div>
@endsection
