import { Component, inject } from '@angular/core';
import { SearchComponent } from '@app/shared/features/search/search.component';
import { Router } from '@angular/router';
import { SearchFilters } from '@app/domain/search/search-filters';

@Component({
  selector: 'app-home',
  standalone: true,
  imports: [SearchComponent],
  templateUrl: './home.component.html',
  styleUrl: './home.component.scss',
})
export class HomeComponent {
  private readonly router = inject(Router);

  showNewQuery(filters: SearchFilters) {
    this.router.navigate(['/profiles'], { queryParams: { search: filters.search } });
  }
}
