[ 'icon' => 'ban', 'message' => '%s' ], 'page-not-allowed' => [ 'icon' => 'shield-ban', 'message' => "You do not have permission to access this page.\nRequired permission: %s" ], 'user-state-not-valid' => [ 'icon' => 'shield-ban', 'message' => "You do not have permission to access this page.\nYour user profile is incomplete: %s\nGo back to the forum for more details." ] ]; public array $errorArray; /** * Create a new component instance. */ public function __construct( public string $errorType, public string $message = "" ) { $this->errorArray = self::ERROR_TYPES[$errorType] ?? self::ERROR_TYPES['custom']; } /** * Get the view / contents that represent the component. */ public function render(): View|Closure|string { return view('components.error-block'); } }