'boolean', ]; protected bool $isSelected = false; protected string $description = ''; #[Override] public function render(): string { $data = [ 'id' => $this->value, 'name' => $this->name, 'class' => 'form-radio-btn bg-elevated', ]; if ($this->isRequired) { $data['required'] = 'required'; } $this->mergeClass('relative w-full'); $descriptionText = ''; if ($this->description !== '') { $describerId = $this->name . 'Help'; $descriptionText = <<{$this->description} HTML; $data['aria-describedby'] = $describerId; } $radioInput = form_radio( $data, $this->value, old($this->name) ? old($this->name) === $this->value : $this->isSelected, ); return <<getStringifiedAttributes()}"> {$radioInput} HTML; } }