package com.cool.store.enums;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @Author suzhuhong
 * @Date 2025/11/5 16:03
 * @Version 1.0
 */
public enum SpecialTagEnum {

    ELECTRONIC_PRICE_LIST("电子价目牌"),
    ACTIVITY_CAROUSEL("活动轮播"),
    ACTIVITY_PACKAGE("活动套餐"),
    PROMOTIONAL_VIDEO("宣传视频");

    private final String tagName;

    SpecialTagEnum(String tagName) {
        this.tagName = tagName;
    }

    public String getTagName() {
        return tagName;
    }

    /**
     * 根据标签名称获取枚举值
     */
    public static SpecialTagEnum fromTagName(String tagName) {
        for (SpecialTagEnum tag : values()) {
            if (tag.getTagName().equals(tagName)) {
                return tag;
            }
        }
        return null;
    }

    /**
     * 获取所有标签名称列表
     */
    public static List<String> getAllTagNames() {
        return Arrays.stream(values())
                .map(SpecialTagEnum::getTagName)
                .collect(Collectors.toList());
    }

    /**
     * 获取电子价目牌标签名称
     * @return
     */
    public static List<String> getElectronicPriceTagName() {
        return Arrays.asList(ELECTRONIC_PRICE_LIST.getTagName());
    }

}
