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

@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_times'))
            <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_times'))
                <td>
                    <input class="toggle" type="checkbox" onclick="toggleswitch({{ $Model->id }},'delivery_times')" @if ($Model->status) checked @endif>
                </td>
                <td>
                    <a href="{{ route(activeGuard().'.delivery_times.edit', $Model) }}"><i class="fa-solid fa-pen-to-square"></i></a>
                </td>
            @endif
        </tr>
        @endforeach
    </tbody>
</table>

@endsection
