shouldAutosize = $condition; return $this; } public function cols(int | Closure | null $cols): static { $this->cols = $cols; return $this; } public function rows(int | Closure | null $rows): static { $this->rows = $rows; return $this; } public function getCols(): ?int { return $this->evaluate($this->cols); } public function getRows(): ?int { return $this->evaluate($this->rows); } public function shouldAutosize(): bool { return $this->rows === null || ((bool) $this->evaluate($this->shouldAutosize)); } }