<?php

namespace GriffinForms\Admin\Language;

class FileStorage extends \GriffinForms\Admin\Language\Settings
{
    private static $instance;
    
    public static function getInstance()
    {
        if (self::$instance == null)
        {
            self::$instance = new FileStorage();
        }
        
        return self::$instance;
    }
    
    private function __construct() 
    {
    }
    /**
     * Heading/label: Default storage mode
     */
    public function filesDefaultStorageModeLabel()
    {
        return __('Default storage location', 'griffinforms-form-builder');
    }

    /**
     * Description: Default storage mode
     */
    public function filesDefaultStorageModeDescription()
    {
        return __('Where uploaded files are saved by default. Use “Private” for non-public storage or “Media Library” to create WordPress attachments. This global default can be overridden in the settings for individual file upload fields.', 'griffinforms-form-builder');
    }

    /**
     * Option: Private (storage mode)
     */
    public function filesDefaultStorageModePrivate()
    {
        return __('Private (not publicly accessible)', 'griffinforms-form-builder');
    }

    /**
     * Option: Media Library (storage mode)
     */
    public function filesDefaultStorageModeMediaLibrary()
    {
        return __('Media Library (creates attachments)', 'griffinforms-form-builder');
    }

    /**
     * Label: delete attached files on submission delete
     */
    public function filesDeleteOnSubmissionDeleteLabel()
    {
        return __('Delete attachments when a submission is deleted', 'griffinforms-form-builder');
    }

    /**
     * Description: delete on submission delete
     */
    public function filesDeleteOnSubmissionDeleteDescription()
    {
        return __('When enabled, removing a submission also deletes its attached files. Disable to keep files even after the submission is removed.', 'griffinforms-form-builder');
    }

    /**
     * Label: temp retention hours
     */
    public function filesTempRetentionHoursLabel()
    {
        return __('Temporary files retention (hours)', 'griffinforms-form-builder');
    }

    /**
     * Description: temp retention hours
     */
    public function filesTempRetentionHoursDescription()
    {
        return __('How long temporary uploads are kept if a form is not submitted. Applies only to new uploads — already uploaded temporary files keep the expiry set at their upload time. Expired files are removed automatically by the cleanup scheduler.', 'griffinforms-form-builder');
    }

    /**
     * Label: cleanup recurrence
     */
    public function filesCleanupRecurrenceLabel()
    {
        return __('Cleanup frequency', 'griffinforms-form-builder');
    }

    /**
     * Description: cleanup recurrence
     */
    public function filesCleanupRecurrenceDescription()
    {
        return __('How often the scheduler should run to purge expired temporary files.', 'griffinforms-form-builder');
    }

    /**
     * Recurrence options
     */
    public function recurrenceHourly()
    {
        return __('Hourly', 'griffinforms-form-builder');
    }

    public function recurrenceTwiceDaily()
    {
        return __('Twice Daily', 'griffinforms-form-builder');
    }

    public function recurrenceDaily()
    {
        return __('Daily', 'griffinforms-form-builder');
    }

    /**
     * Label: zip max size (MB)
     */
    public function filesZipMaxSizeMbLabel()
    {
        return __('Max ZIP download size (MB)', 'griffinforms-form-builder');
    }

    /**
     * Description: zip max size (MB)
     */
    public function filesZipMaxSizeMbDescription()
    {
        return __('Upper limit for “Download all as ZIP”. Larger archives will be refused to protect server resources.', 'griffinforms-form-builder');
    }

    /**
     * Label: storage alert threshold (MB)
     */
    public function filesStorageAlertThresholdMbLabel()
    {
        return __('Storage usage alert (MB)', 'griffinforms-form-builder');
    }

    /**
     * Description: storage alert threshold (MB)
     */
    public function filesStorageAlertThresholdMbDescription()
    {
        return __('Show an admin alert when total storage used by attached files exceeds this threshold. Set 0 to disable.', 'griffinforms-form-builder');
    }

    public function filesInvalidStorageModeError()
    {
        return __('Invalid storage mode selected.', 'griffinforms-form-builder');
    }

    public function filesInvalidTempRetentionHoursError()
    {
        return __('Temporary retention hours must be a positive integer.', 'griffinforms-form-builder');
    }

    public function filesInvalidCleanupRecurrenceError()
    {
        return __('Invalid cleanup recurrence option.', 'griffinforms-form-builder');
    }

    public function filesInvalidZipMaxSizeError()
    {
        return __('ZIP max size must be a positive number.', 'griffinforms-form-builder');
    }

    public function filesInvalidStorageAlertThresholdError()
    {
        return __('Storage alert threshold must be a non-negative number.', 'griffinforms-form-builder');
    }
}