var SubscriptionStatus;
(function (SubscriptionStatus) {
    SubscriptionStatus["Incomplete"] = "incomplete";
    SubscriptionStatus["IncompleteExpired"] = "incomplete_expired";
    SubscriptionStatus["Trialing"] = "trialing";
    SubscriptionStatus["Active"] = "active";
    SubscriptionStatus["PastDue"] = "past_due";
    SubscriptionStatus["Canceled"] = "canceled";
    SubscriptionStatus["Unpaid"] = "unpaid";
    SubscriptionStatus["Expired"] = "expired";
    SubscriptionStatus["Paused"] = "paused";
})(SubscriptionStatus || (SubscriptionStatus = {}));
export class SubscriptionStatusUtil {
    static isSubscriptionActive(status) {
        if (!status) {
            return true;
        }
        return (status === SubscriptionStatus.Active ||
            status === SubscriptionStatus.Trialing ||
            status === SubscriptionStatus.PastDue);
    }
    static isSubscriptionInactive(status) {
        return !SubscriptionStatusUtil.isSubscriptionActive(status);
    }
    static isSubscriptionOverdue(status) {
        if (!status) {
            return false;
        }
        return status === SubscriptionStatus.PastDue;
    }
    // is subscription canclled.
    static isSubscriptionCancelled(status) {
        if (!status) {
            return false;
        }
        return (status === SubscriptionStatus.Canceled ||
            status === SubscriptionStatus.Unpaid ||
            status === SubscriptionStatus.Expired ||
            status === SubscriptionStatus.IncompleteExpired);
    }
}
export default SubscriptionStatus;
//# sourceMappingURL=SubscriptionStatus.js.map