import { Component, Input, OnInit } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { IonButton, IonButtons, IonContent, IonHeader, IonInput, IonItem, IonTitle, IonToolbar, ModalController } from '@ionic/angular/standalone';

export interface AgentUserInputFiled{
  name:string//字段名称
  type:string//输入类型
  desc:string//字段说明
}
@Component({
  selector: 'agent-user-input',
  templateUrl: './agent-user-input.component.html',
  styleUrls: ['./agent-user-input.component.scss'],
  imports:[
    IonHeader,IonContent,IonInput,IonItem,IonButton,IonToolbar,IonButtons,
    FormsModule,ReactiveFormsModule,IonTitle
  ],
  standalone: true
})
export class AgentUserInputComponent  implements OnInit {
  
  @Input()
  filedsArray:AgentUserInputFiled[]=[]

  @Input()
  inputData:any ={}

  constructor(private modalCtrl: ModalController) {}
  ngOnInit() { 
    
  }
  cancel() {
    return this.modalCtrl.dismiss(null, 'cancel');
  }

  confirm() {
    return this.modalCtrl.dismiss(this.inputData, 'confirm');
  }
}
