isBadge = $condition; return $this; } public function bulleted(bool | Closure $condition = true): static { $this->isBulleted = $condition; return $this; } public function listWithLineBreaks(bool | Closure $condition = true): static { $this->isListWithLineBreaks = $condition; return $this; } public function limitList(int | Closure | null $limit = 3): static { $this->listLimit = $limit; return $this; } public function rowIndex(bool $isFromZero = false): static { $this->state(static function (HasTable $livewire, stdClass $rowLoop) use ($isFromZero): string { $rowIndex = $rowLoop->{$isFromZero ? 'index' : 'iteration'}; $recordsPerPage = $livewire->getTableRecordsPerPage(); if (! is_numeric($recordsPerPage)) { return (string) $rowIndex; } return (string) ($rowIndex + ($recordsPerPage * ($livewire->getTablePage() - 1))); }); return $this; } public function wrap(bool | Closure $condition = true): static { $this->canWrap = $condition; return $this; } public function size(TextColumnSize | string | Closure | null $size): static { $this->size = $size; return $this; } public function getSize(mixed $state): TextColumnSize | string | null { return $this->evaluate($this->size, [ 'state' => $state, ]); } public function canWrap(): bool { return (bool) $this->evaluate($this->canWrap); } public function isBadge(): bool { return (bool) $this->evaluate($this->isBadge); } public function isBulleted(): bool { return (bool) $this->evaluate($this->isBulleted); } public function isListWithLineBreaks(): bool { return $this->evaluate($this->isListWithLineBreaks) || $this->isBulleted(); } public function getListLimit(): ?int { return $this->evaluate($this->listLimit); } public function expandableLimitedList(bool | Closure $condition = true): static { $this->isLimitedListExpandable = $condition; return $this; } public function isLimitedListExpandable(): bool { return (bool) $this->evaluate($this->isLimitedListExpandable); } }