import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams,ModalController } from 'ionic-angular';
import { Storage } from '@ionic/storage';
import {Myservice} from '../../providers/myservice';
/**
 * Generated class for the LegalnoticePage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()
@Component({
  selector: 'page-legalnotice',
  templateUrl: 'legalnotice.html',
})
export class LegalnoticePage {
	
	terms_service:any;

	constructor(public navCtrl: NavController, public navParams: NavParams,public modalCtrl: ModalController, public storage: Storage, private myservice: Myservice) {
		this.get_terms()
	}

	ionViewDidLoad() {
		console.log('ionViewDidLoad LegalnoticePage');
	}
  	agree_terms(pg){
		console.log(pg)
		let termsModal = this.modalCtrl.create('TermsPage',{'data' :this.terms_service,'page' : pg} );
		termsModal.present();
	}
	get_terms(){
		//this.myservice.show_loader();
		this.myservice.load_get('get_terms').subscribe(data => {
			//this.myservice.hide_loader();
			if(data.status == 'success'){
				 
				console.log(data.result);
				this.terms_service = data.result
			}
		});
	}

}
