heading($heading); } public static function make(string | Htmlable | Closure $heading): static { $static = app(static::class, ['heading' => $heading]); $static->configure(); return $static; } protected function setUp(): void { parent::setUp(); $this->columnSpan('full'); } public function description(string | Htmlable | Closure | null $description = null): static { $this->description = $description; return $this; } public function heading(string | Htmlable | Closure $heading): static { $this->heading = $heading; return $this; } public function aside(bool | Closure | null $condition = true): static { $this->isAside = $condition; return $this; } public function getDescription(): string | Htmlable | null { return $this->evaluate($this->description); } public function getHeading(): string | Htmlable { return $this->evaluate($this->heading); } public function getId(): ?string { $id = parent::getId(); if (! $id) { $id = Str::slug($this->getHeading()); if ($statePath = $this->getStatePath()) { $id = "{$statePath}.{$id}"; } } return $id; } public function canConcealComponents(): bool { return $this->isCollapsible(); } public function isAside(): bool { return (bool) ($this->evaluate($this->isAside) ?? false); } public function icon(string | Closure | null $icon): static { $this->icon = $icon; return $this; } public function getIcon(): ?string { return $this->evaluate($this->icon); } public function formBefore(bool | Closure $condition = true): static { $this->isFormBefore = $condition; return $this; } public function isFormBefore(): bool { return (bool) $this->evaluate($this->isFormBefore); } }