<?php
/**
 * Shipment status helper for Nova Post WooCommerce plugin.
 *
 * @package NovaPostForWoocommerce\Helpers
 * @since   1.0.0
 */

namespace NovaPostForWoocommerce\Helpers;

/**
 * Shipment status helper class.
 */
class ShipmentStatusHelper {

    /**
     * Get text status by status code.
     *
     * @param int $status_code The status code.
     *
     * @return string The text status.
     */
    public static function get_text_status( $status_code ) {

        $statuses = array(
            1   => __( 'Not yet shipped', 'nova-post-for-woocommerce' ),
            2   => __( 'Not yet shipped', 'nova-post-for-woocommerce' ),
            4   => __( 'In transit to recipient', 'nova-post-for-woocommerce' ),
            5   => __( 'In transit to recipient', 'nova-post-for-woocommerce' ),
            6   => __( 'In transit to recipient', 'nova-post-for-woocommerce' ),
            7   => __( 'Delivered successfully', 'nova-post-for-woocommerce' ),
            8   => __( 'Delivered successfully', 'nova-post-for-woocommerce' ),
            9   => __( 'Received by recipient', 'nova-post-for-woocommerce' ),
            10  => __( 'Received by recipient', 'nova-post-for-woocommerce' ),
            11  => __( 'Received by recipient', 'nova-post-for-woocommerce' ),
            13  => __( 'In transit to recipient', 'nova-post-for-woocommerce' ),
            16  => __( 'In transit to recipient', 'nova-post-for-woocommerce' ),
            101 => __( 'In transit to recipient', 'nova-post-for-woocommerce' ),
            102 => __( 'Returning to sender', 'nova-post-for-woocommerce' ),
            103 => __( 'Refused by recipient', 'nova-post-for-woocommerce' ),
            104 => __( 'In transit to recipient', 'nova-post-for-woocommerce' ),
            105 => __( 'Delivery failed', 'nova-post-for-woocommerce' ),
            106 => __( 'Received by recipient', 'nova-post-for-woocommerce' ),
            111 => __( 'Delivery failed', 'nova-post-for-woocommerce' ),
            112 => __( 'Delivery failed', 'nova-post-for-woocommerce' ),
            999 => __( 'Not yet shipped', 'nova-post-for-woocommerce' ),
        );

        return $statuses[ $status_code ] ?? __( 'Unknown status', 'nova-post-for-woocommerce' );
    }
}
