import { Component, input } from '@angular/core';
import { RouterModule } from '@angular/router';

import SharedModule from 'app/shared/shared.module';
import { DurationPipe, FormatMediumDatetimePipe, FormatMediumDatePipe } from 'app/shared/date';
import { IVariable } from '../variable.model';

@Component({
  standalone: true,
  selector: 'jhi-variable-detail',
  templateUrl: './variable-detail.component.html',
  styleUrl: './variable-detail.component.css',
  imports: [SharedModule, RouterModule, DurationPipe, FormatMediumDatetimePipe, FormatMediumDatePipe],
  
})
export class VariableDetailComponent {
  variable = input<IVariable | null>(null);
  currentTab: string = 'input'; // default tab

  previousState(): void {
    window.history.back();
  }

  setTab(tabId: string): void {
    this.currentTab = tabId;
  }
}
