import { EventEmitter, Component, Input, Output, } from '@angular/core'; import {Options, Theme} from '../../state'; import { ApplicationErrorType, ApplicationError, } from '../../../communication'; @Component({ selector: 'render-error', template: require('./render-error.html'), host: { '[class.dark]': 'isDevtoolsDarkTheme' } }) export class RenderError { @Input() private error: ApplicationError; @Output() private reportError: EventEmitter = new EventEmitter(); private isDevtoolsDarkTheme = this.setIsDarkTheme(); private ApplicationErrorType = ApplicationErrorType; constructor(private options: Options) { } setIsDarkTheme() { return (chrome.devtools.panels).themeName === 'dark' && this.options.theme === Theme.Dark; } }