import { EventEmitter, Injectable } from '@angular/core';

import { HttpClient } from '@angular/common/http';
import { Action } from 'rxjs/internal/scheduler/Action';

const serviceURL = './service/settings/actions';

@Injectable({
  providedIn: 'root'
})

export class ActionService {
  actionlist=[]
  actionGoalList=[]
  constructor(private http: HttpClient) { 

    
  }

  getAllAction() {
    return this.http.get<any>(serviceURL+'/all');
  }


  loadActions(lista:any[]){
    this.actionlist=lista
  }

  loadGoalActions(lista:any[]){
    this.actionGoalList=lista
  }

  getActions(){
      return this.actionlist
  }

  getGoalActions(){
      return this.actionGoalList
  }

}