import { NgZone } from '@angular/core'; import { Observable } from 'rxjs'; import { KitPlatformService } from '../kit-platform/kit-platform.service'; import { KitMqParams } from './meta'; /** * Check or observe media query. * * ### Usage * * Provide breakpoints in the root module: * * ```typescript * ... * providers: [ * { * provide: kitMqBreakpoints, * useValue: { * mobile: '320px', * tablet: '740px', * desktop: '980px', * wide: '1300px', * }, * }, * ], * ``` * * Set of breakpoint is a fully customizable. * * Use the service: * * ```typescript * constructor(private mq: KitMqService) { * } * ... * // Check * const matches = this.mq.check({from: 'mobile', until: 'tablet'}); * ... * // Observe * this.mq.observe({from: 'tablet'}).subscribe(matches => { * }); * ``` * * @todo remove mq observer on destroy */ export declare class KitMqService { private platform; private zone; private breakpoints; private matchMedia; private mqs; constructor(platform: KitPlatformService, zone: NgZone, breakpoints: any); check(params: KitMqParams): boolean | null; checkRaw(mediaQuery: string): boolean | null; observe(params: KitMqParams): Observable; observeRaw(mediaQuery: string): Observable; private buildQuery; private concatQuery; private getMq; }