heading($heading); } public static function make(string | Htmlable | Closure $heading): static { $static = app(static::class, ['heading' => $heading]); $static->configure(); return $static; } /** * @param array | Schema | Component | Action | ActionGroup | string | Htmlable | Closure | null $components */ public function footer(array | Schema | Component | Action | ActionGroup | string | Htmlable | Closure | null $components): static { $this->childComponents($components, static::FOOTER_SCHEMA_KEY); return $this; } protected function configureChildSchema(Schema $schema, string $key): Schema { $schema = parent::configureChildSchema($schema, $key); if (in_array($key, [ static::FOOTER_SCHEMA_KEY, ])) { $schema ->inline() ->embeddedInParentComponent(); } return $schema; } public function heading(string | Htmlable | Closure $heading): static { $this->heading = $heading; return $this; } public function getHeading(): string | Htmlable { return $this->evaluate($this->heading); } public function toEmbeddedHtml(): string { $description = $this->getDescription(); $footer = $this->getChildSchema(static::FOOTER_SCHEMA_KEY)?->toHtmlString(); $heading = $this->getHeading(); $headingTag = $this->getHeadingTag(); $icon = $this->getIcon(); $iconColor = $this->getIconColor() ?? 'primary'; $iconSize = $this->getIconSize(); $isCompact = $this->isCompact(); $isContained = $this->isContained(); if (filled($iconSize) && (! $iconSize instanceof IconSize)) { $iconSize = IconSize::tryFrom($iconSize) ?? $iconSize; } $hasDescription = filled((string) $description); $hasFooter = filled((string) $footer); $hasIcon = filled($icon); $outerAttributes = (new FilamentComponentAttributeBag) ->merge($this->getExtraAttributes(), escape: false) ->class(['fi-sc-empty-state']); $sectionAttributes = (new FilamentComponentAttributeBag) ->class([ 'fi-empty-state', 'fi-compact' => $isCompact, 'fi-empty-state-not-contained' => ! $isContained, ]); ob_start(); ?>
toHtml() ?>>
toHtml() ?>>
class([ 'fi-empty-state-icon-bg', 'fi-color ' . ('fi-color-' . $iconColor) => $iconColor !== 'gray', ])->toHtml() ?> > color(IconComponent::class, $iconColor), size: $iconSize ?? IconSize::Large)?->toHtml() ?>
< class="fi-empty-state-heading"> >

toHtml() ?>