*/ public function __construct( string $type = 'info', ?string $message = null, bool $dismissible = true ) { $this->type = $type; $this->message = $message; $this->dismissible = $dismissible; } /** * Biểu tượng gợi ý tương ứng với loại thông báo */ public function iconClass(): string { return match ($this->type) { 'success' => 'bi-check-circle-fill', 'danger', 'error' => 'bi-exclamation-octagon-fill', 'warning' => 'bi-exclamation-triangle-fill', default => 'bi-info-circle-fill', }; } /** * Render view của component */ public function render(): View|Closure|string { return view('components.alert'); } }