import { ChangeDetectionStrategy, Component, EventEmitter, Output } from '@angular/core';
import { MatIconButton } from '@angular/material/button';
import { MatIcon } from '@angular/material/icon';

/**
 * Quick-Jump Button — M3 FilledTonalIconButton
 *
 * An icon button that emits a navigation event for jumping to an agent session.
 * Uses the Material Design 3 FilledTonalIconButton style with 8% state layer
 * overlay on hover and focus.
 *
 * Per spec Section 7.3: Agent Card Component Interface
 */
@Component({
  selector: 'app-quick-jump-button',
  standalone: true,
  imports: [MatIconButton, MatIcon],
  templateUrl: './quick-jump-button.component.html',
  styleUrl: './quick-jump-button.component.scss',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class QuickJumpButtonComponent {
  /** Emitted when the button is clicked, carrying the session key for navigation. */
  @Output() jumpClick = new EventEmitter<string>();

  /** The session key to navigate to. Set by the parent agent card. */
  sessionKey = '';

  onJumpClick(): void {
    this.jumpClick.emit(this.sessionKey);
  }
}