{ "version": 3, "sources": ["src/app/pages/_client/artists/artists.component.ts", "src/app/pages/_client/artists/artists.component.html", "src/app/pages/_client/artists/artist/artist.component.ts", "src/app/pages/_client/artists/artist/artist.component.html", "src/app/pages/_client/client.page-routing.module.ts", "src/app/pages/_client/client.page.module.ts"], "sourcesContent": ["import { Component, Input, OnDestroy, OnInit } from '@angular/core';\nimport { AppSettings } from 'src/app/app.settings';\nimport { Subscription } from 'rxjs';\nimport { Category } from 'src/@omnial/_models/catalog/category.model';\nimport { Artist } from 'src/app/_models/artist.model';\nimport { ArtistService } from 'src/app/_services/artist.service';\n\n@Component({\n selector: 'app-artists',\n templateUrl: './artists.component.html',\n styleUrls: ['./artists.component.scss'],\n standalone: false\n})\nexport class ArtistsComponent implements OnDestroy {\n @Input() currentCategory: Category;\n public artists: Artist[] = [];\n public subscriptions: Subscription[] = [];\n\n constructor(public settings: AppSettings,\n public artistService: ArtistService) {\n this.subscriptions.push(this.artistService.artists.subscribe(\n res => {\n if (res) {\n this.artists = res as Artist[];\n } else {\n this.artistService.load();\n }\n }));\n }\n\n ngOnDestroy(): void {\n if (this.subscriptions && this.subscriptions.length > 0) {\n this.subscriptions.forEach((sub) => { sub.unsubscribe(); });\n }\n }\n}\n", "