<?php

namespace apexl\Io\modules\display\components;

use apexl\Io\includes\Routes;
use apexl\Io\modules\component\entities\componentEntity;

class AlertTile extends componentEntity
{
    public function __construct()
    {
        parent::__construct();

        $this->addProperty('logoutUrl', Routes::getRoutePattern('user.logout'));
        $this->setAlertType('danger');
    }

    /**
     * @param $imgSrc
     * @return $this
     */
    public function addHeading($heading)
    {
        $this->addProperty('heading', $heading);
        return $this;
    }

    /**
     * @param $name
     * @return $this
     */
    public function addContent($content)
    {
        $this->addProperty('content', $content);
        return $this;
    }

    public function setAlertType($type)
    {
        $this->addProperty('alertType', 'alert-'.$type);
        return $this;
    }


}
