@props([
'headers' => [],
'responsive' => true,
'sortable' => false,
'striped' => false,
])
@php
$isRtl = app()->getLocale() === 'ar' || is_rtl();
@endphp
@if(!empty($headers))
@foreach($headers as $key => $header)
@php
$alignment = is_array($header) && isset($header['align'])
? $header['align']
: ($isRtl ? 'right' : 'left');
$headerText = is_array($header) ? $header['text'] : $header;
$width = is_array($header) && isset($header['width']) ? $header['width'] : null;
$sortable = is_array($header) && isset($header['sortable']) ? $header['sortable'] : false;
$classes = is_array($header) && isset($header['class']) ? $header['class'] : '';
@endphp
|
@if($sortable)
@else
{{ $headerText }}
@endif
|
@endforeach
@endif
{{ $slot }}