<?php

namespace GriffinForms\Frontend\Language;

use GriffinForms\Traits\Singleton;

class Format extends \GriffinForms\Frontend\Format
{
    use Singleton;
    
    public function getText($for, $data = '')
    {
        $method = str_replace('_', '', $for) . 'Text';
        return $this->$method($data);
    }
    
    protected function invalidItemText($data)
    {
        // Translators: %1$s is the type of item (e.g., 'Form'), %2$d is the ID of the item.
        return sprintf(__('%1$s ID %2$d does not exist.', 'griffinforms-form-builder'), $data['item_type'], $data['item_id']);
    }
}