<?php

namespace Plainwork\Ui\Component;

final class FlashMessage
{
    private $message = '';
    private bool $isError = false;

    public function __construct($message)
    {
        $this->message = $message;
    }

    public function getMessage()
    {
        return $this->message;
    }

    public function setError(bool $v = true): self
    {
        $this->isError = $v;

        return $this;
    }

    public function isError(): bool
    {
        return $this->isError;
    }
}
