import { Component, Input } from '@angular/core';
import { IonicModule, ModalController } from '@ionic/angular';
import { CommonModule } from '@angular/common';

@Component({
    selector: 'app-category-modal',
    templateUrl: './category-modal.component.html',
    styleUrls: ['./category-modal.component.scss'],
    standalone: true,
    imports: [IonicModule, CommonModule]
})
export class CategoryModalComponent {
    @Input() categories: any[] = [];

    constructor(private modalCtrl: ModalController) { }

    dismiss() {
        this.modalCtrl.dismiss();
    }

    selectCategory(category: string) {
        this.modalCtrl.dismiss(category);
    }
} 