package gateway

import (
	"strings"

	cardobservation "github.com/break/junhong_cmp_fiber/internal/domain/cardobservation"
	"github.com/break/junhong_cmp_fiber/pkg/constants"
)

// ParseCardNetworkStatus 将 Gateway 卡状态转换为系统网络状态。
// 只有网关明确返回“正常”才视为开机；“准备”或“待激活”不能按正常卡展示。
func ParseCardNetworkStatus(cardStatus, extend string) (int, bool) {
	return cardobservation.MapGatewayNetworkStatus(cardStatus, extend)
}

// IsGatewayCardStopped 判断 Gateway 是否明确返回停机状态。
func IsGatewayCardStopped(cardStatus string) bool {
	return strings.TrimSpace(cardStatus) == constants.GatewayCardStatusStopped
}
