@aware(['component']) @props(['row', 'rowIndex']) @if ($component->collapsingColumnsAreEnabled() && $component->hasCollapsedColumns()) @php $theme = $component->getTheme(); $columns = collect([]); if ($component->shouldCollapseOnMobile() && $component->shouldCollapseOnTablet()) { $columns->push($component->getCollapsedMobileColumns()); $columns->push($component->getCollapsedTabletColumns()); } elseif ($component->shouldCollapseOnTablet() && ! $component->shouldCollapseOnMobile()) { $columns->push($component->getCollapsedTabletColumns()); } elseif ($component->shouldCollapseOnMobile() && ! $component->shouldCollapseOnTablet()) { $columns->push($component->getCollapsedMobileColumns()); } $columns = $columns->collapse(); // TODO: Column count $colspan = $columns->count() + 1; @endphp @if ($theme === 'tailwind')
@foreach($columns as $colIndex => $column) @continue($column->isHidden()) @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column))

{{ $column->getTitle() }}: {{ $column->renderContents($row) }}

@endforeach
@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5')
@foreach($columns as $colIndex => $column) @continue($column->isHidden()) @continue($this->columnSelectIsEnabled() && ! $this->columnSelectIsEnabledForColumn($column))

{{ $column->getTitle() }}: {{ $column->renderContents($row) }}

@endforeach
@endif @endif