'boolean', ]; protected bool $isSelected = false; protected string $hint = ''; #[Override] public function render(): string { $data = [ 'id' => $this->value, 'name' => $this->name, 'class' => 'form-radio-btn bg-elevated', ]; if ($this->isRequired) { $data['required'] = 'required'; } $radioInput = form_radio( $data, $this->value, old($this->name) ? old($this->name) === $this->value : $this->isSelected, ); $hint = $this->hint === '' ? '' : (new Hint([ 'class' => 'ml-1 text-base', 'slot' => $this->hint, ]))->render(); return <<getStringifiedAttributes()}"> {$radioInput} HTML; } }