import { BaseComponentContext } from '@microsoft/sp-component-base' ; import { ISPService } from "./ISPService" ; import { Environment , EnvironmentType } from "@microsoft/sp-core-library" ; import SPServiceMock from "./SPServiceMock" ; import SPService from "./SPService" ; export class SPServiceFactory { public static createService ( context , includeDelay ? , delayTimeout ? , webAbsoluteUrl ? ) { if ( Environment . type === EnvironmentType . Local ) { return new SPServiceMock ( includeDelay , delayTimeout ) ; } return new SPService ( context , webAbsoluteUrl ) ; } }