isChecked = $value === 'true'; } public function render(): string { $attributes = [ 'id' => $this->value, 'name' => $this->name, 'class' => 'form-checkbox text-pine-500 border-black border-3 focus:ring-castopod w-6 h-6', ]; if ($this->required) { $attributes['required'] = 'required'; } $checkboxInput = form_checkbox( $attributes, 'yes', old($this->name) ? old($this->name) === $this->value : $this->isChecked, ); $hint = $this->hint === null ? '' : hint_tooltip($this->hint, 'ml-1'); return <<{$checkboxInput}{$this->slot}{$hint} HTML; } }