<?php namespace Tussendoor\Reloadify\Models;

class SubscriptionCheckbox
{
    /**
     * The name of the checkbox in the checkout
     * 
     * @since 1.5.0 Name changed because checkbox can be present in the cart. 
     *              Original name = CHECKBOX_NAME_CHECKOUT
     */
    const CONSENT_CHECKBOX_NAME = 'wc_reloadify_subscriptions_consent';

    /**
     * The key for the session value when saving checkbox value to the session
     * 
     * @since 1.5.0
     */
    const CONSENT_CHECKBOX_SESSION_KEY = 'wc_reloadify_subscriptions_consent';

    /**
     * The key in the options table for different checkbox settings
     */
    const ADD_CHECKBOX_SETTING      = 'wc_reloadify_add_subscription_checkbox';
    const CHECKBOX_LABEL_SETTING    = 'wc_reloadify_checkbox_label_text';
    const CHECKBOX_STATUS_SETTING   = 'wc_reloadify_default_checkbox_status';
    const CHECKBOX_LOCATION_SETTING = 'wc_reloadify_checkbox_location';

    /**
     * Get the checkbox status options to be used in the settings
     * 
     * @return array
     */
    public function getCheckboxStatusOptions()
    {
        return [
            'checked'   => __('Checked', 'reloadify'),
            'unchecked' => __('Unchecked', 'reloadify'),
        ];
    }

    /**
     * Get the checkbox location options to be used in the settings
     * 
     * @return array
     */
    public function getCheckboxLocations()
    {
        return [
            'woocommerce_proceed_to_checkout'                   => __('Vóór de knop "Doorgaan naar checkout" (in de winkelmand)', 'tsd-reloadify'),
            'woocommerce_checkout_before_terms_and_conditions'  => __('Vóór algemene voorwaarden (bij het afrekenen)', 'tsd-reloadify'),
            'woocommerce_checkout_after_terms_and_conditions'   => __('Na algemene voorwaarden (bij het afrekenen)', 'tsd-reloadify'),
        ];
    }

}