label($label); $this->id(Str::slug(Str::transliterate($label, strict: true))); } public static function make(string $label): static { $static = app(static::class, ['label' => $label]); $static->configure(); return $static; } public function afterValidation(?Closure $callback): static { $this->afterValidation = $callback; return $this; } /** * @deprecated Use `afterValidation()` instead. */ public function afterValidated(?Closure $callback): static { $this->afterValidation($callback); return $this; } public function beforeValidation(?Closure $callback): static { $this->beforeValidation = $callback; return $this; } public function description(string | Closure | null $description): static { $this->description = $description; return $this; } public function icon(string | Closure | null $icon): static { $this->icon = $icon; return $this; } public function completedIcon(string | Closure | null $icon): static { $this->completedIcon = $icon; return $this; } public function callAfterValidation(): void { $this->evaluate($this->afterValidation); } public function callBeforeValidation(): void { $this->evaluate($this->beforeValidation); } public function getDescription(): ?string { return $this->evaluate($this->description); } public function getIcon(): ?string { return $this->evaluate($this->icon); } public function getCompletedIcon(): ?string { return $this->evaluate($this->completedIcon); } /** * @return array */ public function getColumnsConfig(): array { return $this->columns ?? $this->getContainer()->getColumnsConfig(); } public function canConcealComponents(): bool { return true; } }