TextInput::make('slug') ->required() ->live($debounce = true) ->readOnly(function () use (&$isSlugReadOnly) { return $isSlugReadOnly ? true : false; }) ->maxLength(255) ->suffixAction( Action::make('allowSlugEdit') ->icon(function () use (&$isSlugReadOnly) { return $isSlugReadOnly ? 'heroicon-m-lock-closed' : 'heroicon-m-lock-open'; }) ->action(function () use (&$isSlugReadOnly) { $isSlugReadOnly = !$isSlugReadOnly; }) ),