//
//  ConstantsSwift.swift
//  MCPlus
//
//  Created by seo ha on 13/02/2019.
//  Copyright © 2019 KangSH. All rights reserved.
//

import Foundation
import UIKit

@objcMembers
class Constants:NSObject {
    
    static let SERVICE_START_ADDR = "/login.page"
    static let PLATFORM_TYPE = "I"
    static let TO_NATIVE = "toNative"
    
    // API URI
    static let API_TYPE_VERSION_CHECK = "/mobile/version/appVersion"
    
    static let WOUND_IMG_URL = "/mobile/medical/inputWoundImg"
    
    // PACS App 정의 값
    static let PACS_APP_PRODUCT = "mobile"
    static let PACS_APP_RETURN_URL = "hanyang_mcp"
    static let PACS_APP_SCHEME = "igxp"
    static let PACS_APP_DOWNLOAD_ADDR = "https://itunes.apple.com/kr/app/infinitt-mobile-viewer/id458302392?l=en&mt=8"
    static let PACS_APP_ENC_KEY = "3c837d501a8f49b1"
    
    // Enums
    @objc enum ApiTaskNum:Int {
        case API_VERSION_CHECK = 100
        case API_TEST = 200
    }
    
    @objc enum PACS_APP_CALL_TYPE:Int {
        case L
        case W
        case S
        case V
    }
    
    // 함수정의
    @objc class func SET_IF_NOT_NULL(_ TARGET: Any, _ VAL: Any){
        if VAL != nil && (VAL is NSNull) == false {
            var _TARGET = TARGET
            _TARGET = VAL
        }
    }
    
    @objc class func MCRGB(_ r:CGFloat, _ g:CGFloat, _ b:CGFloat, _ a:CGFloat = 1) -> UIColor {
        return UIColor.init(red: r/255.0, green: g/255.0, blue: b/255.0, alpha: a)
    }
    
    static let kScreenWidth = UIScreen.main.bounds.size.width
    static let kScreenHeight = UIScreen.main.bounds.size.height
}
