|
1 | 1 | import { CommonModule } from '@angular/common'
|
2 | 2 | import { Component, ViewEncapsulation } from '@angular/core'
|
3 | 3 | import { RouterOutlet } from '@angular/router'
|
| 4 | +import type { NavigationItem } from '@seed/components' |
| 5 | +import { HorizontalNavigationComponent } from '@seed/components/navigation/horizontal/horizontal.component' |
4 | 6 | import { SharedImports } from '@seed/directives'
|
5 |
| -import { ProfileDeveloperComponent } from './developer/developer.component' |
6 |
| -import { ProfileInfoComponent } from './info/info.component' |
7 |
| -import { ProfileSecurityComponent } from './security/security.component' |
8 | 7 |
|
9 | 8 | @Component({
|
10 | 9 | selector: 'seed-profile',
|
11 | 10 | templateUrl: './profile.component.html',
|
12 | 11 | encapsulation: ViewEncapsulation.None,
|
13 |
| - imports: [CommonModule, SharedImports, ProfileInfoComponent, ProfileDeveloperComponent, ProfileSecurityComponent, RouterOutlet], |
| 12 | + imports: [CommonModule, HorizontalNavigationComponent, SharedImports, RouterOutlet], |
14 | 13 | })
|
15 | 14 | export class ProfileComponent {
|
16 | 15 | tabs = ['Profile Info', 'Security', 'Developer', 'Admin']
|
17 |
| - activeTab = 0 |
18 | 16 |
|
19 |
| - selectTab(index: number): void { |
20 |
| - this.activeTab = index |
21 |
| - } |
| 17 | + readonly navigation: NavigationItem[] = [ |
| 18 | + { |
| 19 | + id: 'profile', |
| 20 | + title: 'Profile', |
| 21 | + type: 'basic', |
| 22 | + icon: 'fa-solid:user', |
| 23 | + link: '/profile/info', |
| 24 | + }, |
| 25 | + { |
| 26 | + id: 'security', |
| 27 | + title: 'Security', |
| 28 | + type: 'basic', |
| 29 | + icon: 'fa-solid:lock', |
| 30 | + link: '/profile/security', |
| 31 | + }, |
| 32 | + { |
| 33 | + id: 'developer', |
| 34 | + title: 'Developer', |
| 35 | + type: 'basic', |
| 36 | + icon: 'fa-solid:code', |
| 37 | + link: '/profile/developer', |
| 38 | + }, |
| 39 | + { |
| 40 | + id: 'admin', |
| 41 | + title: 'Admin', |
| 42 | + type: 'basic', |
| 43 | + icon: 'fa-solid:user-gear', |
| 44 | + link: '/profile/admin', |
| 45 | + }, |
| 46 | + ] |
22 | 47 | }
|
0 commit comments