isOptional = $value === 'true'; } public function render(): string { $labelClass = 'text-sm ' . $this->attributes['class']; unset($this->attributes['class']); $optionalText = $this->isOptional ? '(' . lang('Common.optional') . ')' : ''; $hint = $this->hint === null ? '' : hint_tooltip($this->hint, 'ml-1'); unset($this->attributes['isOptional']); unset($this->attributes['hint']); unset($this->attributes['slot']); $attributes = stringify_attributes($this->attributes); return <<{$this->slot}{$optionalText}{$hint} HTML; } }