{ "version": 3, "sources": ["src/@omnial/pages/blog-category/blog-category.component.ts", "src/app/pages/blog-category/blog-category.component.html", "src/@omnial/pages/blog-category/blog-category-routing.module.ts", "src/@omnial/pages/blog-category/blog-category.module.ts"], "sourcesContent": ["import { Component, Input, OnInit } from '@angular/core';\nimport { Subscription } from 'rxjs';\nimport { fadeInLeftAnimation } from 'src/@omnial/_animations/fade-in-left.animation';\nimport { fadeInRightAnimation } from 'src/@omnial/_animations/fade-in-right.animation';\nimport { fadeInUpAnimation } from 'src/@omnial/_animations/fade-in-up.animation';\nimport { scaleInAnimation } from 'src/@omnial/_animations/scale-in.animation';\nimport { Blog, BlogCategory, BlogPost } from 'src/@omnial/_models/catalog/blog.model';\nimport { BlogService } from 'src/@omnial/_services/catalog/blog.service';\nimport { AppSettings } from 'src/app/app.settings';\n\n@Component({\n selector: 'app-blog-category',\n templateUrl: './../../../app/pages/blog-category/blog-category.component.html',\n styleUrls: ['./../../../app/pages/blog-category/blog-category.component.scss'],\n animations: [fadeInUpAnimation, fadeInLeftAnimation, fadeInRightAnimation, scaleInAnimation],\n standalone: false\n})\n\nexport class BlogCategoryComponent implements OnInit {\n @Input() blog: Blog;\n @Input() currentBlogCategory: BlogCategory;\n @Input() blogCategoryId: number;\n public searchedPosts: BlogPost[] = [];\n public showSearchResults = false;\n private subscriptions: Subscription[] = []\n\n constructor(public settings: AppSettings,\n public blogService: BlogService) { }\n\n ngOnInit(): void {\n if (this.blogCategoryId && !this.currentBlogCategory) {\n this.subscriptions.push(this.blogService.blog.subscribe(\n res => {\n if (res) {\n this.blog = res as Blog;\n this.blog.categories.forEach((category) => {\n if (category.id === this.blogCategoryId) {\n this.currentBlogCategory = category;\n }\n });\n } else {\n this.blogService.load();\n }\n }));\n }\n }\n\n public searchResults(posts: BlogPost[]): void {\n this.searchedPosts = posts;\n this.showSearchResults = true;\n }\n}\n\n", "