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 OrderAirTimeEnum implements IntArrayValuable {
    //1未使用
    AIR_ORDER_PLACED(200, "下单", "Order placed","Commande passée", "","",""),
//    AIR_IN_WAREHOUSE(520201, "入仓", "Warehousing", "货物已入捷道%s","The shipment has been delivered to E&C %s"),
    //    SEA_IN_WAREHOUSE(520201, "入仓", "Warehousing", "货物已入捷道%s，本次入仓%s件，总入仓%s件","%s ctns have been arrived at E&C %s warehouse，TTL ctns are %s."),
    AIR_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"),
    AIR_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"),
    AIR_PACKED(520202, "打包", "Repacked", "Remballé", "货物已完成二次打包","The shipment has been packed, waiting to be dispatched.","le produit a été emballé, En attente de libération."),// 打包完成时调用
    AIR_WAREHOUSED(320412,"出仓", "Dispatched", "Expédié","货物已出库，发往国际机场","One the way to China International airport.","En route vers l'aéroport international de Chine."),
    AIR_CUSTOMS_IN_PROGRESS(120413, "报关", "Customs Declaration", "déclaration en douane", "由于%s原因，待放行","Due to %s reasons, awaiting release","En raison de %s, En attente de libération."),
    AIR_CUSTOMS_PASS_AIR(120421, "报关", "Customs Declaration", "déclaration en douane", "货物报关已放行，候机中","shipment been released by China custom,","le produit a été libéré par la douane chinoise."),
    AIR_CUSTOMS_PART_EXIT(120414, "报关", "Customs Inspection", "Inspection douanière", "报关查验退场，返回仓库中","The shipment has been Inspected by China Customs,waiting to return back to the warehouse.","le produit a été inspecté par la douane chinoise, en attente de retour à l'entrepôt."),
    AIR_CUSTOMS_FULL_EXIT(120415, "报关", "Customs Inspection", "Inspection douanière", "报关查验退场，返回仓库中","The shipment has been Inspected by China Customs,waiting to return back to the warehouse.","le produit a été libéré par la douane chinoise, en attente de retour à l'entrepôt."),
    AIR_HAS_TAKEN_OFF(13042601, "起运", "Departed", "Départ", "货物已起飞，预计在%s日期抵达%s机场","The shipment has departed China.ETA date is %s to %s","le produit a quitté la Chine.ETA environ est du %s au %s."),
    AIR_HAS_TAKEN_OFF_DELAY(13042602, "起运", "Departed", "Départ", "由于%s原因，延误起飞","Delayed takeoff due to %s","en raison de %s.départ retardée"),
    AIR_ARRIVED(14032801, "到港", "Arrived Air Port", "Arrivé à l’aéroport", "货物已抵达%s机场，清关中","The shipment has arrived at %s airport.under clearing","le produit est arrivé à l'aéroport de %s, en train de dédouaner."),
    AIR_ARRIVED_DELAY(14032802, "到港", "Arrived Air Port", "Arrivé à l’aéroport", "由于%s原因，延误抵达目的地","Due to %s, delayed arrival at the destination","En raison de %s, Arrivée retardée à destination ."),
    AIR_CLEARED_DELAY(14032803, "清关", "Under clearing", "Dédouane", "由于%s原因，待清关","Due to %s, customs clearance is pending","En raison de %s, le dédouanement est en attente."),
    AIR_CLEARED(150330, "已清关", "Cleared", "Dédouané", "货物已清关","Shipment has been cleared","le produit a été dédouané."),
    AIR_UNLOADED_CABINET(16043501,"到仓", "Unloaded", "Déchargé","货物已抵达捷道%s提货仓","The shipment has been delivered to E&C %s pick up station.","le produit a été arrivé à l‘entrepôt de destination E&C %s."),
    AIR_UNLOADED_CABINET_DELAY(16043502,"到仓", "Unloaded", "Déchargé","由于%s原因，延误到仓时间","Due to %s, the arrival time is delayed","En raison de %s, le temps d'arrivée est retardé."),
//    AIR_PICKED_UP(2000, "提货", "Picked up", "货物已提货","The shipment been picked up "),
    AIR_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."),
    AIR_WAREHOUSE_WITHDRAWAL(7206, "退仓", "Returned", "Retourné", "货物已退仓","The goods have been returned to the sender","Les marchandises ont été retournées à l'expéditeur."),
    AIR_ORDER_CANCEL(8800, "取消订单", "Order Cancelled", "Commande annulée", "","",""),


    ;


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

    /**
     * key status+inWarehouseState+shipmentState的连接值
     */
    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 OrderAirTimeEnum valueOf(Integer value) {
        return ArrayUtil.firstMatch(orderStatus -> orderStatus.getValue().equals(value), OrderAirTimeEnum.values());
    }

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

}
