<?php

/**
 * Copyright 2024-2025 Simply.IN Sp. z o.o.
 *
 * NOTICE OF LICENSE
 *
 * Licensed under the EUPL-1.2 or later.
 * You may not use this work except in compliance with the Licence.
 *
 * Copy of the Licence is available at:
 * https://joinup.ec.europa.eu/software/page/eupl
 * It is bundled with this package in the file LICENSE.txt
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the Licence is distributed on an as is basis,
 * without warranties or conditions of any kind, either express or implied.
 * Check the Licence for the specific language governing permissions
 * and limitations under the License.
 *
 * @author   Simply.IN Sp. z o.o.
 * @copyright 2024-2025 Simply.IN Sp. z o.o.
 * @license   https://joinup.ec.europa.eu/software/page/eupl
 */

declare(strict_types=1);

namespace SimplyIn\BackOffice;

if (!defined('_PS_VERSION_')) {
    exit;
}

enum ConfigurationKey: string
{
    case SECRET_KEY = 'SIMPLYIN_SECRET_KEY';
    case CONNECTED = 'SIMPLYIN_CONNECTED';
    case SAVE_CHECKBOX = 'SIMPLYIN_SAVE_CHECKBOX';
    case SAVE_CHECKBOX_OVERRIDDEN = 'SIMPLYIN_SAVE_CHECKBOX_OVERRIDDEN';
    case CHECKBOX_FORCED_DISABLED = 'SIMPLYIN_CHECKBOX_FORCED_DISABLED';
    case DOCS_INFO = 'SIMPLYIN_DOCS_INFO';
    case LAST_UPDATE_INFO = 'SIMPLYIN_LAST_UPDATE_INFO';
    case SWITCH_LASTCHANGE = 'SIMPLYIN_SWITCH_LASTCHANGE';
    case TRANS_HISTORY_LENGTH_DAY = 'SIMPLYIN_TRANS_HISTORY_LENGTH_DAY';
    case LOGISTICS_PARTNERS_ORDER = 'SIMPLYIN_LOGISTICSPARTNERSORDER';

    case DPD_CARRIER_ID = 'SIMPLYIN_DPD_CARRIER_ID';
    case DHL_CARRIER_ID = 'SIMPLYIN_DHL_CARRIER_ID';
    case FEDEX_CARRIER_ID = 'SIMPLYIN_FEDEX_CARRIER_ID';
    case INPOST_CARRIER_ID = 'SIMPLYIN_INPOST_CARRIER_ID';
    case ORLEN_CARRIER_ID = 'SIMPLYIN_ORLEN_CARRIER_ID';
    case UPS_CARRIER_ID = 'SIMPLYIN_UPS_CARRIER_ID';
    case DEFAULT_CARRIER_ID = 'SIMPLYIN_DEFAULT_CARRIER_ID';

    case PAYMENTS_ENABLED = 'SIMPLYIN_PAYMENTS';
    case PAYMENT_STATUS_PENDING = 'SIMPLYIN_PAYMENT_STATUS_PENDING';
    case PAYMENT_STATUS_CANCELED = 'SIMPLYIN_PAYMENT_STATUS_CANCELED';

    case BAR_ENABLED = 'SIMPLYIN_BAR_ENABLED';
    case BAR_COLOR = 'SIMPLYIN_BAR_COLOR';
    case BADGE_COLOR = 'SIMPLYIN_BADGE_COLOR';
    case ACCENT_COLOR = 'SIMPLYIN_ACCENT_COLOR';
    case FONT_COLOR = 'SIMPLYIN_FONT_COLOR';

    /**
     * @return array<int, self> keys that map 1-1 to a carrier provider (excluding default)
     */
    public static function carrierProviderKeys(): array
    {
        return [
            self::DPD_CARRIER_ID,
            self::DHL_CARRIER_ID,
            self::FEDEX_CARRIER_ID,
            self::INPOST_CARRIER_ID,
            self::ORLEN_CARRIER_ID,
            self::UPS_CARRIER_ID,
        ];
    }
}
