package cn.iocoder.yudao.module.order.enums;

import cn.hutool.core.util.ArrayUtil;
import cn.iocoder.yudao.framework.common.util.json.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

@AllArgsConstructor
@Getter
public enum OrderSeaTimeEnum implements IntArrayValuable {

    SEA_ORDER_PLACED(200, "下单", "Order placed", "Commande passée","","",""),
    //    SEA_IN_WAREHOUSE(520201, "入仓", "Warehousing", "货物已入捷道%s，本次入仓%s件，总入仓%s件","The There are %s ctns been arrived in E&C %s，TTL ctns are %s."),
    SEA_IN_WAREHOUSE(520201, "入仓","Received", "Reçu", "货物已入捷道%s，本次入仓%s件，总入仓%s件","%s ctns have been arrived at E&C %s warehouse，TTL ctns are %s.","%s colis sont arrivés à l'entrepôt E&C %s, total est  %s."),
    //    SEA_IN_WAREHOUSE_REMARK(520201, "入仓", "Warehousing", "货物已入捷道%s，本次入仓%s件，总入仓%s件，未到齐","%s ctns have been arrived at E&C %s warehouse，TTL ctns are %s. Incomplete"),
    SEA_IN_WAREHOUSE_REMARK(520201, "入仓","Received", "Reçu", "货物已入捷道%s，总入仓%s件，未到齐","%s ctns have been arrived at E&C %s warehouse，TTL ctns are %s. Incomplete","%s colis sont arrivés à l'entrepôt E&C %s, total est %s. manque"),
    SEA_INSTALLED_CABINET(320412,"装柜", "Loaded","Chargé","货物已装柜，发往码头，预计%s日期开船","Goods have been loaded and sent to the port, The ETD is %s.","Le produit a été chargé et envoyé au port. ETD environ est %s."),
    SEA_CUSTOMS_IN_PROGRESS(120413, "报关","Customs Declaration", "déclaration en douane", "由于%s原因，待放行","Due to %s reasons, still waiting for departure","En raison de %s, en attente de départ."),
    SEA_CUSTOMS_PASS_SEA(120325, "报关","Customs Declaration", "déclaration en douane", "货物报关已放行，等待起运","shipment been released by China custom, the ETD is %s","Le produit a été libéré par la douane chinoise, ETD environ est %s."),
    SEA_CUSTOMS_FULL_EXIT(120323, "报关","Customs Declaration", "déclaration en douane", "报关查验退场，返回仓库中","Goods inspected by China customs, will return back to the warehouse","le produit a été libéré par la douane chinoise, en attente de retour à l'entrepôt."),
    SEA_HAS_TAKEN_OFF(13042601, "起运","Shipping", "Départ", "货物航运中，预计在%s日期到港","Departed, the ETA is:%s.","le produit a quitté la Chine. ETA environ est du %s."),
    SEA_HAS_TAKEN_OFF_DELAY(13042602, "起运","Shipping", "Départ", "由于%s原因，延误起运","Delayed in sailing due to %s","en raison de %s.départ retardée"),
    SEA_ARRIVED(14032801, "到港","Arrived", "Arrivé", "货物已到港，清关中","Already arrived the port of destination, waiting for the clearance of goods.","le produit est arrivé au port de %s, en train de dédouaner."),
    SEA_ARRIVED_DELAY(14032802, "到港","Arrived", "Arrivé", "由于%s原因，延误抵达目的地","Due to %s reasons, delayed arrival at the destination","En raison de %s, arrivée retardée à destination."),
    SEA_CLEARED_DELAY(14032803, "清关","Under clearing", "Dédouane", "由于%s原因，待清关","Due to %s reasons, clearance of goods is pending","En raison de %s, le dédouanement est en attente."),
    SEA_CLEARED(150330, "清关","cleared", "Dédouané", "货物已清关","Customs clearance of the shipment has been completed.","le produit a été dédouané."),
    SEA_UNLOADED_CABINET(162180,"到仓","Unloaded", "Déchargé","货物已抵达捷道%s提货仓","The goods has been delivered to E&C %s branch.","le produit a été arrivé à l‘entrepôt de destination E&C %s."),
    SEA_UNLOADED_CABINET_DELAY(16043502,"到仓","Unloaded", "Déchargé","由于%s原因，延误到仓时间","Due to %s reasons, the unloaded time is delayed","En raison de %s, le temps d'arrivée est retardé."),
    SEA_PICKED_UP(2000, "提货","Collected", "Retiré", "货物已提货，本次提货%s件，剩余%s件","%s ctns have been picked up by the consignee，remaining %s ctns in E&C branch.","%s colis ont été récupérés par le destinataire, il reste %s colis dans la branche E&C."),
//    SEA_PICKED_UP_FINISH(2000, "提货", "Picked up", "货物已提货","The shipment been picked up"),
    SEA_WAREHOUSE_WITHDRAWAL(7206, "退仓","Returned", "Retourné", "货物已退仓","The goods have been returned to the sender","Les marchandises ont été retournées à l'expéditeur."),
    SEA_ORDER_CANCEL(8800, "取消订单","Order Cancelled", "Commande annulée", "","",""),


    ;


    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(OrderSeaTimeEnum::getValue).toArray();

    /**
     * key
     */
    private final Integer value;
    /**
     * 类型中文名
     */
    private final String nameZh;

    /**
     * 类型英文名
     */
    private final String nameEn;
    /**
     * 类型法文名
     */
    private final String nameFr;

    /**
     * 备注中文名
     */
    private final String remarksZh;

    /**
     * 备注英文名
     */
    private final String remarksEn;
    /**
     * 备注英文名
     */
    private final String remarksFr;



    public static OrderSeaTimeEnum valueOf(Integer value) {
        return ArrayUtil.firstMatch(orderStatus -> orderStatus.getValue().equals(value), OrderSeaTimeEnum.values());
    }

    @Override
    public int[] array() {
        return ARRAYS;
    }

}
