import { Component } from '@angular/core';
import { DetailsComponentBase } from '@objects-view/details-component-base';
import { IVolumeType } from '@fleio-api/openstack/model/volume-type.model';
import { ConfigService } from '@shared/config/config.service';

@Component({
  selector: 'app-volume-type-details-overview',
  templateUrl: './volume-type-details-overview.component.html',
  styleUrls: ['./volume-type-details-overview.component.scss']
})
export class VolumeTypeDetailsOverviewComponent extends DetailsComponentBase<IVolumeType> {

  constructor(
    public config: ConfigService,
  ) {
    super();
  }

  hasExtraSpecs(): boolean {
    if (this.object?.extra_specs) {
      return Object.keys(this.object.extra_specs).length > 0;
    } else {
      return false;
    }
  }

}
