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 { IUnitConverter } from '../unit-converter.model';

@Component({
  standalone: true,
  selector: 'jhi-unit-converter-detail',
  templateUrl: './unit-converter-detail.component.html',
  imports: [SharedModule, RouterModule, DurationPipe, FormatMediumDatetimePipe, FormatMediumDatePipe],
})
export class UnitConverterDetailComponent {
  unitConverter = input<IUnitConverter | null>(null);

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