package app.furmeet.events.system.helper

import android.os.Build
import android.widget.TimePicker

var TimePicker.compatHour: Int
    get() =
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
            hour
        else
            @Suppress("DEPRECATION")
            currentHour
    set(v) =
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
            hour = v
        else
            @Suppress("DEPRECATION")
            currentHour = v


var TimePicker.compatMinute: Int
    get() =
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
            minute
        else
            @Suppress("DEPRECATION")
            currentMinute
    set(v) =
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M)
            minute = v
        else
            @Suppress("DEPRECATION")
            currentMinute = v