import { DeviceLockStatus, DeviceStatus } from '@/utils/enums';

export const $device = {
  computed: {
    canUnlock() {
      return (row) => {
        return DeviceStatus.canAdminUnlock().includes(row.status)
          && DeviceLockStatus.LOCKED == row.lockStatus
      }
    },
    canLock() {
      return (row) => {
        return DeviceStatus.canLock().includes(row.status)
          && DeviceLockStatus.UNLOCKED == row.lockStatus
      }
    },
  }
}