package nextcloud

import "strings"

// IsExternalShare reports public or email link shares (not internal/user/group).
func IsExternalShare(share ShareInfo) bool {
	switch share.ShareType {
	case 4:
		return true
	case 3:
		if strings.EqualFold(strings.TrimSpace(share.Label), "internal") {
			return false
		}
		if strings.EqualFold(strings.TrimSpace(share.AccessMode), "internal") {
			return false
		}
		return true
	default:
		return false
	}
}
