'$refresh', ]; public function mount(string $status = null, $id = 0, $type = null) { $this->type = $type; $this->id ??= $id; $this->status = Status::tryFrom($status) ?? Status::Success; } public function getColorClasses(): string { return match ($this->status) { Status::Success => 'bg-green-100 text-green-700', Status::Failed => 'bg-red-100 text-red-700', Status::Pending => 'bg-gray-100 text-gray-600', }; } public function setStatus(string $status): void { $this->status = Status::tryFrom($status) ?? Status::Success; } public function refreshPage() { $this->dispatch('Badge:refresh'); } public function render() { return view('livewire.components.badge'); } }