1 import { Component, Input, ViewChild } from '@angular/core'
2 import { VideoDetails } from '../../../shared/video/video-details.model'
3 import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
4 import { MarkdownService } from '@app/shared/renderer'
5 import { User } from '@app/shared'
8 selector: 'my-video-support',
9 templateUrl: './video-support.component.html',
10 styleUrls: [ './video-support.component.scss' ]
12 export class VideoSupportComponent {
13 @Input() video: VideoDetails = null
14 @Input() user: User = null
16 @ViewChild('modal', { static: true }) modal: NgbModal
21 private markdownService: MarkdownService,
22 private modalService: NgbModal
26 this.modalService.open(this.modal)
28 this.markdownService.enhancedMarkdownToHTML(this.video.support)
29 .then(r => this.videoHTMLSupport = r)