/**
 * Check if user requires email validaiton with proper fallback for older accounts.
 */
export const userRequiresEmailValidation = (user) => {
    return user.requiresEmailValidation === true;
};
/**
 * Check if user requires BigCommerce email verification.
 * Returns true if verified is explicitly false (user has started BC flow but not verified).
 * Returns false if verified is true or undefined (never used BC, or already verified).
 */
export const userRequiresBcVerification = (user) => {
    return user.appSettings?.bigcommerce?.verified === false;
};
/**
 * Check if user has completed BigCommerce email verification.
 */
export const userIsBcVerified = (user) => {
    return user.appSettings?.bigcommerce?.verified === true;
};
/**
 * Get the BigCommerce email validation token.
 */
export const getBcEmailValidationToken = (user) => {
    return user.appSettings?.bigcommerce?.emailValidationToken;
};
