<?php

namespace GriffinForms\Admin\Language;

Use GriffinForms\Admin\Language\FieldTypes;

abstract class Format extends \GriffinForms\Admin\Format
{   
    use FieldTypes;

    abstract static function getInstance();
    
    protected function todayDate()
    {
        return __('Today', 'griffinforms-form-builder');
    }
    
    protected function yesterdayDate()
    {
        return __('Yesterday', 'griffinforms-form-builder');
    }
    
    protected function save()
    {
        return __('Save', 'griffinforms-form-builder');
    }
    
    protected function itemnotupdated()
    {
        return __('Nothing to update', 'griffinforms-form-builder');
    }
    
    protected function noResults()
    {
        return __('No results found for', 'griffinforms-form-builder');
    }
    
    protected function resetSearch()
    {
        return __('Reset Search', 'griffinforms-form-builder');
    }
    
    protected function loadMoreFormStyle()
    {
        return __('Load More', 'griffinforms-form-builder');
    }
    
    protected function selectFolder()
    {
        return __('Select Folder', 'griffinforms-form-builder');
    }
    
    protected function folderDescriptionLabel()
    {
        return __('Folder Description', 'griffinforms-form-builder');
    }
    
    protected function loadMoreFolder()
    {
        return __('Load More', 'griffinforms-form-builder');
    }
    
    protected function field()
    {
        return __('field', 'griffinforms-form-builder');
    }
    
    protected function rowcolumn()
    {
        return __('column', 'griffinforms-form-builder');
    }
    
    protected function pagerow()
    {
        return __('row', 'griffinforms-form-builder');
    }
    
    protected function formpage()
    {
        return __('page', 'griffinforms-form-builder');
    }
    
    protected function success()
    {
        return __('Success!', 'griffinforms-form-builder');
    }
    
    protected function settings()
    {
        return __('Options', 'griffinforms-form-builder');
    }
    
    protected function editItem()
    {
        return __('Update', 'griffinforms-form-builder');
    }
    
    protected function cancelBtn()
    {
        return __('Cancel', 'griffinforms-form-builder');
    }    
    
    protected function addBtn()
    {
        return __('Add', 'griffinforms-form-builder');
    }
    
    protected function addNew()
    {
        return __('New', 'griffinforms-form-builder');
    }
    
    protected function moveToTrash()
    {
        return __('Delete', 'griffinforms-form-builder');
    }
    
    protected function folderLabel()
    {
        return __('Folder', 'griffinforms-form-builder');
    }
    
    protected function allFolders()
    {
        return __('All Folders', 'griffinforms-form-builder');
    }
    
    protected function itemUpdated()
    {
        return __('Successfully updated!', 'griffinforms-form-builder');
    }
    
    public function itemCreated($author, $date)
    {
        // Translators: %1$s is the author name, %2$s is the date of creation.
        $text = sprintf(__('Created by %1$s on %2$s.', 'griffinforms-form-builder'), $author, $date);
        return $text;
    }
    
    public function itemEdited($author, $date)
    {
        // Translators: %1$s is the author name, %2$s is the date of last editing.
        $text = sprintf(__('Edited by %1$s on %2$s.', 'griffinforms-form-builder'), $author, $date);
        return $text;
    }
    
    protected function required()
    {
        return '<em>(' . __('required', 'griffinforms-form-builder') . ')</em>';
    }
    
    protected function idLabel()
    {
        return __('ID', 'griffinforms-form-builder');
    }
    
    protected function formStyleLabel()
    {
        return __('Style', 'griffinforms-form-builder');
    }
    
    protected function nameLabel()
    {
        return __('Name', 'griffinforms-form-builder');
    }    
    
    protected function titleLabel()
    {
        return __('Heading', 'griffinforms-form-builder');
    }
    
    protected function descriptionLabel()
    {
        return __('Description', 'griffinforms-form-builder');
    }
    
    protected function cssClassLabel()
    {
        return __('CSS Class', 'griffinforms-form-builder');
    }
    
    protected function cssIdLabel()
    {
        return __('CSS ID', 'griffinforms-form-builder');
    }
    
    protected function createdLabel()
    {
        return __('Created', 'griffinforms-form-builder');
    }
    
    protected function top()
    {
        return __('Top', 'griffinforms-form-builder');
    }
    
    protected function left()
    {
        return __('Left', 'griffinforms-form-builder');
    }
    
    protected function right()
    {
        return __('Right', 'griffinforms-form-builder');
    }
    
    protected function bottom()
    {
        return __('Bottom', 'griffinforms-form-builder');
    }
    
    protected function centre()
    {
        return __('Centre', 'griffinforms-form-builder');
    }
    
    protected function hidden()
    {
        return __('Hidden', 'griffinforms-form-builder');
    }
    
    protected function invalidId()
    {
        return __('Invalid Object ID', 'griffinforms-form-builder');
    }
    
    protected function clickHere()
    {
        return __('Click here', 'griffinforms-form-builder');
    }    
    
    protected function general()
    {
        return __('General', 'griffinforms-form-builder');
    }    
    
    protected function category()
    {
        return __('Category', 'griffinforms-form-builder');
    }    
    
    protected function inherit()
    {
        return __('Inherit', 'griffinforms-form-builder');
    }    
    
    protected function yes()
    {
        return __('Yes', 'griffinforms-form-builder');
    }    
    
    protected function no()
    {
        return __('No', 'griffinforms-form-builder');
    }   
    
    protected function none()
    {
        return __('None', 'griffinforms-form-builder');
    }

    protected function styling()
    {
        return __('Style', 'griffinforms-form-builder');
    }
    
    protected function nameRequired()
    {
        return __('Name is required.', 'griffinforms-form-builder');
    }   
    
    protected function createFolder()
    {
        return __('Create New Folder', 'griffinforms-form-builder');
    }   
    
    protected function folderNameLabel()
    {
        return __('Name of your folder:', 'griffinforms-form-builder');
    }   
    
    protected function defaultFolderName()
    {
        return __('Root', 'griffinforms-form-builder');
    }   
    
    protected function defaultFormStyleName()
    {
        return __('Inherit', 'griffinforms-form-builder');
    }   
    
    protected function formStyleDescription()
    {
        return __('Apply a custom style to this item. Styles library is managed separately', 'griffinforms-form-builder');
    }   
    
    protected function deleteItem()
    {
        return __('Delete Item', 'griffinforms-form-builder');
    }   
    
    protected function confirmDeleteItem()
    {
        return __('Please confirm you wish to delete this item. If this item is part of other forms, it will also be removed from there.', 'griffinforms-form-builder');
    }
    
    protected function mayTakeTime()
    {
        return __('Due to the size of your database, searching may take a little time.', 'griffinforms-form-builder');
    }
    
    protected function checkItemRelations()
    {
        return __('Click here to check.', 'griffinforms-form-builder');
    }
    
    protected function saveActionBtn()
    {
        return __('Save', 'griffinforms-form-builder');
    }
    
    protected function getValueLabel()
    {
        return __('GET Key', 'griffinforms-form-builder');
    }

    protected function noFolderExist()
    {
        return __('No Folders Found', 'griffinforms-form-builder');
    }

    protected function noMessageExist()
    {
        return __('No Messages Found', 'griffinforms-form-builder');
    }

    protected function defaultMessageName()
    {
        return __('No message selected. Click here to select', 'griffinforms-form-builder');
    }

    protected function messageSubjectLabel()
    {
        return __('Message Subject', 'griffinforms-form-builder');
    }

    protected function goBackTopNavBtn()
    {
        return __('Back', 'griffinforms-form-builder');
    }

    protected function networkErrorMessage()
    {
        return __('A network error occurred. Please check your internet connection and try again.', 'griffinforms-form-builder');
    }

    protected function viewError()
    {
        return __('View', 'griffinforms-form-builder');
    }

    protected function backToList()
    {
        return __('Back', 'griffinforms-form-builder');
    }

    protected function backToFormBuilder()
    {
        return __('Back to Form Builder', 'griffinforms-form-builder');
    }

    public function getText($for, $context = null)
    {
        $method = $for . $context;
        $method = $this->purgeString($method);
        if (method_exists($this, $method)) {
            $str = $this->$method();
            return $str;
        } else {
            return $method . '' . __(' not found', 'griffinforms-form-builder');
        }
    }
}