<?php

namespace Apps\Calendar\Decorator;

use Core\View\View;
use Core\View\ElementView;
use Core\Control\TextBox\TextBox;
use Core\Control\EntityListBox\EntityListBox;
use Core\Entity\Entity\Argument;


class CalendarDecorator {

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

    public function GetInfoEvent($event){

        $view = "<div class='info'>";
       
        if($event->DateEnd->Value){
         $view .= $this->Core->GetCode('Calendar.StartAt');   
        }
       
        $view .= "<label class='fa fa-calendar marginRight'>&nbsp".$event->DateStart->Value . "</label>";
    
        if($event->HourStart->Value){
            $view .= "<label class='fa fa-clock'>&nbsp".$event->HourStart->Value . "</label>";
        }

        if($event->DateEnd->Value){
            $view .= $this->Core->GetCode('Calendar.EndAt');
            $view .= "<label class='fa fa-calendar marginRight'>&nbsp".$event->DateEnd->Value . "</label>";
        }

        if($event->HourEnd->Value){
            $view .= "<label class='fa fa-clock marginRight'>&nbsp".$event->HourEnd->Value . "</label>";
        }

        if($event->Address->Value){
            $view .= "<label class='fa fa-map marginRight'>&nbsp; ".$event->Address->Value  ."</label>";
        }
        
        $view .= "</div>";

        return $view;
    }
}