{ "version": 3, "sources": ["src/@omnial/pages/topic/topic.component.ts", "src/app/pages/topic/topic.component.html", "src/@omnial/pages/topic/topic-routing.module.ts", "src/@omnial/pages/topic/topic.module.ts"], "sourcesContent": ["import { Component, Input, OnInit } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { fadeInUpAnimation } from 'src/@omnial/_animations/fade-in-up.animation';\nimport { Topic } from 'src/@omnial/_models/catalog/topic.model';\nimport { TopicService } from 'src/@omnial/_services/catalog/topic.service';\n\n@Component({\n selector: 'app-topic',\n templateUrl: './../../../app/pages/topic/topic.component.html',\n styleUrls: ['./../../../app/pages/topic/topic.component.scss'],\n animations: [fadeInUpAnimation],\n standalone: false\n})\n\nexport class TopicComponent implements OnInit {\n @Input() topicSlug: string;\n public currentTopic: Topic;\n public subscriptions: Subscription[] = [];\n\n constructor(public topicService: TopicService) { }\n\n ngOnDestroy(): void {\n if (this.subscriptions && this.subscriptions.length > 0) {\n this.subscriptions.forEach((sub) => { sub.unsubscribe(); });\n }\n }\n\n ngOnInit(): void {\n if (!this.currentTopic && this.topicSlug) {\n this.topicService.getTopicBySlug(this.topicSlug).subscribe(\n res => {\n if (res) {\n this.currentTopic = res as Topic;\n }\n });\n }\n }\n}\n", "