import { IPlayground } from '../../../interfaces/IPlayground' ; import { ThemeStrategy } from './themes/theme-strategy' ; import { DocumentationType } from '../tokens/documentation.token' ; /**
 * This is the base implementation of a strategy to create code playground
 * for either Angular or AngularJS
 */ export abstract class PlaygroundStrategy { constructor ( protected documentationType , private _themeStrategy ) { } /** Get all the external scripts that should be loaded in the `head` of the HTML */ getGlobalExternalScripts ( assetsUrl ) { return [ ] ; } /** Allow adding custom script tags to the `head` element */ getGlobalScripts ( assetsUrl ) { return [ ] ; } /** Allow adding custom script tags to the `body` element */ getBodyScripts ( ) { return [ ] ; } /** Allow adding custom external script to the `body` element */ getBodyExternalScripts ( ) { return [ ] ; } /** Get all the external styles that should be loaded in the `head` of the HTML */ getGlobalExternalStyles ( assetsUrl ) { return this . _themeStrategy . getStylesheets ( assetsUrl ) ; } /** Allow adding custom style tags to the `head` element */ getGlobalStyles ( ) { return [ ] ; } /** Get the content of the `body` tag */ abstract getBody ( playground ) ; /** Get the files to include in the playground */ abstract getFiles ( playground , assetsUrl ) ; }