<?php

namespace GriffinForms\Frontend\Html\Alerts;

use GriffinForms\Traits\Singleton;

class Format extends \GriffinForms\Frontend\Html\Format
{
    use Singleton;
    
    protected $meta;
    protected $lang;
    
    protected function setLang()
    {
        $language_class = '\GriffinForms\Frontend\Language\\' . $this->meta;
        $this->lang = $language_class::getInstance();
    }
    
    public function invalidItem($item_type, $item_id)
    {
        $text = $this->lang->getText('invalid_item', array('item_type' => $item_type, 'item_id' => $item_id));
        echo '<div class="alert alert-warning" role="alert">';
        echo wp_kses_post($text);
        echo '</div>';
    }
}