@aware(['component', 'row', 'rowIndex'])
@props(['column', 'colIndex'])
@php
    $attributes = $attributes->merge(['wire:key' => 'cell-'.$rowIndex.'-'.$colIndex.'-'.$component->id]);
    $theme = $component->getTheme();
    $customAttributes = $component->getTdAttributes($column, $row, $colIndex, $rowIndex)
@endphp
@if ($theme === 'tailwind')
    @php
        $is_button = substr($slot, 0, 2) == 'isClickable())
                onclick="window.open('{{ $component->getTableRowUrl($row) }}', '{{ $component->getTableRowUrlTarget($row) ?? '_self' }}')"
            @endif
            {{
                $attributes->merge($customAttributes)
                    ->class(['text-center px-6 py-1 whitespace-nowrap text-sm font-medium dark:text-gray-400' => $customAttributes['default'] ?? true])
                    ->class(['hidden sm:table-cell' => $column && $column->shouldCollapseOnMobile()])
                    ->class(['hidden md:table-cell' => $column && $column->shouldCollapseOnTablet()])
                    ->except('default')
            }}
        >
        {{ $slot }}
    @elseif ($is_toggle)
        
isClickable())
                onclick="window.open('{{ $component->getTableRowUrl($row) }}', '{{ $component->getTableRowUrlTarget($row) ?? '_self' }}')"
            @endif
            {{
                $attributes->merge($customAttributes)
                    ->class(['text-center px-6 py-1 whitespace-nowrap text-sm font-medium dark:text-gray-400' => $customAttributes['default'] ?? true])
                    ->class(['hidden sm:table-cell' => $column && $column->shouldCollapseOnMobile()])
                    ->class(['hidden md:table-cell' => $column && $column->shouldCollapseOnTablet()])
                    ->except('default')
            }}
        >
        {{ $slot }}
    @else | isClickable())
                onclick="window.open('{{ $component->getTableRowUrl($row) }}', '{{ $component->getTableRowUrlTarget($row) ?? '_self' }}')"
            @endif
            {{
                $attributes->merge($customAttributes)
                    ->class(['px-6 py-1 whitespace-nowrap text-sm font-medium dark:text-gray-400' => $customAttributes['default'] ?? true])
                    ->class(['hidden sm:table-cell' => $column && $column->shouldCollapseOnMobile()])
                    ->class(['hidden md:table-cell' => $column && $column->shouldCollapseOnTablet()])
                    ->except('default')
            }}
        >
        {{ \Illuminate\Support\Str::limit($slot, 20, '...') }}
    {{-- @php
        $is_button = substr($slot, 0, 1) == '<';
    @endphp --}}
    {{-- @if ($is_button)
        {{ $slot }}
    @else
        {{ \Illuminate\Support\Str::limit($slot, 20, '...') }}
    @endif --}}@endif
@elseif ($theme === 'bootstrap-4' || $theme === 'bootstrap-5') | isClickable())
            onclick="window.open('{{ $component->getTableRowUrl($row) }}', '{{ $component->getTableRowUrlTarget($row) ?? '_self' }}')"
            style="cursor:pointer"
        @endif
        {{
            $attributes->merge($customAttributes)
                ->class(['' => $customAttributes['default'] ?? true])
                ->class(['d-none d-sm-table-cell' => $column && $column->shouldCollapseOnMobile()])
                ->class(['d-none d-md-table-cell' => $column && $column->shouldCollapseOnTablet()])
                ->except('default')
        }}
    >
        {{ $slot }}@endif |