import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Component, OnInit, Inject } from '@angular/core';

@Component({
  selector: 'app-submodule-functions',
  templateUrl: './submodule-functions.component.html',
  styleUrls: ['./submodule-functions.component.css']
})
export class SubmoduleFunctionsComponent implements OnInit {
  functions: any[];

  constructor(@Inject(MAT_DIALOG_DATA) private data: any) { 
    this.functions = [];
  }

  ngOnInit(): void {
    this.data.FUNCIONES.forEach((funcion: any) => {
      if(funcion.PANTALLAS.length > 0){
        this.functions.push(funcion);
      }
    });
  }

}
