@aware(['component', 'tableName'])
@props(['column', 'index'])
@php
$attributes = $attributes->merge(['wire:key' => $tableName . '-header-col-'.$column->getSlug()]);
$customAttributes = $component->getThAttributes($column);
$customSortButtonAttributes = $component->getThSortButtonAttributes($column);
$direction = $column->hasField() ? $component->getSort($column->getColumnSelectName()) : $component->getSort($column->getSlug()) ?? null ;
@endphp
@if ($component->isTailwind())
merge($customAttributes)
->class(['px-6 py-3 text-left text-xs font-medium whitespace-nowrap text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400' => $customAttributes['default'] ?? true])
->class(['hidden' => $column->shouldCollapseAlways()])
->class(['hidden md:table-cell' => $column->shouldCollapseOnMobile()])
->class(['hidden lg:table-cell' => $column->shouldCollapseOnTablet()])
->except('default')
}}
>
@if($column->getColumnLabelStatus())
@unless ($component->sortingIsEnabled() && ($column->isSortable() || $column->getSortCallback()))
{{ $column->getTitle() }}
@else
@endunless
@endif
|
@elseif ($component->isBootstrap())
merge($customAttributes)
->class(['' => $customAttributes['default'] ?? true])
->class(['d-none' => $column->shouldCollapseAlways()])
->class(['d-none d-md-table-cell' => $column->shouldCollapseOnMobile()])
->class(['d-none d-lg-table-cell' => $column->shouldCollapseOnTablet()])
->except('default')
}}
>
@if($column->getColumnLabelStatus())
@unless ($component->sortingIsEnabled() && ($column->isSortable() || $column->getSortCallback()))
{{ $column->getTitle() }}
@else
{{ $column->getTitle() }}
@if ($direction === 'asc')
@elseif ($direction === 'desc')
@else
@endif
@endunless
@endif
|
@endif