import { Injectable } from '@angular/core' ; import { DesignTokenHelper } from '@kirbydesign/core' ; import { WindowRef } from '../types/window-ref' ; @ Injectable ( { providedIn : 'root' , } ) export class PlatformService { constructor ( private windowRef ) { } isTouch ( ) { const isTouchDeviceQuery = '(pointer: coarse)' ; return this . windowRef . nativeWindow . matchMedia ( isTouchDeviceQuery ) . matches ; } isPhabletOrBigger ( ) { const query = `(min-width: ${ DesignTokenHelper . breakpoints . medium })` ; return this . windowRef . nativeWindow . matchMedia ( query ) . matches ; } }