isCopyable = $condition; return $this; } public function copyMessage(string | Closure | null $message): static { $this->copyMessage = $message; return $this; } public function copyMessageDuration(int | Closure | null $duration): static { $this->copyMessageDuration = $duration; return $this; } public function copyableState(string | Closure | null $state): static { $this->copyableState = $state; return $this; } public function getCopyMessage(): string { return $this->evaluate($this->copyMessage) ?? __('tables::table.columns.messages.copied'); } public function getCopyMessageDuration(): int { return $this->evaluate($this->copyMessageDuration) ?? 2000; } public function getCopyableState(): ?string { $state = $this->getState(); return $this->evaluate($this->copyableState, [ 'state' => $state, ]) ?? $state; } public function isCopyable(): bool { return $this->evaluate($this->isCopyable); } public function isClickDisabled(): bool { return parent::isClickDisabled() || $this->isCopyable(); } }