import { Component, Input, OnInit } from '@angular/core';
import { ModalController } from '@ionic/angular';
import { LoginModule } from '../../login/login.module';
import {
  IonContent,
  IonButtons,
  IonHeader,
  IonToolbar,
} from '@ionic/angular/standalone';
import { DeviceService } from '../../../services/device.service';
import { CommonModule } from '@angular/common';

@Component({
  selector: 'app-agreement',
  templateUrl: './agreement.component.html',
  styleUrls: ['./agreement.component.scss'],
  standalone: true,
  imports: [LoginModule, IonContent, IonButtons, IonHeader, IonToolbar,CommonModule],
})
export class AgreementComponent implements OnInit {
  @Input('agreement') agreement: any;
  constructor(private modalController: ModalController, public deviceSer: DeviceService
  ) { }

  ngOnInit() {
    console.log(this.agreement);
  }

  dismiss() {
    // using the injected ModalController this page
    // can "dismiss" itself and optionally pass back data
    this.modalController.dismiss({
      dismissed: true,
    });
  }
}
