kebab() ->replace('-', ' '); } } if (! function_exists('Filament\Support\locale_has_pluralization')) { function locale_has_pluralization(): bool { return (new MessageSelector())->getPluralIndex(app()->getLocale(), 10) > 0; } } if (! function_exists('Filament\Support\prepare_inherited_attributes')) { function prepare_inherited_attributes(ComponentAttributeBag $attributes): ComponentAttributeBag { $originalAttributes = $attributes->getAttributes(); $attributes->setAttributes( collect($originalAttributes) ->filter(fn ($value, string $name): bool => ! Str::of($name)->startsWith('x-')) ->mapWithKeys(fn ($value, string $name): array => [Str::camel($name) => $value]) ->merge($originalAttributes) ->all(), ); return $attributes; } }