//
//  AppConfig.h
//  fastservice
//
//  Created by xuning on 5/5/25.
//  Copyright © 2025 FastService. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "UserInfo.h"
#import "LocalCache.h"

NS_ASSUME_NONNULL_BEGIN

@interface AppConfig : NSObject


@property (nonatomic,strong) UserInfo *user;

//当前开发环境 灰度 线上
+ (void)setEnvironmentType:(int)type;
+ (int)getEnvironmentType;

+ (void)setCurrentType:(UserCurrentType)type;

+ (UserCurrentType)getCurrentType;


+ (void)clearUserInfo;

+ (void)setUser:(UserInfo *)userInfo;


+ (UserInfo *)getUserInfo;

+ (NSString * )cookie;

+ (BOOL)needLogin;

//本地缓存
+ (void)saveLocalCache:(LocalCache *)lc;
+ (LocalCache *)getLocalCache;

//保存当前位置经纬度
+ (void)saveLocationCoordinate:(CLLocationCoordinate2D)coordinate;
+ (CLLocationCoordinate2D)getLocationCoordinate;
//保存和删除自定义的位置经纬度
+ (void)saveCustomLocationCoordinateWithLongitude:(NSString *)longitude Latitude:(NSString *)latitude;
+ (void)deleteCustomLocationCoordinate;

+ (void)saveLocationName:(NSString * )name;

+ (void)saveDistrictName:(NSString *)name;
+ (NSString *)getLocationName;
+ (NSString *)getDistrictName;

+ (void)saveShowLocationName:(NSString * )name;
+ (void)saveShowDistrictName:(NSString *)name;
//获取选择城市信息
+ (NSString *)getShowLocationName;
+ (NSString *)getShowDistrictName;

+ (void)saveGroupID:(int )group_id;
+ (int)getGroupID;

@end

NS_ASSUME_NONNULL_END
