<?php

namespace GriffinForms\Admin\Language;

class Forms extends \GriffinForms\Admin\Language\Lists
{
    private static $instance;
    
    protected function formsListHeading()
    {
        return __('All Forms', 'griffinforms-form-builder');
    }
    
    protected function addNewForm()
    {
        return __('Add New Form', 'griffinforms-form-builder');
    }
    
    protected function formsSearchBtnLabel()
    {
        return __('Search Forms', 'griffinforms-form-builder');
    }
    
    protected function noItemsFound()
    {
        return __('No forms found.', 'griffinforms-form-builder');
    }
    
    protected function allFoldersFolderFilter()
    {
        return __('All Folders', 'griffinforms-form-builder');
    }
    
    protected function rootFolderFolderFilter()
    {
        return __('Root', 'griffinforms-form-builder');
    }
    
    protected function nameListHead()
    {
        return __('Form Name', 'griffinforms-form-builder');
    }
    
    protected function shortcodeListHead()
    {
        return __('Shortcode', 'griffinforms-form-builder');
    }

    protected function folderListHead()
    {
        return __('Folder', 'griffinforms-form-builder');
    }
    
    protected function formpagesListHead()
    {
        return __('Pages', 'griffinforms-form-builder');
    }
    
    protected function submissionsListHead()
    {
        return __('Submissions', 'griffinforms-form-builder');
    }

    protected function themeListHead()
    {
        return __('Theme', 'griffinforms-form-builder');
    }

    protected function publishListHead()     { return __('Publish', 'griffinforms-form-builder'); }
    protected function idListHead()          { return __('ID', 'griffinforms-form-builder'); }
    protected function descriptionListHead() { return __('Description', 'griffinforms-form-builder'); }
    protected function statusListHead()      { return __('Status', 'griffinforms-form-builder'); }
    protected function originListHead()      { return __('Origin', 'griffinforms-form-builder'); }
    protected function lasteditedListHead()  { return __('Last Edited', 'griffinforms-form-builder'); }
    protected function lasteditorListHead()  { return __('Last Editor', 'griffinforms-form-builder'); }
    protected function complianceListHead()  { return __('Compliance', 'griffinforms-form-builder'); }

    protected function copyShortcodeBtn()
    {
        return __('Copy shortcode', 'griffinforms-form-builder');
    }

    protected function copiedLabel()
    {
        return __('Copied!', 'griffinforms-form-builder');
    }

    protected function editRowAction()
    {
        return __('Settings', 'griffinforms-form-builder');
    }
    
    protected function layoutRowAction()
    {
        return __('Builder', 'griffinforms-form-builder');
    }
    
    protected function exportRowAction()
    {
        return __('Download', 'griffinforms-form-builder');
    }
    
    protected function uploadForm()
    {
        return __('Upload Form', 'griffinforms-form-builder');
    }
    
    protected function uploadFormModalHeader()
    {
        return __('Upload Form', 'griffinforms-form-builder');
    }
    
    protected function uploadFormActionBtn()
    {
        return __('Upload', 'griffinforms-form-builder');
    }

    protected function createForm()
    {
        return __('Create Form', 'griffinforms-form-builder');
    }

    public function formTemplatesCategory($category)
    {
        $category_names = [
            'All Templates' => __('All', 'griffinforms-form-builder'),
            'Application' => __('Application', 'griffinforms-form-builder'),
            'Contact' => __('Contact', 'griffinforms-form-builder'),
            'Academic' => __('Academic', 'griffinforms-form-builder'),
            'Registration' => __('Registration', 'griffinforms-form-builder'),
            'Signup' => __('Signup', 'griffinforms-form-builder'),
        ];

        if (in_array($category, array_keys($category_names))) {
            return $category_names[$category];
        } else {
            return $category;
        }
    }

    protected function selectFormFile()
    {
        return __('Select File (JSON)', 'griffinforms-form-builder');
    }

    protected function importFormFile()
    {
        return __('Import', 'griffinforms-form-builder');
    }

    protected function blankFormName()
    {
        return __('Form Name', 'griffinforms-form-builder');
    }

    protected function blankFormDescription()
    {
        return __('Form Description', 'griffinforms-form-builder');
    }

    protected function deleteFormsBulkAction()
    {
        return __('Delete Forms', 'griffinforms-form-builder');
    }

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

    protected function noFormsSelectedModalText()
    {
        return __('You have not selected any forms.', 'griffinforms-form-builder');
    }

    protected function deleteSelectedFormsModalText()
    {
        return __('You have selected <strong class="text-griffin">0</strong> forms for deletion.', 'griffinforms-form-builder');
    }

    protected function deleteFormSubmissionsModalText()
    {
        return __('Also permanently delete all submissions for this form?', 'griffinforms-form-builder');
    }

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

    protected function deleteListItemModalText()
    {
        return __('Delete this form permanently? This action cannot be undone.', 'griffinforms-form-builder');
    }
    
    public static function getInstance()
    {
        if (self::$instance == null)
        {
            self::$instance = new Forms();
        }
        
        return self::$instance;
    }
    
    private function __construct() 
    {
    }
}
