@extends(ucfirst(activeGuard()).'.'.layout())
@section('pagetitle', __('trans.delivery_dates'))

@section('content')

<table class="table table-bordered data-table">
    <thead>
        <tr>
            <th>#</th>
            <th>@lang('trans.title_ar')</th>
            <th>@lang('trans.title_en')</th>
            @if(hasPermission('edit_delivery_dates'))
            <th>@lang('trans.status')</th>
            <th></th>
            @endif
        </tr>
    </thead>
    <tbody>
        @foreach ($Models as $Model)
        <tr>
            <td>{{ $loop->iteration }}</td>
            <td>{{ $Model->title_ar }}</td>
            <td>{{ $Model->title_en }}</td>
            @if(hasPermission('edit_delivery_dates'))
                <td>
                    <input class="toggle" type="checkbox" onclick="toggleswitch({{ $Model->id }},'delivery_dates')" @if ($Model->status) checked @endif>
                </td>
                <td>
                    <a href="{{ route(activeGuard().'.delivery_dates.edit', $Model) }}"><i class="fa-solid fa-pen-to-square"></i></a>
                </td>
            @endif
        </tr>
        @endforeach
    </tbody>
</table>

@endsection
