<?php

namespace GriffinForms\Admin\Language;

class Submissions extends \GriffinForms\Admin\Language\Lists
{
    private static $instance;
    
    protected function submissionsListHeading()
    {
        return __('Submissions', 'griffinforms-form-builder');
    }
    
    protected function addNewForm()
    {
        return __('New Form', 'griffinforms-form-builder');
    }
    
    protected function submissionsSearchBtnLabel()
    {
        return __('Search Submissions', 'griffinforms-form-builder');
    }
    
    protected function allFormsFormFilter()
    {
        return __('All Forms', 'griffinforms-form-builder');
    }
    
    protected function statusCompleteFilter()
    {
        return __('Completed', 'griffinforms-form-builder');
    }
    
    protected function statusIncompleteFilter()
    {
        return __('Incomplete', 'griffinforms-form-builder');
    }

    protected function statuseditedFilter()
    {
        return __('Edited', 'griffinforms-form-builder');
    }
    
    protected function noItemsFound()
    {
        return __('No submissions found.', 'griffinforms-form-builder');
    }
    
    protected function pseudonymListHead()
    {
        return __('Submission', 'griffinforms-form-builder');
    }
    
    protected function authorListHead()
    {
        return __('Submitted by', 'griffinforms-form-builder');
    }
    
    protected function createdListHead()
    {
        return __('Received on', 'griffinforms-form-builder');
    }
    
    protected function formListHead()
    {
        return __('Form', 'griffinforms-form-builder');
    }
    
    protected function statusListHead()
    {
        return __('Status', 'griffinforms-form-builder');
    }

    protected function complianceListHead()
    {
        return __('Compliance', 'griffinforms-form-builder');
    }

    protected function idListHead()            { return __('ID', 'griffinforms-form-builder'); }
    protected function filecountListHead()     { return __('Attachments', 'griffinforms-form-builder'); }
    protected function revisionsListHead()     { return __('Revisions', 'griffinforms-form-builder'); }
    protected function submissionipListHead()  { return __('IP Address', 'griffinforms-form-builder'); }
    protected function sourceurlListHead()     { return __('Source Page', 'griffinforms-form-builder'); }
    protected function paymentstatusListHead() { return __('Payment Status', 'griffinforms-form-builder'); }
    protected function lasteditedListHead()    { return __('Last Edited', 'griffinforms-form-builder'); }

    public function formPseudonym($form_id)
    {
        // Translators: %d is the ID of the form.
        return sprintf(__('Form %d', 'griffinforms-form-builder'), $form_id);
    }
    
    protected function editRowAction()
    {
        return __('View', 'griffinforms-form-builder');
    }

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

    protected function readFilterLink()
    {
        return __('Read', 'griffinforms-form-builder');
    }

    protected function unreadFilterLink()
    {
        return __('Unread', 'griffinforms-form-builder');
    }

    protected function markReadBulkAction()
    {
        return __('Mark Read', 'griffinforms-form-builder');
    }

    protected function markUnreadBulkAction()
    {
        return __('Mark Unread', 'griffinforms-form-builder');
    }
    
    protected function formDoesNotExists()
    {
        return __('Form no longer exists', 'griffinforms-form-builder');
    }
    
    protected function saveEntriesNoEntries()
    {
        return __('This form is configured not to save any submissions.', 'griffinforms-form-builder');
    }
    
    protected function saveEntriesRecentTen()
    {
        return __('This form is configured to save only 10 most recent <em>completed</em> submissions.', 'griffinforms-form-builder');
    }
    
    protected function saveEntriesRecentFifty()
    {
        return __('This form is configured to save only 50 most recent <em>completed</em> submissions.', 'griffinforms-form-builder');
    }
    
    protected function saveEntriesRecentHundred()
    {
        return __('This form is configured to save only 100 most recent <em>completed</em> submissions.', 'griffinforms-form-builder');
    }
    
    protected function saveEntriesRecentThousand()
    {
        return __('This form is configured to save only 1000 most recent <em>completed</em> submissions.', 'griffinforms-form-builder');
    }
    
    public function formSettingsNotice($form_url)
    {
        // Translators: %s is a URL link to the form settings page.
        return sprintf(__('You can change it from <a href="%s">here</a>.', 'griffinforms-form-builder'), $form_url);
    }

    public function lifetimeSubmissionCountNotice($count)
    {
        // Translators: %s is the lifetime submission count.
        return sprintf(__('Lifetime submissions: %s.', 'griffinforms-form-builder'), $count);
    }

    protected function deleteListItemModalHeader()
    {
        return __('Delete Submission?', 'griffinforms-form-builder');
    }

    protected function deleteListItemModalText()
    {
        return __('Delete this submission permanently? This action cannot be undone.', 'griffinforms-form-builder');
    }

    protected function saveEntriesAllEntries()
    {
        return __('This form is saving all submissions.', 'griffinforms-form-builder');
    }

    protected function saveEntriesAlways()
    {
        return __('This form is saving all submissions.', 'griffinforms-form-builder');
    }
    
    public static function getInstance()
    {
        if (self::$instance == null)
        {
            self::$instance = new Submissions();
        }
        
        return self::$instance;
    }
    
    private function __construct() 
    {
    }
}
